1 | /* intr.h |
---|
2 | * |
---|
3 | * This include file contains all the constants and structures associated |
---|
4 | * with the Interrupt Manager. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * All rights assigned to U.S. Government, 1994. |
---|
9 | * |
---|
10 | * This material may be reproduced by or for the U.S. Government pursuant |
---|
11 | * to the copyright license under the clause at DFARS 252.227-7013. This |
---|
12 | * notice must appear in all copies of this file and its derivatives. |
---|
13 | * |
---|
14 | * $Id$ |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef __RTEMS_INTERRUPT_h |
---|
18 | #define __RTEMS_INTERRUPT_h |
---|
19 | |
---|
20 | #ifdef __cplusplus |
---|
21 | extern "C" { |
---|
22 | #endif |
---|
23 | |
---|
24 | #include <rtems/score/isr.h> |
---|
25 | |
---|
26 | /* |
---|
27 | * Interrupt level type |
---|
28 | */ |
---|
29 | |
---|
30 | typedef ISR_Level rtems_interrupt_level; |
---|
31 | |
---|
32 | /* |
---|
33 | * The following type defines the control block used to manage |
---|
34 | * the vectors. |
---|
35 | */ |
---|
36 | |
---|
37 | typedef ISR_Vector_number rtems_vector_number; |
---|
38 | |
---|
39 | /* |
---|
40 | * Return type for ISR Handler |
---|
41 | */ |
---|
42 | |
---|
43 | typedef void rtems_isr; |
---|
44 | |
---|
45 | /* |
---|
46 | * Pointer to an ISR Handler |
---|
47 | */ |
---|
48 | |
---|
49 | typedef rtems_isr ( *rtems_isr_entry )( |
---|
50 | rtems_vector_number |
---|
51 | ); |
---|
52 | |
---|
53 | /* |
---|
54 | * _Interrupt_Manager_initialization |
---|
55 | * |
---|
56 | * DESCRIPTION: |
---|
57 | * |
---|
58 | * This routine initializes the interrupt manager. |
---|
59 | * |
---|
60 | */ |
---|
61 | |
---|
62 | void _Interrupt_Manager_initialization( void ); |
---|
63 | |
---|
64 | /* |
---|
65 | * rtems_interrupt_catch |
---|
66 | * |
---|
67 | * DESCRIPTION: |
---|
68 | * |
---|
69 | * This routine implements the rtems_interrupt_catch directive. This |
---|
70 | * directive installs new_isr_handler as the RTEMS interrupt service |
---|
71 | * routine for vector. The previous RTEMS interrupt service |
---|
72 | * routine is returned in old_isr_handler. |
---|
73 | */ |
---|
74 | |
---|
75 | rtems_status_code rtems_interrupt_catch( |
---|
76 | rtems_isr_entry new_isr_handler, |
---|
77 | rtems_vector_number vector, |
---|
78 | rtems_isr_entry *old_isr_handler |
---|
79 | ); |
---|
80 | |
---|
81 | /* |
---|
82 | * rtems_interrupt_disable |
---|
83 | * |
---|
84 | * DESCRIPTION: |
---|
85 | * |
---|
86 | * This routine disables all maskable interrupts and returns the |
---|
87 | * previous level in _isr_cookie. |
---|
88 | */ |
---|
89 | |
---|
90 | #define rtems_interrupt_disable( _isr_cookie ) \ |
---|
91 | _ISR_Disable(_isr_cookie) |
---|
92 | |
---|
93 | /* |
---|
94 | * rtems_interrupt_enable |
---|
95 | * |
---|
96 | * DESCRIPTION: |
---|
97 | * |
---|
98 | * This routine enables maskable interrupts to the level indicated |
---|
99 | * _isr_cookie. |
---|
100 | */ |
---|
101 | |
---|
102 | #define rtems_interrupt_enable( _isr_cookie ) \ |
---|
103 | _ISR_Enable(_isr_cookie) |
---|
104 | |
---|
105 | /* |
---|
106 | * rtems_interrupt_flash |
---|
107 | * |
---|
108 | * DESCRIPTION: |
---|
109 | * |
---|
110 | * This routine temporarily enables maskable interrupts to the |
---|
111 | * level in _isr_cookie before redisabling them. |
---|
112 | */ |
---|
113 | |
---|
114 | #define rtems_interrupt_flash( _isr_cookie ) \ |
---|
115 | _ISR_Flash(_isr_cookie) |
---|
116 | |
---|
117 | /* |
---|
118 | * rtems_interrupt_cause |
---|
119 | * |
---|
120 | * DESCRIPTION: |
---|
121 | * |
---|
122 | * This routine generates an interrupt. |
---|
123 | * |
---|
124 | * NOTE: No implementation. |
---|
125 | */ |
---|
126 | |
---|
127 | #define rtems_interrupt_cause( _interrupt_to_cause ) |
---|
128 | |
---|
129 | /* |
---|
130 | * rtems_interrupt_cause |
---|
131 | * |
---|
132 | * DESCRIPTION: |
---|
133 | * |
---|
134 | * This routine clears the specified interrupt. |
---|
135 | * |
---|
136 | * NOTE: No implementation. |
---|
137 | */ |
---|
138 | |
---|
139 | #define rtems_interrupt_clear( _interrupt_to_clear ) |
---|
140 | |
---|
141 | #ifdef __cplusplus |
---|
142 | } |
---|
143 | #endif |
---|
144 | |
---|
145 | #endif |
---|
146 | /* end of include file */ |
---|