* Basic I/O functions to support SDCC stdio package
*/
+#ifdef SERIAL_STDIN_PORT
+#define USE_SERIAL_STDIN 1
+#else
+#define USE_SERIAL_STDIN 0
+#endif
+
#define AO_NUM_STDIOS (HAS_USB + PACKET_HAS_SLAVE + USE_SERIAL_STDIN)
__xdata struct ao_stdio ao_stdios[AO_NUM_STDIOS];
void
putchar(char c)
{
+#if LOW_LEVEL_DEBUG
+ if (!ao_cur_task) {
+ extern void ao_debug_out(char c);
+ if (c == '\n')
+ ao_debug_out('\r');
+ ao_debug_out(c);
+ return;
+ }
+#endif
if (c == '\n')
(*ao_stdios[ao_cur_stdio].putchar)('\r');
(*ao_stdios[ao_cur_stdio].putchar)(c);