From a5bbb06141592892d13e294d67dc7295accd1c3a Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sat, 24 Jul 2010 16:12:49 +0000 Subject: 2010-07-24 Joel Sherrill * libcsupport/Makefile.am, libcsupport/src/termios_baud2num.c, libcsupport/src/termios_num2baud.c: Use RTEMS associations to simplify code and make easier for coverage. * libcsupport/src/termios_baudtable.c: New file. --- cpukit/libcsupport/src/termios_baudtable.c | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 cpukit/libcsupport/src/termios_baudtable.c (limited to 'cpukit/libcsupport/src/termios_baudtable.c') diff --git a/cpukit/libcsupport/src/termios_baudtable.c b/cpukit/libcsupport/src/termios_baudtable.c new file mode 100644 index 0000000000..92d1c6b809 --- /dev/null +++ b/cpukit/libcsupport/src/termios_baudtable.c @@ -0,0 +1,42 @@ +/* + * COPYRIGHT (c) 1989-2010. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include + +rtems_assoc_t termios_assoc_table[] = { + { "B0", 0, B0 }, + { "B50", 50, B50 }, + { "B75", 75, B75 }, + { "B110", 110, B110 }, + { "B134", 134, B134 }, + { "B150", 150, B150 }, + { "B200", 200, B200 }, + { "B300", 300, B300 }, + { "B600", 600, B600 }, + { "B1200", 1200, B1200 }, + { "B1800", 1800, B1800 }, + { "B2400", 2400, B2400 }, + { "B4800", 4800, B4800 }, + { "B9600", 9600, B9600 }, + { "B19200", 19200, B19200 }, + { "B38400", 38400, B38400 }, + { "B57600", 57600, B57600 }, + { "B115200", 115200, B115200 }, + { "B230400", 230400, B230400 }, + { "B460800", 460800, B460800 }, + { NULL, 0, 0 } +}; -- cgit v1.2.3