diff options
author | Keith Packard <keithp@keithp.com> | 2013-03-24 15:00:20 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-03-31 12:24:24 -0700 |
commit | 4f1f3e836393304434130d362771a39f6f8f859a (patch) | |
tree | 5655f7ae7aa252a96aa585e3aee47b1b57a8fc9a /src/cc1111/ao_serial.c | |
parent | 7afcec1a1dce140dfa569469df4ef42ed407a742 (diff) |
altos: Do not release interrupts from any pollchar function
getchar relies on interrupts being blocked across the pollchar calls
and into the sleep call or it may go to sleep with data pending.
This prefixes all pollchar functions with _ to indicate that they are
to be called with interrupts blocked and eliminates all interrupt
manipulation calls from within the pollchar functions.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/cc1111/ao_serial.c')
-rw-r--r-- | src/cc1111/ao_serial.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cc1111/ao_serial.c b/src/cc1111/ao_serial.c index 8913a9b0..81727836 100644 --- a/src/cc1111/ao_serial.c +++ b/src/cc1111/ao_serial.c @@ -92,7 +92,7 @@ ao_serial0_getchar(void) __critical #if USE_SERIAL_0_STDIN int -ao_serial0_pollchar(void) __critical +_ao_serial0_pollchar(void) { uint8_t c; if (ao_fifo_empty(ao_serial0_rx_fifo)) @@ -180,7 +180,7 @@ ao_serial1_getchar(void) __critical #if USE_SERIAL_1_STDIN int -ao_serial1_pollchar(void) __critical +_ao_serial1_pollchar(void) { uint8_t c; if (ao_fifo_empty(ao_serial1_rx_fifo)) @@ -271,7 +271,7 @@ ao_serial_init(void) IEN0 |= IEN0_URX0IE; IEN2 |= IEN2_UTX0IE; #if USE_SERIAL_0_STDIN && !DELAY_SERIAL_0_STDIN - ao_add_stdio(ao_serial0_pollchar, + ao_add_stdio(_ao_serial0_pollchar, ao_serial0_putchar, NULL); #endif @@ -327,7 +327,7 @@ ao_serial_init(void) IEN2 |= IEN2_UTX1IE; #if USE_SERIAL_1_STDIN && !DELAY_SERIAL_1_STDIN - ao_add_stdio(ao_serial1_pollchar, + ao_add_stdio(_ao_serial1_pollchar, ao_serial1_putchar, NULL); #endif |