16FXlib
interrupts.h
Go to the documentation of this file.
1 
2 //*****************************************************************************
3 // Author : Christian Illy
4 // Created : 12.09.2012
5 // Revised : 12.09.2012
6 // Version : 0.1
7 // Target MCU : Fujitsu MB96300 series
8 //
9 // This program is free software: you can redistribute it and/or modify
10 // it under the terms of the GNU General Public License as published by
11 // the Free Software Foundation, either version 3 of the License, or
12 // (at your option) any later version.
13 //
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
18 //
19 // You should have received a copy of the GNU General Public License
20 // along with this program. If not, see <http://www.gnu.org/licenses/>.
21 //
27 //*****************************************************************************
29 #ifndef INTERRUPTS_H_
30 #define INTERRUPTS_H_
31 
32 #include "inttypes.h"
33 
34 typedef void __far __interrupt (*IRQHandler)(void);
35 
39 extern void interrupts_init(void);
40 
47 extern void interrupts_setHandler(uint8_t interruptNr, uint8_t interruptLevel, IRQHandler handler);
48 
53 extern void interrupts_disableInterrupt(uint8_t interruptNr);
54 
58 #define interrupts_setLevel(maxLevel) __set_il(maxLevel)
59 
63 #define interrupts_enable() __EI()
64 
68 #define interrupts_disable() __DI()
69 
70 #endif /* INTERRUPTS_H_ */
71 
void interrupts_init(void)
Definition: interrupts.c:33
void interrupts_disableInterrupt(uint8_t interruptNr)
Definition: interrupts.c:66
unsigned char uint8_t
Definition: inttypes.h:35
void interrupts_setHandler(uint8_t interruptNr, uint8_t interruptLevel, IRQHandler handler)
Definition: interrupts.c:52