FreeCalypso > hg > freecalypso-tools
comparison loadtools/sertool.c @ 683:ecea01f65146
loadtools: implemented -t option for boot ROM wait timeout
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 10 Mar 2020 07:05:32 +0000 |
parents | cef70d53fc5e |
children | 9ecbf1bf2e1b |
comparison
equal
deleted
inserted
replaced
682:a7496a1e0df7 | 683:ecea01f65146 |
---|---|
24 { | 24 { |
25 extern char *optarg; | 25 extern char *optarg; |
26 extern int optind; | 26 extern int optind; |
27 int c; | 27 int c; |
28 | 28 |
29 while ((c = getopt(argc, argv, "b:c:C:h:H:i:P:")) != EOF) | 29 while ((c = getopt(argc, argv, "b:c:C:h:H:i:P:t:")) != EOF) |
30 switch (c) { | 30 switch (c) { |
31 case 'b': | 31 case 'b': |
32 set_romload_baudrate(optarg); | 32 set_romload_baudrate(optarg); |
33 continue; | 33 continue; |
34 case 'c': | 34 case 'c': |
47 set_beacon_interval(optarg); | 47 set_beacon_interval(optarg); |
48 continue; | 48 continue; |
49 case 'P': | 49 case 'P': |
50 if (find_bootctrl_entry(optarg) < 0) | 50 if (find_bootctrl_entry(optarg) < 0) |
51 exit(1); /* error msg already printed */ | 51 exit(1); /* error msg already printed */ |
52 continue; | |
53 case 't': | |
54 set_romload_timeout(optarg); | |
52 continue; | 55 continue; |
53 case '?': | 56 case '?': |
54 default: | 57 default: |
55 usage: fprintf(stderr, | 58 usage: fprintf(stderr, |
56 "usage: fc-iram [options] ttyport iramimage.srec\n"); | 59 "usage: fc-iram [options] ttyport iramimage.srec\n"); |