Go to the documentation of this file.
41 #ifndef _iARCH_CORTEX_INTERRUPT_H_
42 #define _iARCH_CORTEX_INTERRUPT_H_ 1
44 #if defined ( __CC_ARM )
49 #elif (defined (__ICCARM__))
54 #define ISR_HANDLER_PROTO(name) \
57 #elif (defined (__GNUC__))
59 #define ISR_HANDLER_PROTO(name) \
60 void name (void) __attribute__ ((section (".text.keep.vector")))
62 #define ISR_HANDLER(name) void name (void)
65 #define FIQ_HANDLER_PROTO(name) \
66 void name (void) __attribute__ ((interrupt("FIQ")))
68 #define FIQ_HANDLER(name) void name (void)
70 #define UNDEF_HANDLER_PROTO(name) \
71 void name (void) __attribute__ ((interrupt("UNDEF")))
73 #define SWI_HANDLER_PROTO(name) \
74 void name (void) __attribute__ ((interrupt("SWI")))
76 #ifdef iSCHEDULER_TYPE
78 #if (iSCHEDULER_TYPE == iPREEMPETIVE_SCHEDULER)
83 #ifdef configUSE_PREEMPTION
84 #if (configUSE_PREEMPTION == 1)
86 #define dri_make_asm_call_here(STRING) \
87 __asm volatile ("bl " #STRING)
90 #define ISR_IRQ_OS_PROTO(function_name) \
91 void function_name##_IRQHandler ( void ) \
92 __attribute__ ((naked));\
93 void function_name##_IRQHandler_internal( void ) \
94 __attribute__ ((noinline)) \
99 #define ISR_IRQ_OS(function_name) \
100 void function_name##_IRQHandler ( void ) \
102 portSAVE_CONTEXT(); \
103 dri_make_asm_call_here (function_name##_IRQHandler_internal) ; \
104 portRESTORE_CONTEXT(); \
107 void function_name##_IRQHandler_internal( void )
112 #elif (defined (__TASKING__))
128 #ifndef ISR_EXCEPTION_PROTOint
129 #define ISR_EXCEPTION_PROTOint(name) ISR_HANDLER_PROTO(name##_Handler)
131 #ifndef ISR_EXCEPTION_PROTO
132 #define ISR_EXCEPTION_PROTO(name) ISR_EXCEPTION_PROTOint(name)
134 #ifndef ISR_EXCEPTION
135 #define ISR_EXCEPTION(name) ISR_HANDLER(name##_Handler)
138 #ifndef ISR_IRQ_PROTOint
139 #define ISR_IRQ_PROTOint(name) ISR_HANDLER_PROTO(name##_IRQHandler)
142 #ifndef ISR_IRQ_PROTO
143 #define ISR_IRQ_PROTO(name) ISR_IRQ_PROTOint(name)
147 #define ISR_IRQint(name) ISR_HANDLER(name##_IRQHandler)
151 #define ISR_IRQ(name) ISR_IRQint(name)