pi1541/interrupt.h

30 lines
602 B
C
Raw Normal View History

2018-05-20 04:53:34 +00:00
#ifndef interrupt_h
#define interrupt_h
#ifdef __cplusplus
extern "C" {
#endif
#include "rpi-interrupts.h"
#define EnableInterrupts() __asm volatile ("cpsie i")
#define DisableInterrupts() __asm volatile ("cpsid i")
typedef void IRQHandler(void* param);
void InterruptSystemInitialize();
void InterruptSystemConnectIRQ(unsigned IRQIndex, IRQHandler* handler, void* param);
void InterruptSystemDisconnectIRQ(unsigned IRQIndex);
void InterruptSystemEnableIRQ(unsigned IRQIndex);
void InterruptSystemDisableIRQ(unsigned IRQIndex);
void InterruptHandler(void);
#ifdef __cplusplus
}
#endif
#endif