2 * http://devel.0cpm.org/ -- Open source firmware for SIP phones.
12 /* Interrupt drivers are split in a top half and a bottom half. The top half is generic,
13 * the bottom half is device-specific. The bottom half routines start with bottom_irq_
14 * while the top half functions start with irq_
16 * The bottom system is only aware of the hardware interrupts, and whether they have
17 * occurred. The top half is responsible for accepting interrupts from the bottom
18 * half, and using them to notify top handlers.
22 /* A top-half interrupt handler is a plain C function that is called shortly after
23 * a bottom-half interrupt has occurred.
26 typedef struct irq_type irq_t;
27 typedef void (*irq_handler_t) (irq_t *);
29 /* An irq_t structure represents an interrupt and how it invokes top-half handlers.
32 irq_handler_t irq_handler;
34 priority_t irq_priority;
38 /* Manage interrupts; fire one */
39 void irq_fire (irq_t *irq);
41 /* Top-half operations to manipulate interrupts */
44 /* Bottom-half operations to manipulate interrupts */
45 void bottom_irq_start (void);
46 void bottom_irq_stop (void);
47 void bottom_irq_enable (irq_t *irq, irq_handler_t hdl);
48 void bottom_irq_disable (irq_t *irq);
49 void bottom_irq_wait (void);