diff options
author | Keith Packard <keithp@keithp.com> | 2009-10-09 22:02:40 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-10-09 22:02:40 -0700 |
commit | 33b0b6f2f2e07de105619a7b463226d2813152ab (patch) | |
tree | e935b20518feb13f35fef619d732ced5f1185395 /src/ao_serial.c | |
parent | a3771bfc5ce740f9d89193e9f8b1d7987aa57264 (diff) |
Add support for the SkyTraq GPS unit
This is a build-time option selected by hacking the Makefile at present.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_serial.c')
-rw-r--r-- | src/ao_serial.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ao_serial.c b/src/ao_serial.c index 59110354..1e3ea3e3 100644 --- a/src/ao_serial.c +++ b/src/ao_serial.c @@ -60,7 +60,10 @@ ao_serial_getchar(void) __critical ao_sleep(&ao_usart1_rx_fifo); ao_fifo_remove(ao_usart1_rx_fifo, c); if (serial_echo) { - printf("%02x\n", ((int) c) & 0xff); + printf("%02x ", ((int) c) & 0xff); + if (c >= ' ') + putchar(c); + putchar('\n'); flush(); } return c; @@ -121,6 +124,10 @@ static const struct { /* .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_57600] = */ { /* .baud = */ 59, /* .gcr = */ (11 << UxGCR_BAUD_E_SHIFT) | UxGCR_ORDER_LSB |