comparison libserial-newlnx/baudtab.c @ 255:ab8410d06ca7

libserial-newlnx: new way implemented, compiles
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 22 Sep 2017 00:19:41 +0000
parents 6984b76f3def
children 6bb41b4d39ed
comparison
equal deleted inserted replaced
254:6984b76f3def 255:ab8410d06ca7
5 5
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 #include <strings.h> 9 #include <strings.h>
10 #include <termios.h> 10 #include <asm/termbits.h>
11 #include "baudrate.h" 11 #include "baudrate.h"
12 12
13 struct baudrate baud_rate_table[] = { 13 struct baudrate baud_rate_table[] = {
14 /* the first listed rate will be our default */ 14 /* the first listed rate will be our default */
15 {"115200", B115200, 0}, 15 {"115200", B115200, 0, 0},
16 {"57600", B57600, 1}, 16 {"57600", B57600, 0, 1},
17 {"38400", B38400, 2}, 17 {"38400", B38400, 0, 2},
18 {"19200", B19200, 4}, 18 {"19200", B19200, 0, 4},
19 /* 19 /* Non-standard high baud rates */
20 * Non-standard high baud rates remapped by CP2102 EEPROM programming 20 {"812500", BOTHER, 812500, -1},
21 * or by a hacky patch to the ftdi_sio Linux kernel driver to work 21 {"406250", BOTHER, 406250, -1},
22 * with FTDI adapters. 22 {"203125", BOTHER, 203125, -1},
23 */
24 {"812500", B921600, -1},
25 {"406250", B460800, -1},
26 {"203125", B230400, -1},
27 /* table search terminator */ 23 /* table search terminator */
28 {NULL, B0, -1}, 24 {NULL, B0, 0, -1},
29 }; 25 };
30 26
31 struct baudrate * 27 struct baudrate *
32 find_baudrate_by_name(srch_name) 28 find_baudrate_by_name(srch_name)
33 char *srch_name; 29 char *srch_name;