comparison libserial-newlnx/setbyname.c @ 254:6984b76f3def

beginning of libserial-newlnx: copy of libserial-orig
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 22 Sep 2017 00:09:37 +0000
parents
children
comparison
equal deleted inserted replaced
253:6f078c4a5506 254:6984b76f3def
1 /*
2 * This module contains the wrapper function (used by loadtools)
3 * that looks up a baud rate by name and calls set_serial_baud().
4 */
5
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include "baudrate.h"
9
10 extern struct baudrate *find_baudrate_by_name();
11
12 set_fixed_baudrate(baudname)
13 char *baudname;
14 {
15 struct baudrate *br;
16
17 br = find_baudrate_by_name(baudname);
18 if (!br)
19 exit(1); /* error msg already printed */
20 set_serial_baudrate(br);
21 }