comparison rfcal/cmu200/main.c @ 194:31d43f0e469a

fc-cmu200d skeleton started, compiles
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 24 Apr 2017 00:45:54 +0000
parents
children db9ee7745cdd
comparison
equal deleted inserted replaced
193:a57c93cf7f5c 194:31d43f0e469a
1 /*
2 * This module contains the main() function for fc-cmu200d.
3 */
4
5 #include <stdio.h>
6 #include <stdlib.h>
7
8 int target_fd;
9
10 static char default_socket_pathname[] = "/tmp/fc_rftest_socket";
11
12 char *bind_socket_pathname;
13
14 main(argc, argv)
15 char **argv;
16 {
17 if (argc < 3 || argc > 4) {
18 fprintf(stderr,
19 "usage: %s serial-port baud [socket-pathname]\n",
20 argv[0]);
21 exit(1);
22 }
23 open_target_serial(argv[1], argv[2]);
24 set_serial_nonblock(0);
25 init_cmu200();
26 if (argc > 3)
27 bind_socket_pathname = argv[3];
28 else
29 bind_socket_pathname = default_socket_pathname;
30
31 /* to be continued */
32 exit(0);
33 }