Date:2011-06-20 22:21:40 (9 years 1 month ago)
Author:Werner Almesberger
Commit:620709a20a3396e776c8caf08c65a059bfb80df3
Message:libatrf: new function to reliably flush interrupts

- misctxrx.h (flush_interrupts), misctxrx.c: reliably flush interrupts
on all drivers (with the exception of atnet talking to an atusb)
Files: tools/include/misctxrx.h (1 diff)
tools/lib/misctxrx.c (1 diff)

Change Details

tools/include/misctxrx.h
1818#include "atrf.h"
1919
2020
21void flush_interrupts(struct atrf_dsc *dsc);
2122uint8_t wait_for_interrupt(struct atrf_dsc *dsc, uint8_t wait_for,
2223    uint8_t ignore, int sleep_us, int timeout);
2324
tools/lib/misctxrx.c
3535}
3636
3737
38void flush_interrupts(struct atrf_dsc *dsc)
39{
40    /*
41     * If the driver doesn't support atrf_interrupt_wait, we use
42     * atrf_reg_read.
43     */
44    if (atrf_interrupt_wait(dsc, 1) < 0)
45        atrf_reg_read(dsc, REG_IRQ_STATUS);
46}
47
48
3849uint8_t wait_for_interrupt(struct atrf_dsc *dsc, uint8_t wait_for,
3950    uint8_t ignore, int sleep_us, int timeout)
4051{

Archive Download the corresponding diff file



interactive