mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-26 11:06:16 +02:00
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
This commit is contained in:
parent
620709a20a
commit
b0dd5ced20
@ -98,7 +98,7 @@ static struct atrf_dsc *init_txrx(const char *driver, int trim, unsigned mhz)
|
|||||||
/* We want to see all interrupts, not only the ones we're expecting. */
|
/* We want to see all interrupts, not only the ones we're expecting. */
|
||||||
atrf_reg_write(dsc, REG_IRQ_MASK, 0xff);
|
atrf_reg_write(dsc, REG_IRQ_MASK, 0xff);
|
||||||
|
|
||||||
(void) atrf_reg_read(dsc, REG_IRQ_STATUS);
|
flush_interrupts(dsc);
|
||||||
if (atrf_identify(dsc) == artf_at86rf231)
|
if (atrf_identify(dsc) == artf_at86rf231)
|
||||||
wait_for_interrupt(dsc, IRQ_CCA_ED_DONE, IRQ_CCA_ED_DONE,
|
wait_for_interrupt(dsc, IRQ_CCA_ED_DONE, IRQ_CCA_ED_DONE,
|
||||||
10, 50); /* according to table 7-1, 37 us max */
|
10, 50); /* according to table 7-1, 37 us max */
|
||||||
|
@ -39,7 +39,7 @@ static void init_common(struct atrf_dsc *dsc, int trim, int channel)
|
|||||||
atrf_set_clkm(dsc, 0);
|
atrf_set_clkm(dsc, 0);
|
||||||
atrf_reg_write(dsc, REG_PHY_CC_CCA, (1 << CCA_MODE_SHIFT) | channel);
|
atrf_reg_write(dsc, REG_PHY_CC_CCA, (1 << CCA_MODE_SHIFT) | channel);
|
||||||
atrf_reg_write(dsc, REG_IRQ_MASK, 0xff);
|
atrf_reg_write(dsc, REG_IRQ_MASK, 0xff);
|
||||||
(void) atrf_reg_read(dsc, REG_IRQ_STATUS);
|
flush_interrupts(dsc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user