]> git.gag.com Git - fw/altos/blob - src/usbrelay-v0.1/ao_serial_lpc.h
altoslib: Update local callsign/baud rate when using remote protocol
[fw/altos] / src / usbrelay-v0.1 / ao_serial_lpc.h
1 #define AO_LPC_USARTCLK 12000000
2
3 static const struct {
4         uint16_t dl;
5         uint8_t divaddval;
6         uint8_t mulval;
7 } ao_usart_speeds[] = {
8         [AO_SERIAL_SPEED_4800] = { /* actual =  4800.00 */
9                 .dl = 125,
10                 .divaddval = 1,
11                 .mulval = 4
12         },
13         [AO_SERIAL_SPEED_9600] = { /* actual =  9603.07 */
14                 .dl = 71,
15                 .divaddval = 1,
16                 .mulval = 10
17         },
18         [AO_SERIAL_SPEED_19200] = { /* actual = 19181.59 */
19                 .dl = 23,
20                 .divaddval = 7,
21                 .mulval = 10
22         },
23         [AO_SERIAL_SPEED_57600] = { /* actual = 57692.31 */
24                 .dl = 7,
25                 .divaddval = 6,
26                 .mulval = 7
27         },
28         [AO_SERIAL_SPEED_115200] = { /* actual = 115384.6 */
29                 .dl = 4,
30                 .divaddval = 5,
31                 .mulval = 8
32         },
33 };