aboutsummaryrefslogtreecommitdiffstats
path: root/z80irq.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-11-14 14:25:15 -0800
committerH. Peter Anvin <hpa@zytor.com>2018-11-14 14:25:15 -0800
commit81cb41fb4eb2607a28554134e15e316bd92b61df (patch)
tree8ae0c0035435a69e8d53d99a6cd68581115b8344 /z80irq.h
parent4e88763a0174154e0162103af5fad0cae59ef7bd (diff)
downloadabc80sim-81cb41fb4eb2607a28554134e15e316bd92b61df.tar.gz
abc80sim-81cb41fb4eb2607a28554134e15e316bd92b61df.tar.xz
abc80sim-81cb41fb4eb2607a28554134e15e316bd92b61df.zip
Run Nindent for consistent C code style
Diffstat (limited to 'z80irq.h')
-rw-r--r--z80irq.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/z80irq.h b/z80irq.h
index 9555ef9..3a04a5b 100644
--- a/z80irq.h
+++ b/z80irq.h
@@ -4,15 +4,15 @@
#include "compiler.h"
#include "z80.h"
-typedef int (*irq_func)(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 */
- int16_t vector; /* Available for user if intack defined */
- uint8_t prio; /* Priority level */
- bool handled; /* In handler (between INTACK and EOI) */
+ void *pvt; /* Available for user */
+ int16_t vector; /* Available for user if intack defined */
+ uint8_t prio; /* Priority level */
+ bool handled; /* In handler (between INTACK and EOI) */
};
#define IRQ(prio, intack, eoi, pvt) \
@@ -21,7 +21,7 @@ struct z80_irq {
#define MAX_IRQ 32
extern volatile unsigned int irq_pending;
-extern unsigned int irq_mask; /* 0 = inside handler (irq->handled == true) */
+extern unsigned int irq_mask; /* 0 = inside handler (irq->handled == true) */
static inline bool poll_irq(void)
{
@@ -33,11 +33,12 @@ int z80_intack(void);
void z80_eoi(void);
static inline void z80_interrupt(struct z80_irq *irq)
{
- atomic_set_bit(&irq_pending, irq->prio);
+ atomic_set_bit(&irq_pending, irq->prio);
}
+
static inline void z80_clear_interrupt(struct z80_irq *irq)
{
- atomic_clear_bit(&irq_pending, irq->prio);
+ atomic_clear_bit(&irq_pending, irq->prio);
}
#endif /* Z80IRQ_H */