FreeCalypso > hg > freecalypso-sw
comparison loadtools/sertool.c @ 17:24b88c119465
loadtools: hw parameter file reading implemented
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Fri, 03 May 2013 22:55:28 +0000 |
parents | fea204bc7674 |
children | 768a3d012931 |
comparison
equal
deleted
inserted
replaced
16:4c78fc688127 | 17:24b88c119465 |
---|---|
20 { | 20 { |
21 extern char *optarg; | 21 extern char *optarg; |
22 extern int optind; | 22 extern int optind; |
23 int c; | 23 int c; |
24 | 24 |
25 while ((c = getopt(argc, argv, "i:")) != EOF) | 25 while ((c = getopt(argc, argv, "h:H:i:")) != EOF) |
26 switch (c) { | 26 switch (c) { |
27 case 'h': | |
28 read_hwparam_file_shortname(optarg); | |
29 continue; | |
30 case 'H': | |
31 read_hwparam_file_fullpath(optarg); | |
32 continue; | |
27 case 'i': | 33 case 'i': |
28 set_beacon_interval(optarg); | 34 set_beacon_interval(optarg); |
29 continue; | 35 continue; |
30 case '?': | 36 case '?': |
31 default: | 37 default: |
32 usage: fprintf(stderr, | 38 usage: fprintf(stderr, |
33 "usage: fc-sertool [-i beacon-interval] ttyport iramimage.srec\n"); | 39 "usage: fc-sertool [options] ttyport iramimage.srec\n"); |
34 exit(1); | 40 exit(1); |
35 } | 41 } |
36 if (argc - optind != 2) | 42 if (argc - optind != 2) |
37 goto usage; | 43 goto usage; |
38 target_ttydev = argv[optind]; | 44 target_ttydev = argv[optind]; |