27 #ifndef LIBBSP_SHARED_IRQ_GENERIC_H 28 #define LIBBSP_SHARED_IRQ_GENERIC_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) 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 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);
void bsp_interrupt_vector_disable(rtems_vector_number vector)
Disables the interrupt vector with number vector.
bool bsp_interrupt_handler_is_empty(rtems_vector_number vector)
Is interrupt handler empty.
static void bsp_interrupt_handler_dispatch(rtems_vector_number vector)
Sequencially calls all interrupt handlers for the vector number vector.
Information for the Assert Handler.
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Header file for the Interrupt Manager Extension.
void bsp_interrupt_handler_default(rtems_vector_number vector)
Default interrupt handler.
static bool bsp_interrupt_is_valid_vector(rtems_vector_number vector)
Returns true if the interrupt vector with number vector is valid.
void(* rtems_interrupt_handler)(void *)
Interrupt handler routine type.
void bsp_interrupt_initialize(void)
Initialize BSP interrupt support.
LEON3 generic shared IRQ setup.
ISR_Vector_number rtems_vector_number
%
rtems_status_code bsp_interrupt_facility_initialize(void)
BSP specific initialization.
void bsp_interrupt_vector_enable(rtems_vector_number vector)
Enables the interrupt vector with number vector.