Date:2011-06-10 01:49:36 (9 years 2 months ago)
Author:Werner Almesberger
Commit:abe923d2ef6475d22ee11da4830f6f1626a0cad7
Message:atrf-xmit: use receive interrupt instead of polling

- atrf-xmit.c (xfer_one): use wait_for_interrupt instead of polling
- atrf-xmit.c (xfer_one): fail if there's an unexpected receiver
interrupt
Files: tools/atrf-xmit/atrf-xmit.c (1 diff)

Change Details

tools/atrf-xmit/atrf-xmit.c
7272    uint8_t buf[PSDU_SIZE+1]; /* +1 for LQI */
7373    int n, i;
7474
75    if (atrf_interrupt(rx)) {
76        fprintf(stderr, "unexpected receiver interrupt\n");
77        exit(1);
78    }
79
7580    atrf_slp_tr(tx, 1, 1);
76#if 0
81#if 1
7782    irq = wait_for_interrupt(rx, IRQ_TRX_END, IRQ_TRX_END | IRQ_RX_START,
78        1000, 5); /* 5 ms */
83        1000, 0);
7984#else
8085    /*
8186     * Just waiting for the maximum time is much faster than polling the

Archive Download the corresponding diff file



interactive