The SGADE Documentation

the SGADE The Socrates Gameboy Advance Development Engine

The SGADE is a development library for the Nintendo Gameboy Advance. It's free for all uses and is distributed without guarantees. For more information visit the SGADE page.


Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

SoIntManager.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00012 // ----------------------------------------------------------------------------
00013 
00014 #ifndef SO_INTERRUPT_MANAGER_H
00015 #define SO_INTERRUPT_MANAGER_H
00016 
00017 #ifdef __cplusplus
00018     extern "C" {
00019 #endif
00020 
00021 
00022 // ---------------------------------------------------------------------------- //! @{
00042 // ----------------------------------------------------------------------------
00043 
00044 // ----------------------------------------------------------------------------
00045 // Includes
00046 // ----------------------------------------------------------------------------
00047 
00048 #include "SoSystem.h"
00049 #include "SoDisplay.h"
00050 
00051 // ----------------------------------------------------------------------------
00052 // Defines
00053 // ----------------------------------------------------------------------------
00054 
00055 // ---------------------------------------//@{   
00068 // ---------------------------------------
00069 #define SO_INTERRUPT_TYPE_VBLANK    0   
00070 #define SO_INTERRUPT_TYPE_HBLANK    1   
00071 #define SO_INTERRUPT_TYPE_VTRIGGER  2   
00072 #define SO_INTERRUPT_TYPE_TIMER_0   3   
00073 #define SO_INTERRUPT_TYPE_TIMER_1   4   
00074 #define SO_INTERRUPT_TYPE_TIMER_2   5   
00075 #define SO_INTERRUPT_TYPE_TIMER_3   6   
00076 #define SO_INTERRUPT_TYPE_SERIAL    7 
00077 #define SO_INTERRUPT_TYPE_DMA_0     8
00078 #define SO_INTERRUPT_TYPE_DMA_1     9
00079 #define SO_INTERRUPT_TYPE_DMA_2     10
00080 #define SO_INTERRUPT_TYPE_DMA_3     11
00081 #define SO_INTERRUPT_TYPE_KEYPAD    12
00082 #define SO_INTERRUPT_TYPE_CART      13
00083 #define SO_NUM_INTERRUPT_TYPES      14
00084 
00085 
00086 // ----------------------------------------------------------------------------
00087 
00088 // ----------------------------------------------------------------------------
00089 // Typedefs
00090 // ----------------------------------------------------------------------------
00091 
00099 typedef void (*SoInterruptHandler)( void );
00100 
00101 // ----------------------------------------------------------------------------
00102 // Public Functions
00103 // ----------------------------------------------------------------------------
00104 
00105 void SoIntManagerInitialize( void );
00106 
00107 void SoIntManagerSetInterruptHandler(    u32 a_InterruptType, SoInterruptHandler a_IntHandler );
00108 
00109 void SoIntManagerEnableInterruptMaster(  void );
00110 void SoIntManagerDisableInterruptMaster( void );
00111 
00112 void SoIntManagerEnableInterrupt(      u32 a_InterruptType );
00113 void SoIntManagerDisableInterrupt(     u32 a_InterruptType );
00114 
00115 // ----------------------------------------------------------------------------
00116 // Private Functions;
00117 // Declared here, used in .c, implemented in .S
00118 // ----------------------------------------------------------------------------
00119 
00120 
00121 // ----------------------------------------------------------------------------
00131 // ----------------------------------------------------------------------------
00132 void SoIntManagerInterruptHandler( void );
00133 
00135 extern SoInterruptHandler g_InterruptHandlers[ SO_NUM_INTERRUPT_TYPES ];
00136 
00137 // ----------------------------------------------------------------------------
00138 // EOF
00139 // ----------------------------------------------------------------------------
00140 
00142 
00143 #ifdef __cplusplus
00144 } // extern "C"
00145 #endif
00146 
00147 #endif

Copyright 2002 by the SGADE authors. See SoLicense.h or Visit the SGADE page for more information.