|
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
#ifdef __cplusplus |
|
|
extern "C" void (* _VectorsRam[NVIC_NUM_INTERRUPTS+16])(void); |
|
|
extern "C" void (* _VectorsRam[NVIC_NUM_INTERRUPTS+16])(void); |
|
|
static inline void attachInterruptVector(IRQ_NUMBER_t irq, void (*function)(void)) __attribute__((always_inline, unused)); |
|
|
static inline void attachInterruptVector(IRQ_NUMBER_t irq, void (*function)(void)) __attribute__((always_inline, unused)); |
|
|
static inline void attachInterruptVector(IRQ_NUMBER_t irq, void (*function)(void)) { _VectorsRam[irq + 16] = function; } |
|
|
|
|
|
|
|
|
static inline void attachInterruptVector(IRQ_NUMBER_t irq, void (*function)(void)) { _VectorsRam[irq + 16] = function; asm volatile("": : :"memory"); } |
|
|
#else |
|
|
#else |
|
|
extern void (* _VectorsRam[NVIC_NUM_INTERRUPTS+16])(void); |
|
|
extern void (* _VectorsRam[NVIC_NUM_INTERRUPTS+16])(void); |
|
|
static inline void attachInterruptVector(enum IRQ_NUMBER_t irq, void (*function)(void)) __attribute__((always_inline, unused)); |
|
|
static inline void attachInterruptVector(enum IRQ_NUMBER_t irq, void (*function)(void)) __attribute__((always_inline, unused)); |
|
|
static inline void attachInterruptVector(enum IRQ_NUMBER_t irq, void (*function)(void)) { _VectorsRam[irq + 16] = function; } |
|
|
|
|
|
|
|
|
static inline void attachInterruptVector(enum IRQ_NUMBER_t irq, void (*function)(void)) { _VectorsRam[irq + 16] = function; asm volatile("": : :"memory"); } |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|