FreeCalypso > hg > freecalypso-tools
diff libserial-linux/setbyname.c @ 661:fd7b447b99e3
libserial rename
The version that was previously named libserial-newlnx is now libserial-linux,
and the version that was previosly named libserial-orig is now libserial-posix.
This new naming is more in line with the objective reality of the difference,
moving away from naming based on our project history.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 05 Mar 2020 19:54:31 +0000 |
parents | libserial-newlnx/setbyname.c@6984b76f3def |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libserial-linux/setbyname.c Thu Mar 05 19:54:31 2020 +0000 @@ -0,0 +1,21 @@ +/* + * This module contains the wrapper function (used by loadtools) + * that looks up a baud rate by name and calls set_serial_baud(). + */ + +#include <stdio.h> +#include <stdlib.h> +#include "baudrate.h" + +extern struct baudrate *find_baudrate_by_name(); + +set_fixed_baudrate(baudname) + char *baudname; +{ + struct baudrate *br; + + br = find_baudrate_by_name(baudname); + if (!br) + exit(1); /* error msg already printed */ + set_serial_baudrate(br); +}