forked from Imagelibrary/rtems
shared-irq: add support for custom BSP vector verification
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
This commit is contained in:
committed by
Gedare Bloom
parent
b4dfce9b7a
commit
f636ba640e
@@ -134,6 +134,7 @@ static inline rtems_vector_number bsp_interrupt_handler_index(
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if !defined(BSP_INTERRUPT_CUSTOM_VALID_VECTOR)
|
||||
/**
|
||||
* @brief Returns true if the interrupt vector with number @a vector is valid.
|
||||
*/
|
||||
@@ -142,6 +143,7 @@ static inline bool bsp_interrupt_is_valid_vector(rtems_vector_number vector)
|
||||
return (rtems_vector_number) BSP_INTERRUPT_VECTOR_MIN <= vector
|
||||
&& vector <= (rtems_vector_number) BSP_INTERRUPT_VECTOR_MAX;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Default interrupt handler.
|
||||
|
||||
@@ -72,6 +72,14 @@
|
||||
typedef uint8_t bsp_interrupt_handler_index_type;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enable custom vector checking
|
||||
*
|
||||
* If defined the BSP must implement the custom bsp_interrupt_is_valid_vector()
|
||||
* vector validator check routine.
|
||||
*/
|
||||
#undef BSP_INTERRUPT_CUSTOM_VALID_VECTOR
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /* LIBBSP_SHARED_IRQ_CONFIG_H */
|
||||
|
||||
Reference in New Issue
Block a user