Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

include/lnp/sys/irq.h

Go to the documentation of this file.
00001 
00012 /*
00013  *  The contents of this file are subject to the Mozilla Public License
00014  *  Version 1.0 (the "License"); you may not use this file except in
00015  *  compliance with the License. You may obtain a copy of the License
00016  *  at http://www.mozilla.org/MPL/
00017  *
00018  *  Software distributed under the License is distributed on an "AS IS"
00019  *  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00020  *  the License for the specific language governing rights and
00021  *  limitations under the License.
00022  *
00023  *  The Original Code is legOS code, released October 17, 1999.
00024  *
00025  *  The Initial Developer of the Original Code is Markus L. Noga.
00026  *  Portions created by Markus L. Noga are Copyright (C) 1999
00027  *  Markus L. Noga. All Rights Reserved.
00028  *
00029  *  Contributor(s): Markus L. Noga <markus@noga.de>
00030  */
00031 
00032 #ifndef __sys_irq_h__
00033 #define __sys_irq_h__
00034 
00035 #ifdef  __cplusplus
00036 extern "C" {
00037 #endif
00038 
00040 //
00041 // Definitions
00042 //
00044 
00045 #ifdef CONF_RCX_COMPILER
00046 #define HANDLER_WRAPPER(wrapstring,handstring)
00047 #else
00048 #define HANDLER_WRAPPER(wrapstring,handstring) \
00049 __asm__ (".text\n.align 1\n.global _" wrapstring "\n_" wrapstring \
00050 ": push r0\npush r1\npush r2\npush r3\njsr @_" handstring \
00051 "\npop r3\npop r2\npop r1\npop r0\nrts\n")
00052 #endif
00053 
00055 //
00056 // Variables
00057 //
00059 
00060 extern void *reset_vector;      
00061 extern void *nmi_vector;        
00062 extern void *irq0_vector;       
00063 extern void *irq1_vector;       
00064 extern void *irq2_vector;       
00065 extern void *icia_vector;       
00066 extern void *icib_vector;       
00067 extern void *icic_vector;       
00068 extern void *icid_vector;       
00069 extern void *ocia_vector;       
00070 extern void *ocib_vector;       
00071 extern void *fovi_vector;       
00072 extern void *cmi0a_vector;      
00073 extern void *cmi0b_vector;      
00074 extern void *ovi0_vector;       
00075 extern void *cmi1a_vector;      
00076 extern void *cmi1b_vector;      
00077 extern void *ovi1_vector;       
00078 extern void *eri_vector;        
00079 extern void *rxi_vector;        
00080 extern void *txi_vector;        
00081 extern void *tei_vector;        
00082 extern void *ad_vector;         
00083 extern void *wovf_vector;       
00084 
00085 extern void *rom_reset_vector;   
00086 extern void rom_ocia_handler();  
00087 extern void rom_ocia_return();   
00088 extern void rom_dummy_handler(); 
00089 
00090 
00092 //
00093 // Functions
00094 //
00096 
00098 extern inline void disable_irqs() {
00099   __asm__ __volatile__("\torc  #0x80,ccr\n":::"cc");
00100 }
00101 
00103 extern inline void enable_irqs() {
00104   __asm__ __volatile__("\tandc #0x7f,ccr\n":::"cc");
00105 }
00106 
00107 #ifdef  __cplusplus
00108 }
00109 #endif
00110 
00111 #endif  // __sys_irq_h__
00112 

brickOS is released under the Mozilla Public License.
Original code copyright 1998-2002 by the authors.

Generated on Mon Feb 16 21:02:10 2004 for brickOS Kernel Developer by doxygen 1.3.5