summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-08-05 12:16:25 -0700
committerKeith Packard <keithp@keithp.com>2012-08-05 12:16:25 -0700
commit39594fdb3e30a1a25dd894c217e3d9d773bab972 (patch)
treef0eefbae307938d72377ee981307deabe761fca6 /src
parent2610b316eb939c1532061646b05207fcd54d984f (diff)
src/cc1111: Allow serial0 without serial1
The ao_serial_speed structure is needed by serial0 too. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/cc1111/ao_serial.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/cc1111/ao_serial.c b/src/cc1111/ao_serial.c
index d90103b0..d5431070 100644
--- a/src/cc1111/ao_serial.c
+++ b/src/cc1111/ao_serial.c
@@ -17,6 +17,25 @@
#include "ao.h"
+const __code struct ao_serial_speed ao_serial_speeds[] = {
+ /* [AO_SERIAL_SPEED_4800] = */ {
+ /* .baud = */ 163,
+ /* .gcr = */ (7 << UxGCR_BAUD_E_SHIFT) | UxGCR_ORDER_LSB
+ },
+ /* [AO_SERIAL_SPEED_9600] = */ {
+ /* .baud = */ 163,
+ /* .gcr = */ (8 << UxGCR_BAUD_E_SHIFT) | UxGCR_ORDER_LSB
+ },
+ /* [AO_SERIAL_SPEED_19200] = */ {
+ /* .baud = */ 163,
+ /* .gcr = */ (9 << UxGCR_BAUD_E_SHIFT) | UxGCR_ORDER_LSB
+ },
+ /* [AO_SERIAL_SPEED_57600] = */ {
+ /* .baud = */ 59,
+ /* .gcr = */ (11 << UxGCR_BAUD_E_SHIFT) | UxGCR_ORDER_LSB
+ },
+};
+
#if HAS_SERIAL_0
volatile __xdata struct ao_fifo ao_serial0_rx_fifo;
@@ -181,25 +200,6 @@ ao_serial1_drain(void) __critical
ao_sleep(&ao_serial1_tx_fifo);
}
-const __code struct ao_serial_speed ao_serial_speeds[] = {
- /* [AO_SERIAL_SPEED_4800] = */ {
- /* .baud = */ 163,
- /* .gcr = */ (7 << UxGCR_BAUD_E_SHIFT) | UxGCR_ORDER_LSB
- },
- /* [AO_SERIAL_SPEED_9600] = */ {
- /* .baud = */ 163,
- /* .gcr = */ (8 << UxGCR_BAUD_E_SHIFT) | UxGCR_ORDER_LSB
- },
- /* [AO_SERIAL_SPEED_19200] = */ {
- /* .baud = */ 163,
- /* .gcr = */ (9 << UxGCR_BAUD_E_SHIFT) | UxGCR_ORDER_LSB
- },
- /* [AO_SERIAL_SPEED_57600] = */ {
- /* .baud = */ 59,
- /* .gcr = */ (11 << UxGCR_BAUD_E_SHIFT) | UxGCR_ORDER_LSB
- },
-};
-
void
ao_serial1_set_speed(uint8_t speed)
{