X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fao_stdio.c;h=3dd457f7c63959d6da9b70363aca0d4db44960e4;hp=78bbd3c3dab3e3d52d0731be50827e983c642dcb;hb=4e2c18249e16c98cf5f7dccdf8d3b84bc473863a;hpb=e6bb80975fde20928a830170f0821d59a8c72690 diff --git a/src/ao_stdio.c b/src/ao_stdio.c index 78bbd3c3..3dd457f7 100644 --- a/src/ao_stdio.c +++ b/src/ao_stdio.c @@ -21,11 +21,11 @@ * Basic I/O functions to support SDCC stdio package */ -#define AO_NUM_STDIOS 2 +#define AO_NUM_STDIOS (HAS_USB + PACKET_HAS_SLAVE + USE_SERIAL_STDIN) static __xdata struct ao_stdio stdios[AO_NUM_STDIOS]; -static __data int8_t ao_cur_stdio; -static __data int8_t ao_num_stdios; +__data int8_t ao_cur_stdio; +__data int8_t ao_num_stdios; void putchar(char c) @@ -66,7 +66,7 @@ getchar(void) __reentrant __critical void ao_add_stdio(char (*pollchar)(void), void (*putchar)(char), - void (*flush)(void)) + void (*flush)(void)) __reentrant { if (ao_num_stdios == AO_NUM_STDIOS) ao_panic(AO_PANIC_STDIO);