From b0dd5ced2002322d7a206838ac83126d62892595 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Mon, 20 Jun 2011 17:27:19 -0300 Subject: [PATCH] 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 --- tools/atrf-txrx/atrf-txrx.c | 2 +- tools/atrf-xmit/atrf-xmit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/atrf-txrx/atrf-txrx.c b/tools/atrf-txrx/atrf-txrx.c index c6c2b67..b558992 100644 --- a/tools/atrf-txrx/atrf-txrx.c +++ b/tools/atrf-txrx/atrf-txrx.c @@ -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. */ 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) wait_for_interrupt(dsc, IRQ_CCA_ED_DONE, IRQ_CCA_ED_DONE, 10, 50); /* according to table 7-1, 37 us max */ diff --git a/tools/atrf-xmit/atrf-xmit.c b/tools/atrf-xmit/atrf-xmit.c index f286ffc..676ed77 100644 --- a/tools/atrf-xmit/atrf-xmit.c +++ b/tools/atrf-xmit/atrf-xmit.c @@ -39,7 +39,7 @@ static void init_common(struct atrf_dsc *dsc, int trim, int channel) atrf_set_clkm(dsc, 0); atrf_reg_write(dsc, REG_PHY_CC_CCA, (1 << CCA_MODE_SHIFT) | channel); atrf_reg_write(dsc, REG_IRQ_MASK, 0xff); - (void) atrf_reg_read(dsc, REG_IRQ_STATUS); + flush_interrupts(dsc); }