43#ifndef LIBBSP_SHARED_IRQ_GENERIC_H
44#define LIBBSP_SHARED_IRQ_GENERIC_H
61#if !defined(BSP_INTERRUPT_VECTOR_MIN) || !defined(BSP_INTERRUPT_VECTOR_MAX) || (BSP_INTERRUPT_VECTOR_MAX + 1) < BSP_INTERRUPT_VECTOR_MIN
62 #error "invalid BSP_INTERRUPT_VECTOR_MIN or BSP_INTERRUPT_VECTOR_MAX"
65#if defined(BSP_INTERRUPT_USE_INDEX_TABLE) && !defined(BSP_INTERRUPT_HANDLER_TABLE_SIZE)
66 #error "if you define BSP_INTERRUPT_USE_INDEX_TABLE, you have to define BSP_INTERRUPT_HANDLER_TABLE_SIZE etc. as well"
69#if defined(BSP_INTERRUPT_NO_HEAP_USAGE) && !defined(BSP_INTERRUPT_USE_INDEX_TABLE)
70 #error "if you define BSP_INTERRUPT_NO_HEAP_USAGE, you have to define BSP_INTERRUPT_USE_INDEX_TABLE etc. as well"
73#define BSP_INTERRUPT_VECTOR_NUMBER \
74 (BSP_INTERRUPT_VECTOR_MAX - BSP_INTERRUPT_VECTOR_MIN + 1)
76#ifndef BSP_INTERRUPT_HANDLER_TABLE_SIZE
77 #define BSP_INTERRUPT_HANDLER_TABLE_SIZE BSP_INTERRUPT_VECTOR_NUMBER
82 #define bsp_interrupt_disable(level) do { (void) level; } while (0)
83 #define bsp_interrupt_enable(level) do { } while (0)
84 #define bsp_interrupt_fence(order) _Atomic_Fence(order)
86 #define bsp_interrupt_disable(level) rtems_interrupt_disable(level)
87 #define bsp_interrupt_enable(level) rtems_interrupt_enable(level)
88 #define bsp_interrupt_fence(order) do { } while (0)
91#define bsp_interrupt_assert(e) _Assert(e)
104#ifdef BSP_INTERRUPT_USE_INDEX_TABLE
105 #if BSP_INTERRUPT_HANDLER_TABLE_SIZE < 0x100
106 typedef uint8_t bsp_interrupt_handler_index_type;
107 #elif BSP_INTERRUPT_HANDLER_TABLE_SIZE < 0x10000
108 typedef uint16_t bsp_interrupt_handler_index_type;
110 typedef uint32_t bsp_interrupt_handler_index_type;
112 extern bsp_interrupt_handler_index_type bsp_interrupt_handler_index_table [];
119 #ifdef BSP_INTERRUPT_USE_INDEX_TABLE
120 return bsp_interrupt_handler_index_table [vector - BSP_INTERRUPT_VECTOR_MIN];
122 return vector - BSP_INTERRUPT_VECTOR_MIN;
176#ifdef BSP_INTERRUPT_CUSTOM_VALID_VECTOR
277 if (bsp_interrupt_is_valid_vector(vector)) {
279 &bsp_interrupt_handler_table [bsp_interrupt_handler_index(vector)];
286 bsp_interrupt_fence(ATOMIC_ORDER_ACQUIRE);
287 handler =
e->handler;
311void bsp_interrupt_lock(
void);
314void bsp_interrupt_unlock(
void);
Information for the Assert Handler.
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77
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
bool bsp_interrupt_handler_is_empty(rtems_vector_number vector)
Is interrupt handler empty.
Definition: irq-generic.c:561
void bsp_interrupt_handler_default(rtems_vector_number vector)
Default interrupt handler.
Definition: irq.c:160
void bsp_interrupt_vector_disable(rtems_vector_number vector)
Disables the interrupt vector with number vector.
Definition: irq.c:110
void bsp_interrupt_vector_enable(rtems_vector_number vector)
Enables the interrupt vector with number vector.
Definition: irq.c:98
rtems_status_code bsp_interrupt_facility_initialize(void)
BSP specific initialization.
Definition: irq.c:122
void bsp_interrupt_initialize(void)
Initialize BSP interrupt support.
Definition: irq-generic.c:173
void(* rtems_interrupt_handler)(void *)
Interrupt handler routine type.
Definition: irq-extension.h:79
Header file for the Interrupt Manager Extension.
Definition: irq-generic.h:93
unsigned e
Definition: tlb.h:13