1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-22 14:30:35 +02:00

tools/lib/atben.c (atben_interrupt_wait): don't time out if timeout_ms == 0

This commit is contained in:
Werner Almesberger 2011-06-20 22:11:29 -03:00
parent 10b6d88af9
commit 70715a15d9

View File

@ -387,12 +387,14 @@ static int atben_interrupt(void *handle)
int atben_interrupt_wait(void *handle, int timeout_ms)
{
struct timeout to;
int timedout;
int timedout = 0;
uint8_t irq;
timeout_start(&to, timeout_ms);
if (timeout_ms)
timeout_start(&to, timeout_ms);
while (1) {
timedout = timeout_reached(&to);
if (timeout_ms)
timedout = timeout_reached(&to);
if (atben_interrupt(handle)) {
irq = atben_reg_read(handle, REG_IRQ_STATUS);
if (irq)