irq.h
Go to the documentation of this file.
1 
12 /*
13  * The contents of this file are subject to the Mozilla Public License
14  * Version 1.0 (the "License"); you may not use this file except in
15  * compliance with the License. You may obtain a copy of the License
16  * at http://www.mozilla.org/MPL/
17  *
18  * Software distributed under the License is distributed on an "AS IS"
19  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
20  * the License for the specific language governing rights and
21  * limitations under the License.
22  *
23  * The Original Code is legOS code, released October 17, 1999.
24  *
25  * The Initial Developer of the Original Code is Markus L. Noga.
26  * Portions created by Markus L. Noga are Copyright (C) 1999
27  * Markus L. Noga. All Rights Reserved.
28  *
29  * Contributor(s): Markus L. Noga <markus@noga.de>
30  */
31 
32 #ifndef __sys_irq_h__
33 #define __sys_irq_h__
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
40 //
41 // Definitions
42 //
44 
45 #ifdef CONF_RCX_COMPILER
46 #define HANDLER_WRAPPER(wrapstring,handstring)
47 #else
48 #define HANDLER_WRAPPER(wrapstring,handstring) \
49 __asm__ (".text\n.align 1\n.global _" wrapstring "\n_" wrapstring \
50 ": push r0\npush r1\npush r2\npush r3\njsr @_" handstring \
51 "\npop r3\npop r2\npop r1\npop r0\nrts\n")
52 #endif
53 
55 //
56 // Variables
57 //
59 
60 extern void *reset_vector;
61 extern void *nmi_vector;
62 extern void *irq0_vector;
63 extern void *irq1_vector;
64 extern void *irq2_vector;
65 extern void *icia_vector;
66 extern void *icib_vector;
67 extern void *icic_vector;
68 extern void *icid_vector;
69 extern void *ocia_vector;
70 extern void *ocib_vector;
71 extern void *fovi_vector;
72 extern void *cmi0a_vector;
73 extern void *cmi0b_vector;
74 extern void *ovi0_vector;
75 extern void *cmi1a_vector;
76 extern void *cmi1b_vector;
77 extern void *ovi1_vector;
78 extern void *eri_vector;
79 extern void *rxi_vector;
80 extern void *txi_vector;
81 extern void *tei_vector;
82 extern void *ad_vector;
83 extern void *wovf_vector;
84 
85 extern void *rom_reset_vector;
86 extern void rom_ocia_handler();
87 extern void rom_ocia_return();
88 extern void rom_dummy_handler();
89 
90 
92 //
93 // Functions
94 //
96 
98 extern inline void disable_irqs() {
99  __asm__ __volatile__("\torc #0x80,ccr\n":::"cc");
100 }
101 
103 extern inline void enable_irqs() {
104  __asm__ __volatile__("\tandc #0x7f,ccr\n":::"cc");
105 }
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif // __sys_irq_h__
112 
void rom_ocia_return()
return address in ROM OCIA handler
void * cmi0b_vector
CMI0B interrupt vector.
void * tei_vector
TEI interrupt vector.
void enable_irqs()
enable interrupt processing
Definition: irq.h:103
void * reset_vector
reset vector
void * ad_vector
A/D interrupt vector.
void * irq1_vector
IRQ1 interrupt vector.
void * cmi1a_vector
CMI1A interrupt vector.
void * icid_vector
ICID interrupt vector.
void * icic_vector
ICIC interrupt vector.
void * cmi1b_vector
CMI1B interrupt vector.
void * txi_vector
TXI interrupt vector.
void * ovi0_vector
OVI0 interrupt vector.
void * rxi_vector
RXI interrupt vector.
void * icia_vector
ICIA interrupt vector.
void * nmi_vector
NMI interrupt vector.
void * ocib_vector
OCIB interrupt vector.
void * irq2_vector
IRQ2 interrupt vector.
void disable_irqs()
disable interrupt processing
Definition: irq.h:98
void * ovi1_vector
OVI1 interrupt vector.
void * cmi0a_vector
CMI0A interrupt vector.
void * ocia_vector
OCIA interrupt vector.
void * wovf_vector
WOVF interrupt vector.
void * rom_reset_vector
ROM reset vector.
__asm__("\n\ .text\n\ .globl _atomic_inc\n\ _atomic_inc:\n\ stc ccr, r1h ; save flags\n\ orc #0x80, ccr ; disable all but NMI\n\ mov.b @r0, r1l\n\ inc r1l\n\ mov.b r1l, @r0\n\ ldc r1h, ccr ; restore flags\n\ rts\n\ ")
void * fovi_vector
FOVI interrupt vector.
void rom_dummy_handler()
address of an RTS instruction
void * eri_vector
ERI interrupt vector.
void rom_ocia_handler()
ROM OCIA interrupt handler.
void * irq0_vector
IRQ0 interrupt vector.
void * icib_vector
ICIB interrupt vector.

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

Generated on Sat Feb 14 2015 23:12:05 for brickOS Kernel Developer by doxygen 1.8.9.1