mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-26 11:50:36 +02:00
misctxrx.c (wait_for_interrupt): let "ignore" control printing more tightly
When some interrupt(s) happened but the one(s) wait_for_interrupt was waiting for weren't among them, it printed the list of interrupts even if they were all in "ignore". This made sequences like RX_START followed by TRX_END unnecessarily noisy. Now, wait_for_interrupt only prints the pending interrupts if at least one of them is not in "ignore".
This commit is contained in:
parent
96e8fc6dbf
commit
1fb05c221d
@ -53,8 +53,11 @@ uint8_t wait_for_interrupt(struct atrf_dsc *dsc, uint8_t wait_for,
|
|||||||
if (!irq)
|
if (!irq)
|
||||||
continue;
|
continue;
|
||||||
show = irq & ~ignore;
|
show = irq & ~ignore;
|
||||||
if ((irq & wait_for) && !show)
|
if (!show) {
|
||||||
|
if (irq & wait_for)
|
||||||
break;
|
break;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
fprintf(stderr, "IRQ (0x%02x):", irq);
|
fprintf(stderr, "IRQ (0x%02x):", irq);
|
||||||
if (irq & IRQ_PLL_LOCK)
|
if (irq & IRQ_PLL_LOCK)
|
||||||
fprintf(stderr, " PLL_LOCK");
|
fprintf(stderr, " PLL_LOCK");
|
||||||
|
Loading…
Reference in New Issue
Block a user