27 #ifndef LIBBSP_SHARED_IRQ_GENERIC_H 28 #define LIBBSP_SHARED_IRQ_GENERIC_H 33 #include <rtems/score/assert.h> 45 #if !defined(BSP_INTERRUPT_VECTOR_MIN) || !defined(BSP_INTERRUPT_VECTOR_MAX) || (BSP_INTERRUPT_VECTOR_MAX + 1) < BSP_INTERRUPT_VECTOR_MIN 46 #error "invalid BSP_INTERRUPT_VECTOR_MIN or BSP_INTERRUPT_VECTOR_MAX" 49 #if defined(BSP_INTERRUPT_USE_INDEX_TABLE) && !defined(BSP_INTERRUPT_HANDLER_TABLE_SIZE) 50 #error "if you define BSP_INTERRUPT_USE_INDEX_TABLE, you have to define BSP_INTERRUPT_HANDLER_TABLE_SIZE etc. as well" 53 #if defined(BSP_INTERRUPT_NO_HEAP_USAGE) && !defined(BSP_INTERRUPT_USE_INDEX_TABLE) 54 #error "if you define BSP_INTERRUPT_NO_HEAP_USAGE, you have to define BSP_INTERRUPT_USE_INDEX_TABLE etc. as well" 57 #define BSP_INTERRUPT_VECTOR_NUMBER \ 58 (BSP_INTERRUPT_VECTOR_MAX - BSP_INTERRUPT_VECTOR_MIN + 1) 60 #ifndef BSP_INTERRUPT_HANDLER_TABLE_SIZE 61 #define BSP_INTERRUPT_HANDLER_TABLE_SIZE BSP_INTERRUPT_VECTOR_NUMBER 66 #define bsp_interrupt_disable(level) do { (void) level; } while (0) 67 #define bsp_interrupt_enable(level) do { } while (0) 68 #define bsp_interrupt_fence(order) _Atomic_Fence(order) 70 #define bsp_interrupt_disable(level) rtems_interrupt_disable(level) 71 #define bsp_interrupt_enable(level) rtems_interrupt_enable(level) 72 #define bsp_interrupt_fence(order) do { } while (0) 75 #define bsp_interrupt_assert(e) _Assert(e) 86 extern bsp_interrupt_handler_entry bsp_interrupt_handler_table [];
88 #ifdef BSP_INTERRUPT_USE_INDEX_TABLE 89 #if BSP_INTERRUPT_HANDLER_TABLE_SIZE < 0x100 90 typedef uint8_t bsp_interrupt_handler_index_type;
91 #elif BSP_INTERRUPT_HANDLER_TABLE_SIZE < 0x10000 92 typedef uint16_t bsp_interrupt_handler_index_type;
94 typedef uint32_t bsp_interrupt_handler_index_type;
96 extern bsp_interrupt_handler_index_type bsp_interrupt_handler_index_table [];
103 #ifdef BSP_INTERRUPT_USE_INDEX_TABLE 104 return bsp_interrupt_handler_index_table [vector - BSP_INTERRUPT_VECTOR_MIN];
106 return vector - BSP_INTERRUPT_VECTOR_MIN;
160 #ifdef BSP_INTERRUPT_CUSTOM_VALID_VECTOR 261 if (bsp_interrupt_is_valid_vector(vector)) {
262 const bsp_interrupt_handler_entry *
e =
263 &bsp_interrupt_handler_table [bsp_interrupt_handler_index(vector)];
270 bsp_interrupt_fence(ATOMIC_ORDER_ACQUIRE);
271 handler = e->handler;
295 void bsp_interrupt_lock(
void);
298 void bsp_interrupt_unlock(
void);
Definition: irq-generic.h:77
void bsp_interrupt_vector_disable(rtems_vector_number vector)
Disables the interrupt vector with number vector.
Definition: irq.c:110
bool bsp_interrupt_handler_is_empty(rtems_vector_number vector)
Is interrupt handler empty.
Definition: irq-generic.c:549
ISR_Vector_number rtems_vector_number
Control block type used to manage the vectors.
Definition: intr.h:47
rtems_status_code
Classic API Status.
Definition: status.h:43
Header file for the Interrupt Manager Extension.
void bsp_interrupt_handler_default(rtems_vector_number vector)
Default interrupt handler.
Definition: irq.c:158
unsigned e
Definition: tlb.h:223
void(* rtems_interrupt_handler)(void *)
Interrupt handler routine type.
Definition: irq-extension.h:85
void bsp_interrupt_initialize(void)
Initialize BSP interrupt support.
Definition: irq-generic.c:161
rtems_status_code bsp_interrupt_facility_initialize(void)
BSP specific initialization.
Definition: irq.c:122
void bsp_interrupt_vector_enable(rtems_vector_number vector)
Enables the interrupt vector with number vector.
Definition: irq.c:98
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77