source: rtems/c/src/lib/libbsp/sparc/leon3/include/bsp/irq.h @ e19da87

5
Last change on this file since e19da87 was e19da87, checked in by Sebastian Huber <sebastian.huber@…>, on Jul 12, 2017 at 8:55:59 AM

bsps: Include missing header file

Update #3071.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/**
2 * @file
3 * @ingroup sparc_leon3
4 * @brief LEON3 generic shared IRQ setup
5 *
6 * Based on libbsp/shared/include/irq.h.
7 */
8
9/*
10 * Copyright (c) 2012.
11 * Aeroflex Gaisler AB.
12 *
13 * The license and distribution terms for this file may be
14 * found in the file LICENSE in this distribution or at
15 * http://www.rtems.org/license/LICENSE.
16 */
17
18#ifndef LIBBSP_LEON3_IRQ_CONFIG_H
19#define LIBBSP_LEON3_IRQ_CONFIG_H
20
21#include <leon.h>
22#include <rtems/score/processormask.h>
23
24#define BSP_INTERRUPT_VECTOR_MAX_STD 15 /* Standard IRQ controller */
25#define BSP_INTERRUPT_VECTOR_MAX_EXT 31 /* Extended IRQ controller */
26
27#define BSP_INTERRUPT_VECTOR_MIN 0
28#define BSP_INTERRUPT_VECTOR_MAX BSP_INTERRUPT_VECTOR_MAX_EXT
29
30/* The check is different depending on IRQ controller, runtime detected */
31#define BSP_INTERRUPT_CUSTOM_VALID_VECTOR
32
33/**
34 * @brief Returns true if the interrupt vector with number @a vector is valid.
35 */
36static inline bool bsp_interrupt_is_valid_vector(rtems_vector_number vector)
37{
38  return (rtems_vector_number) BSP_INTERRUPT_VECTOR_MIN <= vector
39    && ((vector <= (rtems_vector_number) BSP_INTERRUPT_VECTOR_MAX_STD &&
40        LEON3_IrqCtrl_EIrq == 0) ||
41       (vector <= (rtems_vector_number) BSP_INTERRUPT_VECTOR_MAX_EXT &&
42        LEON3_IrqCtrl_EIrq != 0));
43}
44
45void bsp_interrupt_set_affinity(
46  rtems_vector_number vector,
47  const Processor_mask *affinity
48);
49
50void bsp_interrupt_get_affinity(
51  rtems_vector_number vector,
52  Processor_mask *affinity
53);
54
55#endif /* LIBBSP_LEON3_IRQ_CONFIG_H */
Note: See TracBrowser for help on using the repository browser.