diff options
| author | Keith Packard <keithp@keithp.com> | 2012-11-30 16:03:45 -0800 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2012-11-30 16:03:45 -0800 |
| commit | 7db14905af5cbbfa47d1a2026cce6aea9e5aae7a (patch) | |
| tree | bd23a90444eec2fb71ba6b8200b17fdbdbc2e664 /src/stm/ao_serial_stm.c | |
| parent | 0b65402361f36a0c722977bcb63edb26fda0db28 (diff) | |
altos: Add support for 115200 baud serial rates
Necessary for flashing skytraq chips
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/ao_serial_stm.c')
| -rw-r--r-- | src/stm/ao_serial_stm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/stm/ao_serial_stm.c b/src/stm/ao_serial_stm.c index 94138edc..ce33f97e 100644 --- a/src/stm/ao_serial_stm.c +++ b/src/stm/ao_serial_stm.c @@ -123,12 +123,15 @@ static const struct { [AO_SERIAL_SPEED_57600] = { AO_PCLK1 / 57600 }, + [AO_SERIAL_SPEED_115200] = { + AO_PCLK1 / 115200 + }, }; void ao_usart_set_speed(struct ao_stm_usart *usart, uint8_t speed) { - if (speed > AO_SERIAL_SPEED_57600) + if (speed > AO_SERIAL_SPEED_115200) return; usart->reg->brr = ao_usart_speeds[speed].brr; } |
