FreeCalypso > hg > freecalypso-tools
diff rvinterf/lowlevel/rvtdump.c @ 253:6f078c4a5506
rvinterf and friends converted to use libserial
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 21 Sep 2017 23:45:05 +0000 |
parents | 7168f63fc3b8 |
children |
line wrap: on
line diff
--- a/rvinterf/lowlevel/rvtdump.c Thu Sep 21 23:30:53 2017 +0000 +++ b/rvinterf/lowlevel/rvtdump.c Thu Sep 21 23:45:05 2017 +0000 @@ -12,7 +12,6 @@ #include "../include/pktmux.h" extern int target_fd; -extern char *baudrate_name; extern u_char rxpkt[]; extern size_t rxpkt_len; @@ -23,6 +22,8 @@ int background; int no_output; /* for output.c */ +static char *baudrate = "115200"; + static char keepalive_msg[] = "Received keepalive query, unable to respond, please run rvinterf"; @@ -41,7 +42,7 @@ no_output++; /* for output.c */ continue; case 'B': - baudrate_name = optarg; + baudrate = optarg; continue; case 'd': target_fd = atoi(optarg); @@ -62,7 +63,8 @@ if (target_fd <= 0) { if (argc - optind != 1) goto usage; - open_target_serial(argv[optind]); + open_serial_port(argv[optind]); + set_fixed_baudrate(baudrate); } set_serial_nonblock(0);