aboutsummaryrefslogtreecommitdiffstats
path: root/src/generic/irq.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-06-08 21:13:53 -0400
committerKevin O'Connor <kevin@koconnor.net>2016-06-13 23:18:59 -0400
commitfa85094cbb139c734150802b02e22913abcfccb3 (patch)
tree980eccc8282acfb602a96523488f033bb368fcd4 /src/generic/irq.h
parent9dd101c26fff95e596039d6168d4ad25e080071c (diff)
downloadkutter-fa85094cbb139c734150802b02e22913abcfccb3.tar.gz
kutter-fa85094cbb139c734150802b02e22913abcfccb3.tar.xz
kutter-fa85094cbb139c734150802b02e22913abcfccb3.zip
irq: Allow boards to define the return type of irq_save()
The AVR wants a uint8_t return type for irq_save(), but other architectures will generally prefer int. Allow the board to configure the size of the flag by introducing an irqstatus_t typedef. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/generic/irq.h')
-rw-r--r--src/generic/irq.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/generic/irq.h b/src/generic/irq.h
index 597ff96d..0a56c657 100644
--- a/src/generic/irq.h
+++ b/src/generic/irq.h
@@ -3,9 +3,11 @@
#include <stdint.h>
+typedef unsigned long irqstatus_t;
+
void irq_disable(void);
void irq_enable(void);
-uint8_t irq_save(void);
-void irq_restore(uint8_t flag);
+irqstatus_t irq_save(void);
+void irq_restore(irqstatus_t flag);
#endif // irq.h