shared-irq: add support for custom BSP vector verification

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
This commit is contained in:
Daniel Hellstrom
2012-02-06 15:15:48 +01:00
committed by Gedare Bloom
parent b4dfce9b7a
commit f636ba640e
2 changed files with 10 additions and 0 deletions

View File

@@ -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.

View File

@@ -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 */