comparison sw/mcsi-rx/main.c @ 3:de85c3680d7e

sw: fc-mcsi-rx program put together
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 11 Oct 2024 23:54:39 +0000
parents
children
comparison
equal deleted inserted replaced
2:a4918a161d2e 3:de85c3680d7e
1 /*
2 * Main module for fc-mcsi-rx program.
3 */
4
5 #include <stdio.h>
6 #include <stdlib.h>
7
8 FILE *out_binfile;
9
10 main(argc, argv)
11 char **argv;
12 {
13 if (argc != 3) {
14 fprintf(stderr, "usage: %s ttyport out-bin-file\n", argv[0]);
15 exit(1);
16 }
17 open_serial_port(argv[1]);
18 set_serial_baudrate(187500);
19 init_serial_flush();
20 out_binfile = fopen(argv[2], "w");
21 if (!out_binfile) {
22 perror(argv[2]);
23 exit(1);
24 }
25 main_loop(); /* does not return */
26 }