Date:2011-06-21 03:11:29 (8 years 3 months ago)
Author:Werner Almesberger
Commit:70715a15d9fc9bc885337c67b43dccdccf6d9569
Message:tools/lib/atben.c (atben_interrupt_wait): don't time out if timeout_ms == 0

Files: tools/lib/atben.c (1 diff)

Change Details

tools/lib/atben.c
387387int atben_interrupt_wait(void *handle, int timeout_ms)
388388{
389389    struct timeout to;
390    int timedout;
390    int timedout = 0;
391391    uint8_t irq;
392392
393    timeout_start(&to, timeout_ms);
393    if (timeout_ms)
394        timeout_start(&to, timeout_ms);
394395    while (1) {
395        timedout = timeout_reached(&to);
396        if (timeout_ms)
397            timedout = timeout_reached(&to);
396398        if (atben_interrupt(handle)) {
397399            irq = atben_reg_read(handle, REG_IRQ_STATUS);
398400            if (irq)

Archive Download the corresponding diff file



interactive