mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
Unify IRQ handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
b6e27ab8b1
commit
d537cf6c86
71 changed files with 592 additions and 624 deletions
21
hw/irq.h
Normal file
21
hw/irq.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* Generic IRQ/GPIO pin infrastructure. */
|
||||
|
||||
typedef void (*qemu_irq_handler)(void *opaque, int n, int level);
|
||||
|
||||
typedef struct IRQState *qemu_irq;
|
||||
|
||||
void qemu_set_irq(qemu_irq irq, int level);
|
||||
|
||||
static inline void qemu_irq_raise(qemu_irq irq)
|
||||
{
|
||||
qemu_set_irq(irq, 1);
|
||||
}
|
||||
|
||||
static inline void qemu_irq_lower(qemu_irq irq)
|
||||
{
|
||||
qemu_set_irq(irq, 0);
|
||||
}
|
||||
|
||||
/* Returns an array of N IRQs. */
|
||||
qemu_irq *qemu_allocate_irqs(qemu_irq_handler handler, void *opaque, int n);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue