ESOS32
ESOSOn32-bitProcessors
esos_irq.h
Go to the documentation of this file.
1 /*
2  * "Copyright (c) 2019 J. W. Bruce ("AUTHOR(S)")"
3  * All rights reserved.
4  * (J. W. Bruce, jwbruce_AT_tntech.edu, Tennessee Tech University)
5  *
6  * Permission to use, copy, modify, and distribute this software and its
7  * documentation for any purpose, without fee, and without written agreement is
8  * hereby granted, provided that the above copyright notice, the following
9  * two paragraphs and the authors appear in all copies of this software.
10  *
11  * IN NO EVENT SHALL THE "AUTHORS" BE LIABLE TO ANY PARTY FOR
12  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
13  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE "AUTHORS"
14  * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15  *
16  * THE "AUTHORS" SPECIFICALLY DISCLAIMS ANY WARRANTIES,
17  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
18  * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
19  * ON AN "AS IS" BASIS, AND THE "AUTHORS" HAS NO OBLIGATION TO
20  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
21  *
22  * Please maintain this header in its entirety when copying/modifying
23  * these files.
24  *
25  *
26  */
27 
34 #ifndef ESOS_IRQ_H
35 #define ESOS_IRQ_H
36 
37 //#include "user_config.h"
38 #include "all_generic.h"
39 
40 #define NUM_USER_IRQS 16
41 
42 void _esos_hw_InitUserInterrupts(void);
43 
44 #if 0
45 // a helpful macro used to declare and prototype user ISRs
46 #define ESOS_USER_ISR(fcn) void fcn(void)
47 
48 // Prototypes for all the hardware specific routines we expect
56 void esos_EnableVerifiedUserInterrupt( uint16_t u16_desc );
57 void _esos_hw_DisableAllUserInterrupts(void);
58 void _esos_hw_EnableAllUserInterrupts(void);
59 void _esos_hw_InitUserInterrupts(void);
60 uint8_t _esos_hw_IsUserInterruptEnabled(uint16_t u16_desc );
61 uint8_t _esos_hw_IsUserInterruptFlagSet(uint16_t u16_desc );
62 
73 void esos_UnregisterUserInterrupt( uint16_t u16_desc );
74 
88 void esos_RegisterUserInterrupt( uint16_t u16_desc, uint8_t u8_IPL, void (*p2f)(void) );
89 
90 void _esos_DoNothingIsr(void);
91 void _esos_hw_DoNothingIsr(void);
92 
93 // Map the HW-specific routine names into osXXXXXX ones
94 //#define esos_InitUserInterrupts _esos_hw_InitUserInterrupts
95 
102 #define esos_DisableAllUserInterrupts _esos_hw_DisableAllUserInterrupts
103 
109 #define esos_EnableAllUserInterrupts _esos_hw_EnableAllUserInterrupts
110 
124 #define esos_IsUserInterruptEnabled _esos_hw_IsUserInterruptEnabled
125 
136 #define esos_DoesUserInterruptNeedServicing _esos_hw_IsUserInterruptFlagSet
137 
146 #define esos_MarkUserInterruptServiced _esos_hw_ClearUserInterruptFlag
147 
159 #define esos_EnableUserInterrupt _esos_hw_EnableUserInterrupt
160 
172 #define esos_DisableUserInterrupt _esos_hw_DisableUserInterrupt
173 
174 /*
175  * And define the private data storage we need
176  */
177 //extern void (*__esos_IsrFcns[NUM_USER_IRQS])(void);
178 
179 #endif // IF 0
180 
181 #endif // ESOS_IRQ_H
all_generic.h
Embedded Systems Operating System 32 bit (ESOS32) definitions to make ESOS32 code more generic and po...