3 * Signal handler header
5 * written by Vangelis Rokas, 2005 <vrokas AT otenet.gr>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
50 /* interrupt testing arguments */
51 #define SIG_RB _INTCON, RBIF
52 #define SIG_INT0 _INTCON, INT0IF
53 #define SIG_INT1 _INTCON3, INT1IF
54 #define SIG_INT2 _INTCON3, INT2IF
55 #define SIG_CCP1 _PIR1, CCP1IF
56 #define SIG_CCP2 _PIR2, CCP2IF
57 #define SIG_TMR0 _INTCON, TMR0IF
58 #define SIG_TMR1 _PIR1, TMR1IF
59 #define SIG_TMR2 _PIR1, TMR2IF
60 #define SIG_TMR3 _PIR2, TMR3IF
61 #define SIG_EE _PIR2, EEIF
62 #define SIG_BCOL _PIR2, BCLIF
63 #define SIG_LVD _PIR2, LVDIF
64 #define SIG_PSP _PIR1, PSPIF
65 #define SIG_AD _PIR1, ADIF
66 #define SIG_RC _PIR1, RCIF
67 #define SIG_TX _PIR1, TXIF
68 #define SIG_MSSP _PIR1, SSPIF
71 #define DEF_ABSVECTOR(vecno, name) \
72 void __ivt_ ## name(void) __interrupt vecno __naked \
79 #define DEF_INTHIGH(name) \
80 DEF_ABSVECTOR(1, name) \
81 void name(void) __naked __interrupt \
86 #define DEF_INTLOW(name) \
87 DEF_ABSVECTOR(2, name) \
88 void name(void) __naked __interrupt \
99 #define DEF_HANDLER(sig, handler) \
104 #define SIGHANDLER(handler) void handler (void) __interrupt
105 #define SIGHANDLERNAKED(handler) void handler (void) __naked __interrupt
107 #endif /* __SIGNAL_H__ */