root / hw / irq.h @ 9e315fa9
History | View | Annotate | Download (464 Bytes)
1 |
/* Generic IRQ/GPIO pin infrastructure. */
|
---|---|
2 |
|
3 |
typedef void (*qemu_irq_handler)(void *opaque, int n, int level); |
4 |
|
5 |
typedef struct IRQState *qemu_irq; |
6 |
|
7 |
void qemu_set_irq(qemu_irq irq, int level); |
8 |
|
9 |
static inline void qemu_irq_raise(qemu_irq irq) |
10 |
{ |
11 |
qemu_set_irq(irq, 1);
|
12 |
} |
13 |
|
14 |
static inline void qemu_irq_lower(qemu_irq irq) |
15 |
{ |
16 |
qemu_set_irq(irq, 0);
|
17 |
} |
18 |
|
19 |
/* Returns an array of N IRQs. */
|
20 |
qemu_irq *qemu_allocate_irqs(qemu_irq_handler handler, void *opaque, int n); |
21 |
|