bsps/irq: Use BSP_INTERRUPT_VECTOR_COUNT

Use BSP_INTERRUPT_VECTOR_COUNT instead of BSP_INTERRUPT_VECTOR_MAX.

Update #3269.
This commit is contained in:
Sebastian Huber
2021-06-19 12:51:58 +02:00
parent 049e2b64e1
commit 3fee662093
16 changed files with 22 additions and 22 deletions

View File

@@ -132,8 +132,8 @@ static inline rtems_vector_number bsp_interrupt_handler_index(
* @brief Generic BSP Interrupt Support
*
* The BSP interrupt support manages a sequence of interrupt vector numbers
* ranging from zero to @ref BSP_INTERRUPT_VECTOR_MAX
* including the end points. It provides methods to
* greater than or equal to zero and less than @ref BSP_INTERRUPT_VECTOR_COUNT
* It provides methods to
* @ref bsp_interrupt_handler_install() "install",
* @ref bsp_interrupt_handler_remove() "remove" and
* @ref bsp_interrupt_handler_dispatch() "dispatch" interrupt handlers for each
@@ -144,7 +144,7 @@ static inline rtems_vector_number bsp_interrupt_handler_index(
*
* You have to configure the BSP interrupt support in the <bsp/irq.h> file
* for each BSP. For a minimum configuration you have to provide
* @ref BSP_INTERRUPT_VECTOR_MAX.
* @ref BSP_INTERRUPT_VECTOR_COUNT.
*
* For boards with small memory requirements you can define
* @ref BSP_INTERRUPT_USE_INDEX_TABLE. With an enabled index table the handler
@@ -179,7 +179,7 @@ static inline rtems_vector_number bsp_interrupt_handler_index(
*/
static inline bool bsp_interrupt_is_valid_vector(rtems_vector_number vector)
{
return vector <= (rtems_vector_number) BSP_INTERRUPT_VECTOR_MAX;
return vector < (rtems_vector_number) BSP_INTERRUPT_VECTOR_COUNT;
}
#endif