Date:2011-06-20 22:27:19 (9 years 1 month ago)
Author:Werner Almesberger
Commit:b0dd5ced2002322d7a206838ac83126d62892595
Message:tools/: updated tools to use flush_interrupts

- atrf-txrx/atrf-txrx.c (init_txrx), atrf-xmit/atrf-xmit.c
(init_common): instead of reading REG_IRQ_STATUS, use
flush_interrupts to flush interrupts
Files: tools/atrf-txrx/atrf-txrx.c (1 diff)
tools/atrf-xmit/atrf-xmit.c (1 diff)

Change Details

tools/atrf-txrx/atrf-txrx.c
9898    /* We want to see all interrupts, not only the ones we're expecting. */
9999    atrf_reg_write(dsc, REG_IRQ_MASK, 0xff);
100100
101    (void) atrf_reg_read(dsc, REG_IRQ_STATUS);
101    flush_interrupts(dsc);
102102    if (atrf_identify(dsc) == artf_at86rf231)
103103        wait_for_interrupt(dsc, IRQ_CCA_ED_DONE, IRQ_CCA_ED_DONE,
104104            10, 50); /* according to table 7-1, 37 us max */
tools/atrf-xmit/atrf-xmit.c
3939    atrf_set_clkm(dsc, 0);
4040    atrf_reg_write(dsc, REG_PHY_CC_CCA, (1 << CCA_MODE_SHIFT) | channel);
4141    atrf_reg_write(dsc, REG_IRQ_MASK, 0xff);
42    (void) atrf_reg_read(dsc, REG_IRQ_STATUS);
42    flush_interrupts(dsc);
4343}
4444
4545

Archive Download the corresponding diff file



interactive