00001 /* 00002 * "Copyright (c) 2008 Robert B. Reese, Bryan A. Jones, J. W. Bruce ("AUTHORS")" 00003 * All rights reserved. 00004 * (R. Reese, reese_AT_ece.msstate.edu, Mississippi State University) 00005 * (B. A. Jones, bjones_AT_ece.msstate.edu, Mississippi State University) 00006 * (J. W. Bruce, jwbruce_AT_ece.msstate.edu, Mississippi State University) 00007 * 00008 * Permission to use, copy, modify, and distribute this software and its 00009 * documentation for any purpose, without fee, and without written agreement is 00010 * hereby granted, provided that the above copyright notice, the following 00011 * two paragraphs and the authors appear in all copies of this software. 00012 * 00013 * IN NO EVENT SHALL THE "AUTHORS" BE LIABLE TO ANY PARTY FOR 00014 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT 00015 * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE "AUTHORS" 00016 * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00017 * 00018 * THE "AUTHORS" SPECIFICALLY DISCLAIMS ANY WARRANTIES, 00019 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 00020 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 00021 * ON AN "AS IS" BASIS, AND THE "AUTHORS" HAS NO OBLIGATION TO 00022 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." 00023 * 00024 * Please maintain this header in its entirety when copying/modifying 00025 * these files. 00026 * 00027 * 00028 */ 00029 00036 #ifndef ESOS_IRQ_H 00037 #define ESOS_IRQ_H 00038 00039 //#include "user_config.h" 00040 #include "all_generic.h" 00041 00042 void _esos_hw_InitUserInterrupts(void); 00043 00044 00045 #if 0 00046 // a helpful macro used to declare and prototype user ISRs 00047 #define ESOS_USER_ISR(fcn) void fcn(void) 00048 00049 // Prototypes for all the hardware specific routines we expect 00057 void esos_EnableVerifiedUserInterrupt( uint16 u16_desc ); 00058 void _esos_hw_DisableAllUserInterrupts(void); 00059 void _esos_hw_EnableAllUserInterrupts(void); 00060 void _esos_hw_InitUserInterrupts(void); 00061 uint8 _esos_hw_IsUserInterruptEnabled(uint16 u16_desc ); 00062 uint8 _esos_hw_IsUserInterruptFlagSet(uint16 u16_desc ); 00063 00074 void esos_UnregisterUserInterrupt( uint16 u16_desc ); 00075 00089 void esos_RegisterUserInterrupt( uint16 u16_desc, uint8 u8_IPL, void (*p2f)(void) ); 00090 00091 void _esos_DoNothingIsr(void); 00092 void _esos_hw_DoNothingIsr(void); 00093 00094 // Map the HW-specific routine names into osXXXXXX ones 00095 //#define esos_InitUserInterrupts _esos_hw_InitUserInterrupts 00096 00103 #define esos_DisableAllUserInterrupts _esos_hw_DisableAllUserInterrupts 00104 00110 #define esos_EnableAllUserInterrupts _esos_hw_EnableAllUserInterrupts 00111 00125 #define esos_IsUserInterruptEnabled _esos_hw_IsUserInterruptEnabled 00126 00137 #define esos_DoesUserInterruptNeedServicing _esos_hw_IsUserInterruptFlagSet 00138 00147 #define esos_MarkUserInterruptServiced _esos_hw_ClearUserInterruptFlag 00148 00160 #define esos_EnableUserInterrupt _esos_hw_EnableUserInterrupt 00161 00173 #define esos_DisableUserInterrupt _esos_hw_DisableUserInterrupt 00174 00175 /* 00176 * And define the private data storage we need 00177 */ 00178 //extern void (*__esos_IsrFcns[NUM_USER_IRQS])(void); 00179 00180 #endif // IF 0 00181 00182 #endif // ESOS_IRQ_H