source: rtems/bsps/lm32/include/bsp/irq.h @ cd5573c

Last change on this file since cd5573c was cd5573c, checked in by Sebastian Huber <sebastian.huber@…>, on 06/19/21 at 10:40:57

bsps/irq: Add BSP_INTERRUPT_VECTOR_COUNT

Assert BSP_INTERRUPT_VECTOR_MAX + 1 == BSP_INTERRUPT_VECTOR_COUNT.

After building all BSPs with this patch, BSP_INTERRUPT_VECTOR_MAX can be
removed and replaced by BSP_INTERRUPT_VECTOR_COUNT. The
BSP_INTERRUPT_VECTOR_COUNT allows a default implementation which supports no
interrupt vector at all. Using COUNT instead of MAX may avoid some
interpretation issues, for example is the maximum value a valid vector number
or not.

Update #3269.

  • Property mode set to 100644
File size: 772 bytes
Line 
1/**
2 * @file
3 *
4 * @ingroup bsp_interrupt
5 *
6 * @brief BSP interrupt support for LM32.
7 */
8
9/*
10 * Based on concepts of Pavel Pisa, Till Straumann and Eric Valette.
11 *
12 * Copyright (c) 2008, 2009, 2010
13 * embedded brains GmbH
14 * Obere Lagerstr. 30
15 * D-82178 Puchheim
16 * Germany
17 * <rtems@embedded-brains.de>
18 *
19 * The license and distribution terms for this file may be
20 * found in the file LICENSE in this distribution or at
21 * http://www.rtems.org/license/LICENSE.
22 */
23
24#ifndef LIBBSP_LM32_IRQ_CONFIG_H
25#define LIBBSP_LM32_IRQ_CONFIG_H
26
27#include <stdint.h>
28
29/**
30 * @addtogroup bsp_interrupt
31 *
32 * @{
33 */
34
35/**
36 * @brief Maximum vector number.
37 */
38#define BSP_INTERRUPT_VECTOR_MAX 31
39#define BSP_INTERRUPT_VECTOR_COUNT 32
40
41/** @} */
42
43#endif /* LIBBSP_LM32_IRQ_CONFIG_H */
Note: See TracBrowser for help on using the repository browser.