mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-22 08:48:26 +02:00
tools/atrf-txrx/atrf-txrx.c (main): sort options alphabetically
This commit is contained in:
parent
8710be5665
commit
49ca503cab
@ -555,7 +555,7 @@ int main(int argc, char *const *argv)
|
||||
const char *pcap_file = NULL;
|
||||
struct atrf_dsc *dsc;
|
||||
|
||||
while ((c = getopt(argc, argv, "c:C:d:f:Ho:p:r:E:Pt:T:")) != EOF)
|
||||
while ((c = getopt(argc, argv, "c:C:d:E:f:Ho:p:Pr:t:T:")) != EOF)
|
||||
switch (c) {
|
||||
case 'c':
|
||||
channel = strtoul(optarg, &end, 0);
|
||||
@ -564,9 +564,22 @@ int main(int argc, char *const *argv)
|
||||
if (channel < 11 || channel > 26)
|
||||
usage(*argv);
|
||||
break;
|
||||
case 'C':
|
||||
clkm = strtol(optarg, &end, 0);
|
||||
if (*end)
|
||||
usage(*argv);
|
||||
if (!clkm)
|
||||
usage(*argv);
|
||||
break;
|
||||
case 'd':
|
||||
driver = optarg;
|
||||
break;
|
||||
case 'E':
|
||||
set_mode(&mode, mode_per);
|
||||
pause_s = strtof(optarg, &end);
|
||||
if (*end)
|
||||
usage(*argv);
|
||||
break;
|
||||
case 'f':
|
||||
freq = strtoul(optarg, &end, 0);
|
||||
if (*end)
|
||||
@ -588,6 +601,9 @@ int main(int argc, char *const *argv)
|
||||
if (*end)
|
||||
usage(*argv);
|
||||
break;
|
||||
case 'P':
|
||||
set_mode(&mode, mode_ping);
|
||||
break;
|
||||
case 'r':
|
||||
if (!strcmp(optarg, "250k"))
|
||||
rate = OQPSK_DATA_RATE_250;
|
||||
@ -607,22 +623,6 @@ int main(int argc, char *const *argv)
|
||||
if (trim > 15)
|
||||
usage(*argv);
|
||||
break;
|
||||
case 'C':
|
||||
clkm = strtol(optarg, &end, 0);
|
||||
if (*end)
|
||||
usage(*argv);
|
||||
if (!clkm)
|
||||
usage(*argv);
|
||||
break;
|
||||
case 'E':
|
||||
set_mode(&mode, mode_per);
|
||||
pause_s = strtof(optarg, &end);
|
||||
if (*end)
|
||||
usage(*argv);
|
||||
break;
|
||||
case 'P':
|
||||
set_mode(&mode, mode_ping);
|
||||
break;
|
||||
case 'T':
|
||||
set_mode(&mode, mode_cont_tx);
|
||||
if (!strcmp(optarg, "-2"))
|
||||
|
Loading…
Reference in New Issue
Block a user