Prepare for SDCC 4.5.0 release.
[sdcc.git] / sdcc / device / non-free / lib / pic16 / libdev / pic18f2431.c
blob31806746e4e48b222cb15b19aa384f03d6d4d917
1 /*
2 * This definitions of the PIC18F2431 MCU.
4 * This file is part of the GNU PIC library for SDCC, originally
5 * created by Molnar Karoly <molnarkaroly@users.sf.net> 2016.
7 * This file is generated automatically by the cinc2h.pl, 2016-04-13 17:23:43 UTC.
9 * SDCC is licensed under the GNU Public license (GPL) v2. Note that
10 * this license covers the code to the compiler and other executables,
11 * but explicitly does not cover any code or objects generated by sdcc.
13 * For pic device libraries and header files which are derived from
14 * Microchip header (.inc) and linker script (.lkr) files Microchip
15 * requires that "The header files should state that they are only to be
16 * used with authentic Microchip devices" which makes them incompatible
17 * with the GPL. Pic device libraries and header files are located at
18 * non-free/lib and non-free/include directories respectively.
19 * Sdcc should be run with the --use-non-free command line option in
20 * order to include non-free header files and libraries.
22 * See http://sdcc.sourceforge.net/ for the latest information on sdcc.
25 #include <pic18f2431.h>
27 //==============================================================================
29 __at(0x0F60) __sfr DFLTCON;
30 __at(0x0F60) volatile __DFLTCONbits_t DFLTCONbits;
32 __at(0x0F61) __sfr CAP3CON;
33 __at(0x0F61) volatile __CAP3CONbits_t CAP3CONbits;
35 __at(0x0F62) __sfr CAP2CON;
36 __at(0x0F62) volatile __CAP2CONbits_t CAP2CONbits;
38 __at(0x0F63) __sfr CAP1CON;
39 __at(0x0F63) volatile __CAP1CONbits_t CAP1CONbits;
41 __at(0x0F64) __sfr CAP3BUFL;
43 __at(0x0F64) __sfr MAXCNTL;
45 __at(0x0F65) __sfr CAP3BUFH;
47 __at(0x0F65) __sfr MAXCNTH;
49 __at(0x0F66) __sfr CAP2BUFL;
51 __at(0x0F66) __sfr POSCNTL;
53 __at(0x0F67) __sfr CAP2BUFH;
55 __at(0x0F67) __sfr POSCNTH;
57 __at(0x0F68) __sfr CAP1BUFL;
59 __at(0x0F68) __sfr VELRL;
61 __at(0x0F69) __sfr CAP1BUFH;
63 __at(0x0F69) __sfr VELRH;
65 __at(0x0F6A) __sfr OVDCONS;
66 __at(0x0F6A) volatile __OVDCONSbits_t OVDCONSbits;
68 __at(0x0F6B) __sfr OVDCOND;
69 __at(0x0F6B) volatile __OVDCONDbits_t OVDCONDbits;
71 __at(0x0F6C) __sfr FLTCONFIG;
72 __at(0x0F6C) volatile __FLTCONFIGbits_t FLTCONFIGbits;
74 __at(0x0F6D) __sfr DTCON;
75 __at(0x0F6D) volatile __DTCONbits_t DTCONbits;
77 __at(0x0F6E) __sfr PWMCON1;
78 __at(0x0F6E) volatile __PWMCON1bits_t PWMCON1bits;
80 __at(0x0F6F) __sfr PWMCON0;
81 __at(0x0F6F) volatile __PWMCON0bits_t PWMCON0bits;
83 __at(0x0F70) __sfr SEVTCMPH;
85 __at(0x0F71) __sfr SEVTCMPL;
87 __at(0x0F74) __sfr PDC2H;
89 __at(0x0F75) __sfr PDC2L;
91 __at(0x0F76) __sfr PDC1H;
93 __at(0x0F77) __sfr PDC1L;
95 __at(0x0F78) __sfr PDC0H;
97 __at(0x0F79) __sfr PDC0L;
99 __at(0x0F7A) __sfr PTPERH;
101 __at(0x0F7B) __sfr PTPERL;
103 __at(0x0F7C) __sfr PTMRH;
105 __at(0x0F7D) __sfr PTMRL;
107 __at(0x0F7E) __sfr PTCON1;
108 __at(0x0F7E) volatile __PTCON1bits_t PTCON1bits;
110 __at(0x0F7F) __sfr PTCON0;
111 __at(0x0F7F) volatile __PTCON0bits_t PTCON0bits;
113 __at(0x0F80) __sfr PORTA;
114 __at(0x0F80) volatile __PORTAbits_t PORTAbits;
116 __at(0x0F81) __sfr PORTB;
117 __at(0x0F81) volatile __PORTBbits_t PORTBbits;
119 __at(0x0F82) __sfr PORTC;
120 __at(0x0F82) volatile __PORTCbits_t PORTCbits;
122 __at(0x0F84) __sfr PORTE;
123 __at(0x0F84) volatile __PORTEbits_t PORTEbits;
125 __at(0x0F87) __sfr TMR5;
127 __at(0x0F87) __sfr TMR5L;
129 __at(0x0F88) __sfr TMR5H;
131 __at(0x0F89) __sfr LATA;
132 __at(0x0F89) volatile __LATAbits_t LATAbits;
134 __at(0x0F8A) __sfr LATB;
135 __at(0x0F8A) volatile __LATBbits_t LATBbits;
137 __at(0x0F8B) __sfr LATC;
138 __at(0x0F8B) volatile __LATCbits_t LATCbits;
140 __at(0x0F90) __sfr PR5;
142 __at(0x0F90) __sfr PR5L;
144 __at(0x0F91) __sfr PR5H;
146 __at(0x0F92) __sfr DDRA;
147 __at(0x0F92) volatile __DDRAbits_t DDRAbits;
149 __at(0x0F92) __sfr TRISA;
150 __at(0x0F92) volatile __TRISAbits_t TRISAbits;
152 __at(0x0F93) __sfr DDRB;
153 __at(0x0F93) volatile __DDRBbits_t DDRBbits;
155 __at(0x0F93) __sfr TRISB;
156 __at(0x0F93) volatile __TRISBbits_t TRISBbits;
158 __at(0x0F94) __sfr DDRC;
159 __at(0x0F94) volatile __DDRCbits_t DDRCbits;
161 __at(0x0F94) __sfr TRISC;
162 __at(0x0F94) volatile __TRISCbits_t TRISCbits;
164 __at(0x0F99) __sfr ADCHS;
165 __at(0x0F99) volatile __ADCHSbits_t ADCHSbits;
167 __at(0x0F9A) __sfr ADCON3;
168 __at(0x0F9A) volatile __ADCON3bits_t ADCON3bits;
170 __at(0x0F9B) __sfr OSCTUNE;
171 __at(0x0F9B) volatile __OSCTUNEbits_t OSCTUNEbits;
173 __at(0x0F9D) __sfr PIE1;
174 __at(0x0F9D) volatile __PIE1bits_t PIE1bits;
176 __at(0x0F9E) __sfr PIR1;
177 __at(0x0F9E) volatile __PIR1bits_t PIR1bits;
179 __at(0x0F9F) __sfr IPR1;
180 __at(0x0F9F) volatile __IPR1bits_t IPR1bits;
182 __at(0x0FA0) __sfr PIE2;
183 __at(0x0FA0) volatile __PIE2bits_t PIE2bits;
185 __at(0x0FA1) __sfr PIR2;
186 __at(0x0FA1) volatile __PIR2bits_t PIR2bits;
188 __at(0x0FA2) __sfr IPR2;
189 __at(0x0FA2) volatile __IPR2bits_t IPR2bits;
191 __at(0x0FA3) __sfr PIE3;
192 __at(0x0FA3) volatile __PIE3bits_t PIE3bits;
194 __at(0x0FA4) __sfr PIR3;
195 __at(0x0FA4) volatile __PIR3bits_t PIR3bits;
197 __at(0x0FA5) __sfr IPR3;
198 __at(0x0FA5) volatile __IPR3bits_t IPR3bits;
200 __at(0x0FA6) __sfr EECON1;
201 __at(0x0FA6) volatile __EECON1bits_t EECON1bits;
203 __at(0x0FA7) __sfr EECON2;
205 __at(0x0FA8) __sfr EEDATA;
207 __at(0x0FA9) __sfr EEADR;
209 __at(0x0FAA) __sfr BAUDCON;
210 __at(0x0FAA) volatile __BAUDCONbits_t BAUDCONbits;
212 __at(0x0FAA) __sfr BAUDCTL;
213 __at(0x0FAA) volatile __BAUDCTLbits_t BAUDCTLbits;
215 __at(0x0FAB) __sfr RCSTA;
216 __at(0x0FAB) volatile __RCSTAbits_t RCSTAbits;
218 __at(0x0FAC) __sfr TXSTA;
219 __at(0x0FAC) volatile __TXSTAbits_t TXSTAbits;
221 __at(0x0FAD) __sfr TXREG;
223 __at(0x0FAE) __sfr RCREG;
225 __at(0x0FAF) __sfr SPBRG;
227 __at(0x0FB0) __sfr SPBRGH;
229 __at(0x0FB6) __sfr QEICON;
230 __at(0x0FB6) volatile __QEICONbits_t QEICONbits;
232 __at(0x0FB7) __sfr T5CON;
233 __at(0x0FB7) volatile __T5CONbits_t T5CONbits;
235 __at(0x0FB8) __sfr ANSEL0;
236 __at(0x0FB8) volatile __ANSEL0bits_t ANSEL0bits;
238 __at(0x0FBA) __sfr CCP2CON;
239 __at(0x0FBA) volatile __CCP2CONbits_t CCP2CONbits;
241 __at(0x0FBB) __sfr CCPR2;
243 __at(0x0FBB) __sfr CCPR2L;
245 __at(0x0FBC) __sfr CCPR2H;
247 __at(0x0FBD) __sfr CCP1CON;
248 __at(0x0FBD) volatile __CCP1CONbits_t CCP1CONbits;
250 __at(0x0FBE) __sfr CCPR1;
252 __at(0x0FBE) __sfr CCPR1L;
254 __at(0x0FBF) __sfr CCPR1H;
256 __at(0x0FC0) __sfr ADCON2;
257 __at(0x0FC0) volatile __ADCON2bits_t ADCON2bits;
259 __at(0x0FC1) __sfr ADCON1;
260 __at(0x0FC1) volatile __ADCON1bits_t ADCON1bits;
262 __at(0x0FC2) __sfr ADCON0;
263 __at(0x0FC2) volatile __ADCON0bits_t ADCON0bits;
265 __at(0x0FC3) __sfr ADRES;
267 __at(0x0FC3) __sfr ADRESL;
269 __at(0x0FC4) __sfr ADRESH;
271 __at(0x0FC6) __sfr SSPCON;
272 __at(0x0FC6) volatile __SSPCONbits_t SSPCONbits;
274 __at(0x0FC7) __sfr SSPSTAT;
275 __at(0x0FC7) volatile __SSPSTATbits_t SSPSTATbits;
277 __at(0x0FC8) __sfr SSPADD;
279 __at(0x0FC9) __sfr SSPBUF;
281 __at(0x0FCA) __sfr T2CON;
282 __at(0x0FCA) volatile __T2CONbits_t T2CONbits;
284 __at(0x0FCB) __sfr PR2;
286 __at(0x0FCC) __sfr TMR2;
288 __at(0x0FCD) __sfr T1CON;
289 __at(0x0FCD) volatile __T1CONbits_t T1CONbits;
291 __at(0x0FCE) __sfr TMR1;
293 __at(0x0FCE) __sfr TMR1L;
295 __at(0x0FCF) __sfr TMR1H;
297 __at(0x0FD0) __sfr RCON;
298 __at(0x0FD0) volatile __RCONbits_t RCONbits;
300 __at(0x0FD1) __sfr WDTCON;
301 __at(0x0FD1) volatile __WDTCONbits_t WDTCONbits;
303 __at(0x0FD2) __sfr LVDCON;
304 __at(0x0FD2) volatile __LVDCONbits_t LVDCONbits;
306 __at(0x0FD3) __sfr OSCCON;
307 __at(0x0FD3) volatile __OSCCONbits_t OSCCONbits;
309 __at(0x0FD5) __sfr T0CON;
310 __at(0x0FD5) volatile __T0CONbits_t T0CONbits;
312 __at(0x0FD6) __sfr TMR0;
314 __at(0x0FD6) __sfr TMR0L;
316 __at(0x0FD7) __sfr TMR0H;
318 __at(0x0FD8) __sfr STATUS;
319 __at(0x0FD8) volatile __STATUSbits_t STATUSbits;
321 __at(0x0FD9) __sfr FSR2L;
323 __at(0x0FDA) __sfr FSR2H;
325 __at(0x0FDB) __sfr PLUSW2;
327 __at(0x0FDC) __sfr PREINC2;
329 __at(0x0FDD) __sfr POSTDEC2;
331 __at(0x0FDE) __sfr POSTINC2;
333 __at(0x0FDF) __sfr INDF2;
335 __at(0x0FE0) __sfr BSR;
337 __at(0x0FE1) __sfr FSR1L;
339 __at(0x0FE2) __sfr FSR1H;
341 __at(0x0FE3) __sfr PLUSW1;
343 __at(0x0FE4) __sfr PREINC1;
345 __at(0x0FE5) __sfr POSTDEC1;
347 __at(0x0FE6) __sfr POSTINC1;
349 __at(0x0FE7) __sfr INDF1;
351 __at(0x0FE8) __sfr WREG;
353 __at(0x0FE9) __sfr FSR0L;
355 __at(0x0FEA) __sfr FSR0H;
357 __at(0x0FEB) __sfr PLUSW0;
359 __at(0x0FEC) __sfr PREINC0;
361 __at(0x0FED) __sfr POSTDEC0;
363 __at(0x0FEE) __sfr POSTINC0;
365 __at(0x0FEF) __sfr INDF0;
367 __at(0x0FF0) __sfr INTCON3;
368 __at(0x0FF0) volatile __INTCON3bits_t INTCON3bits;
370 __at(0x0FF1) __sfr INTCON2;
371 __at(0x0FF1) volatile __INTCON2bits_t INTCON2bits;
373 __at(0x0FF2) __sfr INTCON;
374 __at(0x0FF2) volatile __INTCONbits_t INTCONbits;
376 __at(0x0FF3) __sfr PROD;
378 __at(0x0FF3) __sfr PRODL;
380 __at(0x0FF4) __sfr PRODH;
382 __at(0x0FF5) __sfr TABLAT;
384 __at(0x0FF6) __sfr TBLPTR;
386 __at(0x0FF6) __sfr TBLPTRL;
388 __at(0x0FF7) __sfr TBLPTRH;
390 __at(0x0FF8) __sfr TBLPTRU;
392 __at(0x0FF9) __sfr PC;
394 __at(0x0FF9) __sfr PCL;
396 __at(0x0FFA) __sfr PCLATH;
398 __at(0x0FFB) __sfr PCLATU;
400 __at(0x0FFC) __sfr STKPTR;
401 __at(0x0FFC) volatile __STKPTRbits_t STKPTRbits;
403 __at(0x0FFD) __sfr TOS;
405 __at(0x0FFD) __sfr TOSL;
407 __at(0x0FFE) __sfr TOSH;
409 __at(0x0FFF) __sfr TOSU;