RTEMS: bsps/sparc/leon3/include/bsp/irq.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
irq.h
Go to the documentation of this file.
1
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
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 */
rtems_vector_number
ISR_Vector_number rtems_vector_number
Control block type used to manage the vectors.
Definition: intr.h:47
processormask.h
Processor Mask API.