Imported Upstream version 2.9.0
[debian/cc1111] / device / lib / pic16 / libdev / pic18f8720.c
1
2 /*
3  * pic18f8720.c - PIC18F8720 Device Library Source
4  *
5  * This file is part of the GNU PIC Library.
6  *
7  * January, 2004
8  * The GNU PIC Library is maintained by,
9  *      Vangelis Rokas <vrokas@otenet.gr>
10  *
11  * $Id: pic18f8720.c 3786 2005-06-24 15:59:33Z tecodev $
12  *
13  */
14
15 #include <pic18f8720.h>
16
17 __sfr __at (0xf6b) RCSTA2;
18 volatile __RCSTA2bits_t __at (0xf6b) RCSTA2bits;
19
20 __sfr __at (0xf6c) TXSTA2;
21 volatile __TXSTA2bits_t __at (0xf6c) TXSTA2bits;
22
23 __sfr __at (0xf6d) TXREG2;
24 __sfr __at (0xf6e) RCREG2;
25 __sfr __at (0xf6f) SPBRG2;
26 __sfr __at (0xf70) CCP5CON;
27 volatile __CCP5CONbits_t __at (0xf70) CCP5CONbits;
28
29 __sfr __at (0xf71) CCPR5L;
30 __sfr __at (0xf72) CCPR5H;
31 __sfr __at (0xf73) CCP4CON;
32 volatile __CCP4CONbits_t __at (0xf73) CCP4CONbits;
33
34 __sfr __at (0xf74) CCPR4L;
35 __sfr __at (0xf75) CCPR4H;
36 __sfr __at (0xf76) T4CON;
37 volatile __T4CONbits_t __at (0xf76) T4CONbits;
38
39 __sfr __at (0xf77) PR4;
40 __sfr __at (0xf78) TMR4;
41 __sfr __at (0xf80) PORTA;
42 volatile __PORTAbits_t __at (0xf80) PORTAbits;
43
44 __sfr __at (0xf81) PORTB;
45 volatile __PORTBbits_t __at (0xf81) PORTBbits;
46
47 __sfr __at (0xf82) PORTC;
48 volatile __PORTCbits_t __at (0xf82) PORTCbits;
49
50 __sfr __at (0xf83) PORTD;
51 volatile __PORTDbits_t __at (0xf83) PORTDbits;
52
53 __sfr __at (0xf84) PORTE;
54 volatile __PORTEbits_t __at (0xf84) PORTEbits;
55
56 __sfr __at (0xf85) PORTF;
57 volatile __PORTFbits_t __at (0xf85) PORTFbits;
58
59 __sfr __at (0xf86) PORTG;
60 volatile __PORTGbits_t __at (0xf86) PORTGbits;
61
62 __sfr __at (0xf87) PORTH;
63 volatile __PORTHbits_t __at (0xf87) PORTHbits;
64
65 __sfr __at (0xf88) PORTJ;
66 volatile __PORTJbits_t __at (0xf88) PORTJbits;
67
68 __sfr __at (0xf89) LATA;
69 volatile __LATAbits_t __at (0xf89) LATAbits;
70
71 __sfr __at (0xf8a) LATB;
72 volatile __LATBbits_t __at (0xf8a) LATBbits;
73
74 __sfr __at (0xf8b) LATC;
75 volatile __LATCbits_t __at (0xf8b) LATCbits;
76
77 __sfr __at (0xf8c) LATD;
78 volatile __LATDbits_t __at (0xf8c) LATDbits;
79
80 __sfr __at (0xf8d) LATE;
81 volatile __LATEbits_t __at (0xf8d) LATEbits;
82
83 __sfr __at (0xf8e) LATF;
84 volatile __LATFbits_t __at (0xf8e) LATFbits;
85
86 __sfr __at (0xf8f) LATG;
87 volatile __LATGbits_t __at (0xf8f) LATGbits;
88
89 __sfr __at (0xf90) LATH;
90 volatile __LATHbits_t __at (0xf90) LATHbits;
91
92 __sfr __at (0xf91) LATJ;
93 volatile __LATJbits_t __at (0xf91) LATJbits;
94
95 __sfr __at (0xf92) TRISA;
96 volatile __TRISAbits_t __at (0xf92) TRISAbits;
97
98 __sfr __at (0xf93) TRISB;
99 volatile __TRISBbits_t __at (0xf93) TRISBbits;
100
101 __sfr __at (0xf94) TRISC;
102 volatile __TRISCbits_t __at (0xf94) TRISCbits;
103
104 __sfr __at (0xf95) TRISD;
105 volatile __TRISDbits_t __at (0xf95) TRISDbits;
106
107 __sfr __at (0xf96) TRISE;
108 volatile __TRISEbits_t __at (0xf96) TRISEbits;
109
110 __sfr __at (0xf97) TRISF;
111 volatile __TRISFbits_t __at (0xf97) TRISFbits;
112
113 __sfr __at (0xf98) TRISG;
114 volatile __TRISGbits_t __at (0xf98) TRISGbits;
115
116 __sfr __at (0xf99) TRISH;
117 volatile __TRISHbits_t __at (0xf99) TRISHbits;
118
119 __sfr __at (0xf9a) TRISJ;
120 volatile __TRISJbits_t __at (0xf9a) TRISJbits;
121
122 __sfr __at (0xf9c) MEMCON;
123 volatile __MEMCONbits_t __at (0xf9c) MEMCONbits;
124
125 __sfr __at (0xf9d) PIE1;
126 volatile __PIE1bits_t __at (0xf9d) PIE1bits;
127
128 __sfr __at (0xf9e) PIR1;
129 volatile __PIR1bits_t __at (0xf9e) PIR1bits;
130
131 __sfr __at (0xf9f) IPR1;
132 volatile __IPR1bits_t __at (0xf9f) IPR1bits;
133
134 __sfr __at (0xfa0) PIE2;
135 volatile __PIE2bits_t __at (0xfa0) PIE2bits;
136
137 __sfr __at (0xfa1) PIR2;
138 volatile __PIR2bits_t __at (0xfa1) PIR2bits;
139
140 __sfr __at (0xfa2) IPR2;
141 volatile __IPR2bits_t __at (0xfa2) IPR2bits;
142
143 __sfr __at (0xfa3) PIE3;
144 volatile __PIE3bits_t __at (0xfa3) PIE3bits;
145
146 __sfr __at (0xfa4) PIR3;
147 volatile __PIR3bits_t __at (0xfa4) PIR3bits;
148
149 __sfr __at (0xfa5) IPR3;
150 volatile __IPR3bits_t __at (0xfa5) IPR3bits;
151
152 __sfr __at (0xfa6) EECON1;
153 volatile __EECON1bits_t __at (0xfa6) EECON1bits;
154
155 __sfr __at (0xfa7) EECON2;
156 __sfr __at (0xfa8) EEDATA;
157 __sfr __at (0xfa9) EEADR;
158 __sfr __at (0xfaa) EEADRH;
159 __sfr __at (0xfab) RCSTA1;
160 volatile __RCSTA1bits_t __at (0xfab) RCSTA1bits;
161
162 __sfr __at (0xfac) TXSTA1;
163 volatile __TXSTA1bits_t __at (0xfac) TXSTA1bits;
164
165 __sfr __at (0xfad) TXREG1;
166 __sfr __at (0xfae) RCREG1;
167 __sfr __at (0xfaf) SPBRG1;
168 __sfr __at (0xfb0) PSPCON;
169 volatile __PSPCONbits_t __at (0xfb0) PSPCONbits;
170
171 __sfr __at (0xfb1) T3CON;
172 volatile __T3CONbits_t __at (0xfb1) T3CONbits;
173
174 __sfr __at (0xfb2) TMR3L;
175 __sfr __at (0xfb3) TMR3H;
176 __sfr __at (0xfb4) CMCON;
177 volatile __CMCONbits_t __at (0xfb4) CMCONbits;
178
179 __sfr __at (0xfb5) CVRCON;
180 volatile __CVRCONbits_t __at (0xfb5) CVRCONbits;
181
182 __sfr __at (0xfb7) CCP3CON;
183 volatile __CCP3CONbits_t __at (0xfb7) CCP3CONbits;
184
185 __sfr __at (0xfb8) CCPR3L;
186 __sfr __at (0xfb9) CCPR3H;
187 __sfr __at (0xfba) CCP2CON;
188 volatile __CCP2CONbits_t __at (0xfba) CCP2CONbits;
189
190 __sfr __at (0xfbb) CCPR2L;
191 __sfr __at (0xfbc) CCPR2H;
192 __sfr __at (0xfbd) CCP1CON;
193 volatile __CCP1CONbits_t __at (0xfbd) CCP1CONbits;
194
195 __sfr __at (0xfbe) CCPR1L;
196 __sfr __at (0xfbf) CCPR1H;
197 __sfr __at (0xfc0) ADCON2;
198 volatile __ADCON2bits_t __at (0xfc0) ADCON2bits;
199
200 __sfr __at (0xfc1) ADCON1;
201 volatile __ADCON1bits_t __at (0xfc1) ADCON1bits;
202
203 __sfr __at (0xfc2) ADCON0;
204 volatile __ADCON0bits_t __at (0xfc2) ADCON0bits;
205
206 __sfr __at (0xfc3) ADRESL;
207 __sfr __at (0xfc4) ADRESH;
208 __sfr __at (0xfc5) SSPCON2;
209 volatile __SSPCON2bits_t __at (0xfc5) SSPCON2bits;
210
211 __sfr __at (0xfc6) SSPCON1;
212 volatile __SSPCON1bits_t __at (0xfc6) SSPCON1bits;
213
214 __sfr __at (0xfc7) SSPSTAT;
215 volatile __SSPSTATbits_t __at (0xfc7) SSPSTATbits;
216
217 __sfr __at (0xfc8) SSPADD;
218 __sfr __at (0xfc9) SSPBUF;
219 __sfr __at (0xfca) T2CON;
220 volatile __T2CONbits_t __at (0xfca) T2CONbits;
221
222 __sfr __at (0xfcb) PR2;
223 __sfr __at (0xfcc) TMR2;
224 __sfr __at (0xfcd) T1CON;
225 volatile __T1CONbits_t __at (0xfcd) T1CONbits;
226
227 __sfr __at (0xfce) TMR1L;
228 __sfr __at (0xfcf) TMR1H;
229 __sfr __at (0xfd0) RCON;
230 volatile __RCONbits_t __at (0xfd0) RCONbits;
231
232 __sfr __at (0xfd1) WDTCON;
233 volatile __WDTCONbits_t __at (0xfd1) WDTCONbits;
234
235 __sfr __at (0xfd2) LVDCON;
236 volatile __LVDCONbits_t __at (0xfd2) LVDCONbits;
237
238 __sfr __at (0xfd3) OSCCON;
239 volatile __OSCCONbits_t __at (0xfd3) OSCCONbits;
240
241 __sfr __at (0xfd5) T0CON;
242 __sfr __at (0xfd6) TMR0L;
243 __sfr __at (0xfd7) TMR0H;
244 __sfr __at (0xfd8) STATUS;
245 volatile __STATUSbits_t __at (0xfd8) STATUSbits;
246
247 __sfr __at (0xfd9) FSR2L;
248 __sfr __at (0xfda) FSR2H;
249 __sfr __at (0xfdb) PLUSW2;
250 __sfr __at (0xfdc) PREINC2;
251 __sfr __at (0xfdd) POSTDEC2;
252 __sfr __at (0xfde) POSTINC2;
253 __sfr __at (0xfdf) INDF2;
254 __sfr __at (0xfe0) BSR;
255 __sfr __at (0xfe1) FSR1L;
256 __sfr __at (0xfe2) FSR1H;
257 __sfr __at (0xfe3) PLUSW1;
258 __sfr __at (0xfe4) PREINC1;
259 __sfr __at (0xfe5) POSTDEC1;
260 __sfr __at (0xfe6) POSTINC1;
261 __sfr __at (0xfe7) INDF1;
262 __sfr __at (0xfe8) WREG;
263 __sfr __at (0xfe9) FSR0L;
264 __sfr __at (0xfea) FSR0H;
265 __sfr __at (0xfeb) PLUSW0;
266 __sfr __at (0xfec) PREINC0;
267 __sfr __at (0xfed) POSTDEC0;
268 __sfr __at (0xfee) POSTINC0;
269 __sfr __at (0xfef) INDF0;
270 __sfr __at (0xff0) INTCON3;
271 volatile __INTCON3bits_t __at (0xff0) INTCON3bits;
272
273 __sfr __at (0xff1) INTCON2;
274 volatile __INTCON2bits_t __at (0xff1) INTCON2bits;
275
276 __sfr __at (0xff2) INTCON;
277 volatile __INTCONbits_t __at (0xff2) INTCONbits;
278
279 __sfr __at (0xff3) PRODL;
280 __sfr __at (0xff4) PRODH;
281 __sfr __at (0xff5) TABLAT;
282 __sfr __at (0xff6) TBLPTRL;
283 __sfr __at (0xff7) TBLPTRH;
284 __sfr __at (0xff8) TBLPTRU;
285 __sfr __at (0xff9) PCL;
286 __sfr __at (0xffa) PCLATH;
287 __sfr __at (0xffb) PCLATU;
288 __sfr __at (0xffc) STKPTR;
289 volatile __STKPTRbits_t __at (0xffc) STKPTRbits;
290
291 __sfr __at (0xffd) TOSL;
292 __sfr __at (0xffe) TOSH;
293 __sfr __at (0xfff) TOSU;
294
295
296 /* for compatibility reasons */
297 __sfr __at (0xfab) RCSTA;
298 volatile __RCSTA1bits_t __at (0xfab) RCSTAbits;
299
300 __sfr __at (0xfac) TXSTA;
301 volatile __TXSTA1bits_t __at (0xfac) TXSTAbits;
302
303 __sfr __at (0xfad) TXREG;
304 __sfr __at (0xfae) RCREG;
305 __sfr __at (0xfaf) SPBRG;