FreeCalypso > hg > freecalypso-tools
diff rvinterf/lowlevel/rvifmain.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 | a626f0ef542a |
line wrap: on
line diff
--- a/rvinterf/lowlevel/rvifmain.c Thu Sep 21 23:30:53 2017 +0000 +++ b/rvinterf/lowlevel/rvifmain.c Thu Sep 21 23:45:05 2017 +0000 @@ -16,7 +16,6 @@ #include "client.h" extern int target_fd, listener; -extern char *baudrate_name; extern char *extlcd_program; extern u_char extlcd_invert; @@ -36,6 +35,8 @@ int wakeup_after_sec = 7; +static char *baudrate = "115200"; + static char keepalive_msg[] = "Received keepalive query, responding with keepalive answer"; static u_char keepalive_answer[2] = {RVT_KEEPALIVE_HEADER, 'A'}; @@ -58,7 +59,7 @@ no_output++; continue; case 'B': - baudrate_name = optarg; + baudrate = optarg; continue; case 'd': target_fd = atoi(optarg); @@ -90,7 +91,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); } max_fd = target_fd; if (extlcd_program)