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>
14 lines
234 B
C
14 lines
234 B
C
#ifndef __GENERIC_IRQ_H
|
|
#define __GENERIC_IRQ_H
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef unsigned long irqstatus_t;
|
|
|
|
void irq_disable(void);
|
|
void irq_enable(void);
|
|
irqstatus_t irq_save(void);
|
|
void irq_restore(irqstatus_t flag);
|
|
|
|
#endif // irq.h
|