From: Keith Packard Date: Fri, 1 Apr 2011 21:04:58 +0000 (-0700) Subject: altos: expose set of available stdio values X-Git-Tag: 0.9.3~75 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=359ba0d9fc2c5947e6adc98bebcd061069c61e79 altos: expose set of available stdio values This lets external code manipulate which connection to communicate over. Signed-off-by: Keith Packard --- diff --git a/src/ao.h b/src/ao.h index 64f33f0b..2d2bbf82 100644 --- a/src/ao.h +++ b/src/ao.h @@ -1169,6 +1169,9 @@ struct ao_stdio { void (*flush)(void); }; +extern __data int8_t ao_cur_stdio; +extern __data int8_t ao_num_stdios; + void flush(void); diff --git a/src/ao_stdio.c b/src/ao_stdio.c index c7080ec1..3dd457f7 100644 --- a/src/ao_stdio.c +++ b/src/ao_stdio.c @@ -24,8 +24,8 @@ #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)