From 64e32a88a18c3ff6790578a62249b40411c829d9 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 29 Oct 2018 23:34:26 -0700 Subject: irq: change the IRQ interface to use struct z80_irq consistently It is better than to futz with numeric priority levels, even though it otherwise would be theoretically possible to use a shared z80_irq structure for more than one interrupt: it is simply not worth it. Using struct z80_irq * consistently makes for a more flexible API in the future. --- z80irq.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'z80irq.h') diff --git a/z80irq.h b/z80irq.h index 9e2c1dc..f4f8c1e 100644 --- a/z80irq.h +++ b/z80irq.h @@ -4,14 +4,14 @@ #include "compiler.h" #include "z80.h" -typedef int (*irq_func)(unsigned int prio, struct z80_irq *irq); +typedef int (*irq_func)(struct z80_irq *irq); struct z80_irq { irq_func intack; irq_func eoi; void *pvt; /* Available for user */ int vector; /* Available for user if intack defined */ - unsigned int prio; /* Available for user after register_irq */ + unsigned int prio; /* Priority level */ }; #define MAX_IRQ 32 @@ -25,7 +25,7 @@ static inline bool poll_irq(void) void z80_register_irq(struct z80_irq *irq); int z80_intack(void); void z80_eoi(void); -bool z80_interrupt(unsigned int prio); -bool z80_clear_interrupt(unsigned int prio); +bool z80_interrupt(struct z80_irq *irq); +bool z80_clear_interrupt(struct z80_irq *irq); #endif /* Z80IRQ_H */ -- cgit v1.2.3