Date:2013-07-31 01:00:45 (6 years 3 months ago)
Author:Werner Almesberger
Commit:873f80cb4dac00800826958f9869ec55dbd9e91c
Message:tools/atrf-txrx/atrf-txrx.c: option -q becomes "quick" and uses aggressive polling

This allows us to capture frames at full speed speed.
Files: tools/atrf-txrx/atrf-txrx.c (5 diffs)

Change Details

tools/atrf-txrx/atrf-txrx.c
7575
7676
7777static volatile int run = 1;
78static bool quiet = 0;
78static bool quick = 0;
7979
8080
8181/* ----- Helper functions -------------------------------------------------- */
...... 
240240    while (run) {
241241        wait_for_interrupt(dsc,
242242            IRQ_TRX_END,
243            quiet ? 0xff : IRQ_TRX_END | IRQ_RX_START | IRQ_AMI, 0);
243            quick ? 0xff : IRQ_TRX_END | IRQ_RX_START | IRQ_AMI,
244            quick ? -1 : 0);
244245        if (!run)
245246            break;
246247        gettimeofday(&now, NULL);
...... 
252253            continue;
253254        }
254255        write_pcap_rec(file, &now, buf, n-1);
255        if (!quiet)
256        if (!quick)
256257            (void) write(2, ".", 1);
257258        count++;
258259    }
...... 
678679" -f freq frequency in MHz, 2405 to 2480 (default %d)\n"
679680" -o file write received data to a file in pcap format\n"
680681" -p power transmit power, -17.2 to 3.0 dBm (default %.1f)\n"
681" -q quiet - suppress progress reports and warnings\n"
682" (currently only used when capturing)\n"
682" -q quick and quiet - suppress progress reports and warnings,\n"
683" poll aggressively (currently only used when capturing)\n"
683684" -r rate data rate, 250k, 500k, 1M, or 2M (default: 250k)\n"
684685" -t trim trim capacitor, 0 to 15 (default %d)\n"
685686        , name, name, name, name, name, name,
...... 
774775            set_mode(&mode, mode_ping);
775776            break;
776777        case 'q':
777            quiet = 1;
778            quick = 1;
778779            break;
779780        case 'r':
780781            if (!strcmp(optarg, "250k"))

Archive Download the corresponding diff file



interactive