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>
This commit is contained in:
Kevin O'Connor
2016-06-08 21:13:53 -04:00
parent 9dd101c26f
commit fa85094cbb
8 changed files with 33 additions and 25 deletions

View File

@@ -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