struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / non-free / include / pic16 / pic18f258.h
blob388cdeaa4820ca399b390f53afd6b6309c834fc3
1 /*
2 * This declarations of the PIC18F258 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:41 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 #ifndef __PIC18F258_H__
26 #define __PIC18F258_H__
28 //==============================================================================
30 //==============================================================================
32 // Register Definitions
34 //==============================================================================
37 //==============================================================================
38 // RXF0SIDH Bits
40 extern __at(0x0F00) __sfr RXF0SIDH;
42 typedef struct
44 unsigned SID3 : 1;
45 unsigned SID4 : 1;
46 unsigned SID5 : 1;
47 unsigned SID6 : 1;
48 unsigned SID7 : 1;
49 unsigned SID8 : 1;
50 unsigned SID9 : 1;
51 unsigned SID10 : 1;
52 } __RXF0SIDHbits_t;
54 extern __at(0x0F00) volatile __RXF0SIDHbits_t RXF0SIDHbits;
56 #define _RXF0SIDH_SID3 0x01
57 #define _RXF0SIDH_SID4 0x02
58 #define _RXF0SIDH_SID5 0x04
59 #define _RXF0SIDH_SID6 0x08
60 #define _RXF0SIDH_SID7 0x10
61 #define _RXF0SIDH_SID8 0x20
62 #define _RXF0SIDH_SID9 0x40
63 #define _RXF0SIDH_SID10 0x80
65 //==============================================================================
68 //==============================================================================
69 // RXF0SIDL Bits
71 extern __at(0x0F01) __sfr RXF0SIDL;
73 typedef union
75 struct
77 unsigned EID16 : 1;
78 unsigned EID17 : 1;
79 unsigned : 1;
80 unsigned EXIDEN : 1;
81 unsigned : 1;
82 unsigned SID0 : 1;
83 unsigned SID1 : 1;
84 unsigned SID2 : 1;
87 struct
89 unsigned : 5;
90 unsigned SID : 3;
92 } __RXF0SIDLbits_t;
94 extern __at(0x0F01) volatile __RXF0SIDLbits_t RXF0SIDLbits;
96 #define _RXF0SIDL_EID16 0x01
97 #define _RXF0SIDL_EID17 0x02
98 #define _RXF0SIDL_EXIDEN 0x08
99 #define _RXF0SIDL_SID0 0x20
100 #define _RXF0SIDL_SID1 0x40
101 #define _RXF0SIDL_SID2 0x80
103 //==============================================================================
106 //==============================================================================
107 // RXF0EIDH Bits
109 extern __at(0x0F02) __sfr RXF0EIDH;
111 typedef struct
113 unsigned EID8 : 1;
114 unsigned EID9 : 1;
115 unsigned EID10 : 1;
116 unsigned EID11 : 1;
117 unsigned EID12 : 1;
118 unsigned EID13 : 1;
119 unsigned EID14 : 1;
120 unsigned EID15 : 1;
121 } __RXF0EIDHbits_t;
123 extern __at(0x0F02) volatile __RXF0EIDHbits_t RXF0EIDHbits;
125 #define _RXF0EIDH_EID8 0x01
126 #define _RXF0EIDH_EID9 0x02
127 #define _RXF0EIDH_EID10 0x04
128 #define _RXF0EIDH_EID11 0x08
129 #define _RXF0EIDH_EID12 0x10
130 #define _RXF0EIDH_EID13 0x20
131 #define _RXF0EIDH_EID14 0x40
132 #define _RXF0EIDH_EID15 0x80
134 //==============================================================================
137 //==============================================================================
138 // RXF0EIDL Bits
140 extern __at(0x0F03) __sfr RXF0EIDL;
142 typedef struct
144 unsigned EID0 : 1;
145 unsigned EID1 : 1;
146 unsigned EID2 : 1;
147 unsigned EID3 : 1;
148 unsigned EID4 : 1;
149 unsigned EID5 : 1;
150 unsigned EID6 : 1;
151 unsigned EID7 : 1;
152 } __RXF0EIDLbits_t;
154 extern __at(0x0F03) volatile __RXF0EIDLbits_t RXF0EIDLbits;
156 #define _RXF0EIDL_EID0 0x01
157 #define _RXF0EIDL_EID1 0x02
158 #define _RXF0EIDL_EID2 0x04
159 #define _RXF0EIDL_EID3 0x08
160 #define _RXF0EIDL_EID4 0x10
161 #define _RXF0EIDL_EID5 0x20
162 #define _RXF0EIDL_EID6 0x40
163 #define _RXF0EIDL_EID7 0x80
165 //==============================================================================
168 //==============================================================================
169 // RXF1SIDH Bits
171 extern __at(0x0F04) __sfr RXF1SIDH;
173 typedef struct
175 unsigned SID3 : 1;
176 unsigned SID4 : 1;
177 unsigned SID5 : 1;
178 unsigned SID6 : 1;
179 unsigned SID7 : 1;
180 unsigned SID8 : 1;
181 unsigned SID9 : 1;
182 unsigned SID10 : 1;
183 } __RXF1SIDHbits_t;
185 extern __at(0x0F04) volatile __RXF1SIDHbits_t RXF1SIDHbits;
187 #define _RXF1SIDH_SID3 0x01
188 #define _RXF1SIDH_SID4 0x02
189 #define _RXF1SIDH_SID5 0x04
190 #define _RXF1SIDH_SID6 0x08
191 #define _RXF1SIDH_SID7 0x10
192 #define _RXF1SIDH_SID8 0x20
193 #define _RXF1SIDH_SID9 0x40
194 #define _RXF1SIDH_SID10 0x80
196 //==============================================================================
199 //==============================================================================
200 // RXF1SIDL Bits
202 extern __at(0x0F05) __sfr RXF1SIDL;
204 typedef union
206 struct
208 unsigned EID16 : 1;
209 unsigned EID17 : 1;
210 unsigned : 1;
211 unsigned EXIDEN : 1;
212 unsigned : 1;
213 unsigned SID0 : 1;
214 unsigned SID1 : 1;
215 unsigned SID2 : 1;
218 struct
220 unsigned : 5;
221 unsigned SID : 3;
223 } __RXF1SIDLbits_t;
225 extern __at(0x0F05) volatile __RXF1SIDLbits_t RXF1SIDLbits;
227 #define _RXF1SIDL_EID16 0x01
228 #define _RXF1SIDL_EID17 0x02
229 #define _RXF1SIDL_EXIDEN 0x08
230 #define _RXF1SIDL_SID0 0x20
231 #define _RXF1SIDL_SID1 0x40
232 #define _RXF1SIDL_SID2 0x80
234 //==============================================================================
237 //==============================================================================
238 // RXF1EIDH Bits
240 extern __at(0x0F06) __sfr RXF1EIDH;
242 typedef struct
244 unsigned EID8 : 1;
245 unsigned EID9 : 1;
246 unsigned EID10 : 1;
247 unsigned EID11 : 1;
248 unsigned EID12 : 1;
249 unsigned EID13 : 1;
250 unsigned EID14 : 1;
251 unsigned EID15 : 1;
252 } __RXF1EIDHbits_t;
254 extern __at(0x0F06) volatile __RXF1EIDHbits_t RXF1EIDHbits;
256 #define _RXF1EIDH_EID8 0x01
257 #define _RXF1EIDH_EID9 0x02
258 #define _RXF1EIDH_EID10 0x04
259 #define _RXF1EIDH_EID11 0x08
260 #define _RXF1EIDH_EID12 0x10
261 #define _RXF1EIDH_EID13 0x20
262 #define _RXF1EIDH_EID14 0x40
263 #define _RXF1EIDH_EID15 0x80
265 //==============================================================================
268 //==============================================================================
269 // RXF1EIDL Bits
271 extern __at(0x0F07) __sfr RXF1EIDL;
273 typedef struct
275 unsigned EID0 : 1;
276 unsigned EID1 : 1;
277 unsigned EID2 : 1;
278 unsigned EID3 : 1;
279 unsigned EID4 : 1;
280 unsigned EID5 : 1;
281 unsigned EID6 : 1;
282 unsigned EID7 : 1;
283 } __RXF1EIDLbits_t;
285 extern __at(0x0F07) volatile __RXF1EIDLbits_t RXF1EIDLbits;
287 #define _RXF1EIDL_EID0 0x01
288 #define _RXF1EIDL_EID1 0x02
289 #define _RXF1EIDL_EID2 0x04
290 #define _RXF1EIDL_EID3 0x08
291 #define _RXF1EIDL_EID4 0x10
292 #define _RXF1EIDL_EID5 0x20
293 #define _RXF1EIDL_EID6 0x40
294 #define _RXF1EIDL_EID7 0x80
296 //==============================================================================
299 //==============================================================================
300 // RXF2SIDH Bits
302 extern __at(0x0F08) __sfr RXF2SIDH;
304 typedef struct
306 unsigned SID3 : 1;
307 unsigned SID4 : 1;
308 unsigned SID5 : 1;
309 unsigned SID6 : 1;
310 unsigned SID7 : 1;
311 unsigned SID8 : 1;
312 unsigned SID9 : 1;
313 unsigned SID10 : 1;
314 } __RXF2SIDHbits_t;
316 extern __at(0x0F08) volatile __RXF2SIDHbits_t RXF2SIDHbits;
318 #define _RXF2SIDH_SID3 0x01
319 #define _RXF2SIDH_SID4 0x02
320 #define _RXF2SIDH_SID5 0x04
321 #define _RXF2SIDH_SID6 0x08
322 #define _RXF2SIDH_SID7 0x10
323 #define _RXF2SIDH_SID8 0x20
324 #define _RXF2SIDH_SID9 0x40
325 #define _RXF2SIDH_SID10 0x80
327 //==============================================================================
330 //==============================================================================
331 // RXF2SIDL Bits
333 extern __at(0x0F09) __sfr RXF2SIDL;
335 typedef union
337 struct
339 unsigned EID16 : 1;
340 unsigned EID17 : 1;
341 unsigned : 1;
342 unsigned EXIDEN : 1;
343 unsigned : 1;
344 unsigned SID0 : 1;
345 unsigned SID1 : 1;
346 unsigned SID2 : 1;
349 struct
351 unsigned : 5;
352 unsigned SID : 3;
354 } __RXF2SIDLbits_t;
356 extern __at(0x0F09) volatile __RXF2SIDLbits_t RXF2SIDLbits;
358 #define _RXF2SIDL_EID16 0x01
359 #define _RXF2SIDL_EID17 0x02
360 #define _RXF2SIDL_EXIDEN 0x08
361 #define _RXF2SIDL_SID0 0x20
362 #define _RXF2SIDL_SID1 0x40
363 #define _RXF2SIDL_SID2 0x80
365 //==============================================================================
368 //==============================================================================
369 // RXF2EIDH Bits
371 extern __at(0x0F0A) __sfr RXF2EIDH;
373 typedef struct
375 unsigned EID8 : 1;
376 unsigned EID9 : 1;
377 unsigned EID10 : 1;
378 unsigned EID11 : 1;
379 unsigned EID12 : 1;
380 unsigned EID13 : 1;
381 unsigned EID14 : 1;
382 unsigned EID15 : 1;
383 } __RXF2EIDHbits_t;
385 extern __at(0x0F0A) volatile __RXF2EIDHbits_t RXF2EIDHbits;
387 #define _RXF2EIDH_EID8 0x01
388 #define _RXF2EIDH_EID9 0x02
389 #define _RXF2EIDH_EID10 0x04
390 #define _RXF2EIDH_EID11 0x08
391 #define _RXF2EIDH_EID12 0x10
392 #define _RXF2EIDH_EID13 0x20
393 #define _RXF2EIDH_EID14 0x40
394 #define _RXF2EIDH_EID15 0x80
396 //==============================================================================
399 //==============================================================================
400 // RXF2EIDL Bits
402 extern __at(0x0F0B) __sfr RXF2EIDL;
404 typedef struct
406 unsigned EID0 : 1;
407 unsigned EID1 : 1;
408 unsigned EID2 : 1;
409 unsigned EID3 : 1;
410 unsigned EID4 : 1;
411 unsigned EID5 : 1;
412 unsigned EID6 : 1;
413 unsigned EID7 : 1;
414 } __RXF2EIDLbits_t;
416 extern __at(0x0F0B) volatile __RXF2EIDLbits_t RXF2EIDLbits;
418 #define _RXF2EIDL_EID0 0x01
419 #define _RXF2EIDL_EID1 0x02
420 #define _RXF2EIDL_EID2 0x04
421 #define _RXF2EIDL_EID3 0x08
422 #define _RXF2EIDL_EID4 0x10
423 #define _RXF2EIDL_EID5 0x20
424 #define _RXF2EIDL_EID6 0x40
425 #define _RXF2EIDL_EID7 0x80
427 //==============================================================================
430 //==============================================================================
431 // RXF3SIDH Bits
433 extern __at(0x0F0C) __sfr RXF3SIDH;
435 typedef struct
437 unsigned SID3 : 1;
438 unsigned SID4 : 1;
439 unsigned SID5 : 1;
440 unsigned SID6 : 1;
441 unsigned SID7 : 1;
442 unsigned SID8 : 1;
443 unsigned SID9 : 1;
444 unsigned SID10 : 1;
445 } __RXF3SIDHbits_t;
447 extern __at(0x0F0C) volatile __RXF3SIDHbits_t RXF3SIDHbits;
449 #define _RXF3SIDH_SID3 0x01
450 #define _RXF3SIDH_SID4 0x02
451 #define _RXF3SIDH_SID5 0x04
452 #define _RXF3SIDH_SID6 0x08
453 #define _RXF3SIDH_SID7 0x10
454 #define _RXF3SIDH_SID8 0x20
455 #define _RXF3SIDH_SID9 0x40
456 #define _RXF3SIDH_SID10 0x80
458 //==============================================================================
461 //==============================================================================
462 // RXF3SIDL Bits
464 extern __at(0x0F0D) __sfr RXF3SIDL;
466 typedef union
468 struct
470 unsigned EID16 : 1;
471 unsigned EID17 : 1;
472 unsigned : 1;
473 unsigned EXIDEN : 1;
474 unsigned : 1;
475 unsigned SID0 : 1;
476 unsigned SID1 : 1;
477 unsigned SID2 : 1;
480 struct
482 unsigned : 5;
483 unsigned SID : 3;
485 } __RXF3SIDLbits_t;
487 extern __at(0x0F0D) volatile __RXF3SIDLbits_t RXF3SIDLbits;
489 #define _RXF3SIDL_EID16 0x01
490 #define _RXF3SIDL_EID17 0x02
491 #define _RXF3SIDL_EXIDEN 0x08
492 #define _RXF3SIDL_SID0 0x20
493 #define _RXF3SIDL_SID1 0x40
494 #define _RXF3SIDL_SID2 0x80
496 //==============================================================================
499 //==============================================================================
500 // RXF3EIDH Bits
502 extern __at(0x0F0E) __sfr RXF3EIDH;
504 typedef struct
506 unsigned EID8 : 1;
507 unsigned EID9 : 1;
508 unsigned EID10 : 1;
509 unsigned EID11 : 1;
510 unsigned EID12 : 1;
511 unsigned EID13 : 1;
512 unsigned EID14 : 1;
513 unsigned EID15 : 1;
514 } __RXF3EIDHbits_t;
516 extern __at(0x0F0E) volatile __RXF3EIDHbits_t RXF3EIDHbits;
518 #define _RXF3EIDH_EID8 0x01
519 #define _RXF3EIDH_EID9 0x02
520 #define _RXF3EIDH_EID10 0x04
521 #define _RXF3EIDH_EID11 0x08
522 #define _RXF3EIDH_EID12 0x10
523 #define _RXF3EIDH_EID13 0x20
524 #define _RXF3EIDH_EID14 0x40
525 #define _RXF3EIDH_EID15 0x80
527 //==============================================================================
530 //==============================================================================
531 // RXF3EIDL Bits
533 extern __at(0x0F0F) __sfr RXF3EIDL;
535 typedef struct
537 unsigned EID0 : 1;
538 unsigned EID1 : 1;
539 unsigned EID2 : 1;
540 unsigned EID3 : 1;
541 unsigned EID4 : 1;
542 unsigned EID5 : 1;
543 unsigned EID6 : 1;
544 unsigned EID7 : 1;
545 } __RXF3EIDLbits_t;
547 extern __at(0x0F0F) volatile __RXF3EIDLbits_t RXF3EIDLbits;
549 #define _RXF3EIDL_EID0 0x01
550 #define _RXF3EIDL_EID1 0x02
551 #define _RXF3EIDL_EID2 0x04
552 #define _RXF3EIDL_EID3 0x08
553 #define _RXF3EIDL_EID4 0x10
554 #define _RXF3EIDL_EID5 0x20
555 #define _RXF3EIDL_EID6 0x40
556 #define _RXF3EIDL_EID7 0x80
558 //==============================================================================
561 //==============================================================================
562 // RXF4SIDH Bits
564 extern __at(0x0F10) __sfr RXF4SIDH;
566 typedef struct
568 unsigned SID3 : 1;
569 unsigned SID4 : 1;
570 unsigned SID5 : 1;
571 unsigned SID6 : 1;
572 unsigned SID7 : 1;
573 unsigned SID8 : 1;
574 unsigned SID9 : 1;
575 unsigned SID10 : 1;
576 } __RXF4SIDHbits_t;
578 extern __at(0x0F10) volatile __RXF4SIDHbits_t RXF4SIDHbits;
580 #define _RXF4SIDH_SID3 0x01
581 #define _RXF4SIDH_SID4 0x02
582 #define _RXF4SIDH_SID5 0x04
583 #define _RXF4SIDH_SID6 0x08
584 #define _RXF4SIDH_SID7 0x10
585 #define _RXF4SIDH_SID8 0x20
586 #define _RXF4SIDH_SID9 0x40
587 #define _RXF4SIDH_SID10 0x80
589 //==============================================================================
592 //==============================================================================
593 // RXF4SIDL Bits
595 extern __at(0x0F11) __sfr RXF4SIDL;
597 typedef union
599 struct
601 unsigned EID16 : 1;
602 unsigned EID17 : 1;
603 unsigned : 1;
604 unsigned EXIDEN : 1;
605 unsigned : 1;
606 unsigned SID0 : 1;
607 unsigned SID1 : 1;
608 unsigned SID2 : 1;
611 struct
613 unsigned : 5;
614 unsigned SID : 3;
616 } __RXF4SIDLbits_t;
618 extern __at(0x0F11) volatile __RXF4SIDLbits_t RXF4SIDLbits;
620 #define _RXF4SIDL_EID16 0x01
621 #define _RXF4SIDL_EID17 0x02
622 #define _RXF4SIDL_EXIDEN 0x08
623 #define _RXF4SIDL_SID0 0x20
624 #define _RXF4SIDL_SID1 0x40
625 #define _RXF4SIDL_SID2 0x80
627 //==============================================================================
630 //==============================================================================
631 // RXF4EIDH Bits
633 extern __at(0x0F12) __sfr RXF4EIDH;
635 typedef struct
637 unsigned EID8 : 1;
638 unsigned EID9 : 1;
639 unsigned EID10 : 1;
640 unsigned EID11 : 1;
641 unsigned EID12 : 1;
642 unsigned EID13 : 1;
643 unsigned EID14 : 1;
644 unsigned EID15 : 1;
645 } __RXF4EIDHbits_t;
647 extern __at(0x0F12) volatile __RXF4EIDHbits_t RXF4EIDHbits;
649 #define _RXF4EIDH_EID8 0x01
650 #define _RXF4EIDH_EID9 0x02
651 #define _RXF4EIDH_EID10 0x04
652 #define _RXF4EIDH_EID11 0x08
653 #define _RXF4EIDH_EID12 0x10
654 #define _RXF4EIDH_EID13 0x20
655 #define _RXF4EIDH_EID14 0x40
656 #define _RXF4EIDH_EID15 0x80
658 //==============================================================================
661 //==============================================================================
662 // RXF4EIDL Bits
664 extern __at(0x0F13) __sfr RXF4EIDL;
666 typedef struct
668 unsigned EID0 : 1;
669 unsigned EID1 : 1;
670 unsigned EID2 : 1;
671 unsigned EID3 : 1;
672 unsigned EID4 : 1;
673 unsigned EID5 : 1;
674 unsigned EID6 : 1;
675 unsigned EID7 : 1;
676 } __RXF4EIDLbits_t;
678 extern __at(0x0F13) volatile __RXF4EIDLbits_t RXF4EIDLbits;
680 #define _RXF4EIDL_EID0 0x01
681 #define _RXF4EIDL_EID1 0x02
682 #define _RXF4EIDL_EID2 0x04
683 #define _RXF4EIDL_EID3 0x08
684 #define _RXF4EIDL_EID4 0x10
685 #define _RXF4EIDL_EID5 0x20
686 #define _RXF4EIDL_EID6 0x40
687 #define _RXF4EIDL_EID7 0x80
689 //==============================================================================
692 //==============================================================================
693 // RXF5SIDH Bits
695 extern __at(0x0F14) __sfr RXF5SIDH;
697 typedef struct
699 unsigned SID3 : 1;
700 unsigned SID4 : 1;
701 unsigned SID5 : 1;
702 unsigned SID6 : 1;
703 unsigned SID7 : 1;
704 unsigned SID8 : 1;
705 unsigned SID9 : 1;
706 unsigned SID10 : 1;
707 } __RXF5SIDHbits_t;
709 extern __at(0x0F14) volatile __RXF5SIDHbits_t RXF5SIDHbits;
711 #define _RXF5SIDH_SID3 0x01
712 #define _RXF5SIDH_SID4 0x02
713 #define _RXF5SIDH_SID5 0x04
714 #define _RXF5SIDH_SID6 0x08
715 #define _RXF5SIDH_SID7 0x10
716 #define _RXF5SIDH_SID8 0x20
717 #define _RXF5SIDH_SID9 0x40
718 #define _RXF5SIDH_SID10 0x80
720 //==============================================================================
723 //==============================================================================
724 // RXF5SIDL Bits
726 extern __at(0x0F15) __sfr RXF5SIDL;
728 typedef union
730 struct
732 unsigned EID16 : 1;
733 unsigned EID17 : 1;
734 unsigned : 1;
735 unsigned EXIDEN : 1;
736 unsigned : 1;
737 unsigned SID0 : 1;
738 unsigned SID1 : 1;
739 unsigned SID2 : 1;
742 struct
744 unsigned : 5;
745 unsigned SID : 3;
747 } __RXF5SIDLbits_t;
749 extern __at(0x0F15) volatile __RXF5SIDLbits_t RXF5SIDLbits;
751 #define _RXF5SIDL_EID16 0x01
752 #define _RXF5SIDL_EID17 0x02
753 #define _RXF5SIDL_EXIDEN 0x08
754 #define _RXF5SIDL_SID0 0x20
755 #define _RXF5SIDL_SID1 0x40
756 #define _RXF5SIDL_SID2 0x80
758 //==============================================================================
761 //==============================================================================
762 // RXF5EIDH Bits
764 extern __at(0x0F16) __sfr RXF5EIDH;
766 typedef struct
768 unsigned EID8 : 1;
769 unsigned EID9 : 1;
770 unsigned EID10 : 1;
771 unsigned EID11 : 1;
772 unsigned EID12 : 1;
773 unsigned EID13 : 1;
774 unsigned EID14 : 1;
775 unsigned EID15 : 1;
776 } __RXF5EIDHbits_t;
778 extern __at(0x0F16) volatile __RXF5EIDHbits_t RXF5EIDHbits;
780 #define _RXF5EIDH_EID8 0x01
781 #define _RXF5EIDH_EID9 0x02
782 #define _RXF5EIDH_EID10 0x04
783 #define _RXF5EIDH_EID11 0x08
784 #define _RXF5EIDH_EID12 0x10
785 #define _RXF5EIDH_EID13 0x20
786 #define _RXF5EIDH_EID14 0x40
787 #define _RXF5EIDH_EID15 0x80
789 //==============================================================================
792 //==============================================================================
793 // RXF5EIDL Bits
795 extern __at(0x0F17) __sfr RXF5EIDL;
797 typedef struct
799 unsigned EID0 : 1;
800 unsigned EID1 : 1;
801 unsigned EID2 : 1;
802 unsigned EID3 : 1;
803 unsigned EID4 : 1;
804 unsigned EID5 : 1;
805 unsigned EID6 : 1;
806 unsigned EID7 : 1;
807 } __RXF5EIDLbits_t;
809 extern __at(0x0F17) volatile __RXF5EIDLbits_t RXF5EIDLbits;
811 #define _RXF5EIDL_EID0 0x01
812 #define _RXF5EIDL_EID1 0x02
813 #define _RXF5EIDL_EID2 0x04
814 #define _RXF5EIDL_EID3 0x08
815 #define _RXF5EIDL_EID4 0x10
816 #define _RXF5EIDL_EID5 0x20
817 #define _RXF5EIDL_EID6 0x40
818 #define _RXF5EIDL_EID7 0x80
820 //==============================================================================
823 //==============================================================================
824 // RXM0SIDH Bits
826 extern __at(0x0F18) __sfr RXM0SIDH;
828 typedef struct
830 unsigned SID3 : 1;
831 unsigned SID4 : 1;
832 unsigned SID5 : 1;
833 unsigned SID6 : 1;
834 unsigned SID7 : 1;
835 unsigned SID8 : 1;
836 unsigned SID9 : 1;
837 unsigned SID10 : 1;
838 } __RXM0SIDHbits_t;
840 extern __at(0x0F18) volatile __RXM0SIDHbits_t RXM0SIDHbits;
842 #define _RXM0SIDH_SID3 0x01
843 #define _RXM0SIDH_SID4 0x02
844 #define _RXM0SIDH_SID5 0x04
845 #define _RXM0SIDH_SID6 0x08
846 #define _RXM0SIDH_SID7 0x10
847 #define _RXM0SIDH_SID8 0x20
848 #define _RXM0SIDH_SID9 0x40
849 #define _RXM0SIDH_SID10 0x80
851 //==============================================================================
854 //==============================================================================
855 // RXM0SIDL Bits
857 extern __at(0x0F19) __sfr RXM0SIDL;
859 typedef union
861 struct
863 unsigned EID16 : 1;
864 unsigned EID17 : 1;
865 unsigned : 1;
866 unsigned : 1;
867 unsigned : 1;
868 unsigned SID0 : 1;
869 unsigned SID1 : 1;
870 unsigned SID2 : 1;
873 struct
875 unsigned : 5;
876 unsigned SID : 3;
878 } __RXM0SIDLbits_t;
880 extern __at(0x0F19) volatile __RXM0SIDLbits_t RXM0SIDLbits;
882 #define _RXM0SIDL_EID16 0x01
883 #define _RXM0SIDL_EID17 0x02
884 #define _RXM0SIDL_SID0 0x20
885 #define _RXM0SIDL_SID1 0x40
886 #define _RXM0SIDL_SID2 0x80
888 //==============================================================================
891 //==============================================================================
892 // RXM0EIDH Bits
894 extern __at(0x0F1A) __sfr RXM0EIDH;
896 typedef struct
898 unsigned EID8 : 1;
899 unsigned EID9 : 1;
900 unsigned EID10 : 1;
901 unsigned EID11 : 1;
902 unsigned EID12 : 1;
903 unsigned EID13 : 1;
904 unsigned EID14 : 1;
905 unsigned EID15 : 1;
906 } __RXM0EIDHbits_t;
908 extern __at(0x0F1A) volatile __RXM0EIDHbits_t RXM0EIDHbits;
910 #define _RXM0EIDH_EID8 0x01
911 #define _RXM0EIDH_EID9 0x02
912 #define _RXM0EIDH_EID10 0x04
913 #define _RXM0EIDH_EID11 0x08
914 #define _RXM0EIDH_EID12 0x10
915 #define _RXM0EIDH_EID13 0x20
916 #define _RXM0EIDH_EID14 0x40
917 #define _RXM0EIDH_EID15 0x80
919 //==============================================================================
922 //==============================================================================
923 // RXM0EIDL Bits
925 extern __at(0x0F1B) __sfr RXM0EIDL;
927 typedef struct
929 unsigned EID0 : 1;
930 unsigned EID1 : 1;
931 unsigned EID2 : 1;
932 unsigned EID3 : 1;
933 unsigned EID4 : 1;
934 unsigned EID5 : 1;
935 unsigned EID6 : 1;
936 unsigned EID7 : 1;
937 } __RXM0EIDLbits_t;
939 extern __at(0x0F1B) volatile __RXM0EIDLbits_t RXM0EIDLbits;
941 #define _RXM0EIDL_EID0 0x01
942 #define _RXM0EIDL_EID1 0x02
943 #define _RXM0EIDL_EID2 0x04
944 #define _RXM0EIDL_EID3 0x08
945 #define _RXM0EIDL_EID4 0x10
946 #define _RXM0EIDL_EID5 0x20
947 #define _RXM0EIDL_EID6 0x40
948 #define _RXM0EIDL_EID7 0x80
950 //==============================================================================
953 //==============================================================================
954 // RXM1SIDH Bits
956 extern __at(0x0F1C) __sfr RXM1SIDH;
958 typedef struct
960 unsigned SID3 : 1;
961 unsigned SID4 : 1;
962 unsigned SID5 : 1;
963 unsigned SID6 : 1;
964 unsigned SID7 : 1;
965 unsigned SID8 : 1;
966 unsigned SID9 : 1;
967 unsigned SID10 : 1;
968 } __RXM1SIDHbits_t;
970 extern __at(0x0F1C) volatile __RXM1SIDHbits_t RXM1SIDHbits;
972 #define _RXM1SIDH_SID3 0x01
973 #define _RXM1SIDH_SID4 0x02
974 #define _RXM1SIDH_SID5 0x04
975 #define _RXM1SIDH_SID6 0x08
976 #define _RXM1SIDH_SID7 0x10
977 #define _RXM1SIDH_SID8 0x20
978 #define _RXM1SIDH_SID9 0x40
979 #define _RXM1SIDH_SID10 0x80
981 //==============================================================================
984 //==============================================================================
985 // RXM1SIDL Bits
987 extern __at(0x0F1D) __sfr RXM1SIDL;
989 typedef union
991 struct
993 unsigned EID16 : 1;
994 unsigned EID17 : 1;
995 unsigned : 1;
996 unsigned : 1;
997 unsigned : 1;
998 unsigned SID0 : 1;
999 unsigned SID1 : 1;
1000 unsigned SID2 : 1;
1003 struct
1005 unsigned : 5;
1006 unsigned SID : 3;
1008 } __RXM1SIDLbits_t;
1010 extern __at(0x0F1D) volatile __RXM1SIDLbits_t RXM1SIDLbits;
1012 #define _RXM1SIDL_EID16 0x01
1013 #define _RXM1SIDL_EID17 0x02
1014 #define _RXM1SIDL_SID0 0x20
1015 #define _RXM1SIDL_SID1 0x40
1016 #define _RXM1SIDL_SID2 0x80
1018 //==============================================================================
1021 //==============================================================================
1022 // RXM1EIDH Bits
1024 extern __at(0x0F1E) __sfr RXM1EIDH;
1026 typedef struct
1028 unsigned EID8 : 1;
1029 unsigned EID9 : 1;
1030 unsigned EID10 : 1;
1031 unsigned EID11 : 1;
1032 unsigned EID12 : 1;
1033 unsigned EID13 : 1;
1034 unsigned EID14 : 1;
1035 unsigned EID15 : 1;
1036 } __RXM1EIDHbits_t;
1038 extern __at(0x0F1E) volatile __RXM1EIDHbits_t RXM1EIDHbits;
1040 #define _RXM1EIDH_EID8 0x01
1041 #define _RXM1EIDH_EID9 0x02
1042 #define _RXM1EIDH_EID10 0x04
1043 #define _RXM1EIDH_EID11 0x08
1044 #define _RXM1EIDH_EID12 0x10
1045 #define _RXM1EIDH_EID13 0x20
1046 #define _RXM1EIDH_EID14 0x40
1047 #define _RXM1EIDH_EID15 0x80
1049 //==============================================================================
1052 //==============================================================================
1053 // RXM1EIDL Bits
1055 extern __at(0x0F1F) __sfr RXM1EIDL;
1057 typedef struct
1059 unsigned EID0 : 1;
1060 unsigned EID1 : 1;
1061 unsigned EID2 : 1;
1062 unsigned EID3 : 1;
1063 unsigned EID4 : 1;
1064 unsigned EID5 : 1;
1065 unsigned EID6 : 1;
1066 unsigned EID7 : 1;
1067 } __RXM1EIDLbits_t;
1069 extern __at(0x0F1F) volatile __RXM1EIDLbits_t RXM1EIDLbits;
1071 #define _RXM1EIDL_EID0 0x01
1072 #define _RXM1EIDL_EID1 0x02
1073 #define _RXM1EIDL_EID2 0x04
1074 #define _RXM1EIDL_EID3 0x08
1075 #define _RXM1EIDL_EID4 0x10
1076 #define _RXM1EIDL_EID5 0x20
1077 #define _RXM1EIDL_EID6 0x40
1078 #define _RXM1EIDL_EID7 0x80
1080 //==============================================================================
1083 //==============================================================================
1084 // TXB2CON Bits
1086 extern __at(0x0F20) __sfr TXB2CON;
1088 typedef union
1090 struct
1092 unsigned TXPRI0 : 1;
1093 unsigned TXPRI1 : 1;
1094 unsigned : 1;
1095 unsigned TXREQ : 1;
1096 unsigned TXERR : 1;
1097 unsigned TXLARB : 1;
1098 unsigned TXABT : 1;
1099 unsigned : 1;
1102 struct
1104 unsigned TXPRI : 2;
1105 unsigned : 6;
1107 } __TXB2CONbits_t;
1109 extern __at(0x0F20) volatile __TXB2CONbits_t TXB2CONbits;
1111 #define _TXB2CON_TXPRI0 0x01
1112 #define _TXB2CON_TXPRI1 0x02
1113 #define _TXB2CON_TXREQ 0x08
1114 #define _TXB2CON_TXERR 0x10
1115 #define _TXB2CON_TXLARB 0x20
1116 #define _TXB2CON_TXABT 0x40
1118 //==============================================================================
1121 //==============================================================================
1122 // TXB2SIDH Bits
1124 extern __at(0x0F21) __sfr TXB2SIDH;
1126 typedef struct
1128 unsigned SID3 : 1;
1129 unsigned SID4 : 1;
1130 unsigned SID5 : 1;
1131 unsigned SID6 : 1;
1132 unsigned SID7 : 1;
1133 unsigned SID8 : 1;
1134 unsigned SID9 : 1;
1135 unsigned SID10 : 1;
1136 } __TXB2SIDHbits_t;
1138 extern __at(0x0F21) volatile __TXB2SIDHbits_t TXB2SIDHbits;
1140 #define _TXB2SIDH_SID3 0x01
1141 #define _TXB2SIDH_SID4 0x02
1142 #define _TXB2SIDH_SID5 0x04
1143 #define _TXB2SIDH_SID6 0x08
1144 #define _TXB2SIDH_SID7 0x10
1145 #define _TXB2SIDH_SID8 0x20
1146 #define _TXB2SIDH_SID9 0x40
1147 #define _TXB2SIDH_SID10 0x80
1149 //==============================================================================
1152 //==============================================================================
1153 // TXB2SIDL Bits
1155 extern __at(0x0F22) __sfr TXB2SIDL;
1157 typedef union
1159 struct
1161 unsigned EID16 : 1;
1162 unsigned EID17 : 1;
1163 unsigned : 1;
1164 unsigned EXIDE : 1;
1165 unsigned : 1;
1166 unsigned SID0 : 1;
1167 unsigned SID1 : 1;
1168 unsigned SID2 : 1;
1171 struct
1173 unsigned : 5;
1174 unsigned SID : 3;
1176 } __TXB2SIDLbits_t;
1178 extern __at(0x0F22) volatile __TXB2SIDLbits_t TXB2SIDLbits;
1180 #define _TXB2SIDL_EID16 0x01
1181 #define _TXB2SIDL_EID17 0x02
1182 #define _TXB2SIDL_EXIDE 0x08
1183 #define _TXB2SIDL_SID0 0x20
1184 #define _TXB2SIDL_SID1 0x40
1185 #define _TXB2SIDL_SID2 0x80
1187 //==============================================================================
1190 //==============================================================================
1191 // TXB2EIDH Bits
1193 extern __at(0x0F23) __sfr TXB2EIDH;
1195 typedef struct
1197 unsigned EID8 : 1;
1198 unsigned EID9 : 1;
1199 unsigned EID10 : 1;
1200 unsigned EID11 : 1;
1201 unsigned EID12 : 1;
1202 unsigned EID13 : 1;
1203 unsigned EID14 : 1;
1204 unsigned EID15 : 1;
1205 } __TXB2EIDHbits_t;
1207 extern __at(0x0F23) volatile __TXB2EIDHbits_t TXB2EIDHbits;
1209 #define _TXB2EIDH_EID8 0x01
1210 #define _TXB2EIDH_EID9 0x02
1211 #define _TXB2EIDH_EID10 0x04
1212 #define _TXB2EIDH_EID11 0x08
1213 #define _TXB2EIDH_EID12 0x10
1214 #define _TXB2EIDH_EID13 0x20
1215 #define _TXB2EIDH_EID14 0x40
1216 #define _TXB2EIDH_EID15 0x80
1218 //==============================================================================
1221 //==============================================================================
1222 // TXB2EIDL Bits
1224 extern __at(0x0F24) __sfr TXB2EIDL;
1226 typedef struct
1228 unsigned EID0 : 1;
1229 unsigned EID1 : 1;
1230 unsigned EID2 : 1;
1231 unsigned EID3 : 1;
1232 unsigned EID4 : 1;
1233 unsigned EID5 : 1;
1234 unsigned EID6 : 1;
1235 unsigned EID7 : 1;
1236 } __TXB2EIDLbits_t;
1238 extern __at(0x0F24) volatile __TXB2EIDLbits_t TXB2EIDLbits;
1240 #define _TXB2EIDL_EID0 0x01
1241 #define _TXB2EIDL_EID1 0x02
1242 #define _TXB2EIDL_EID2 0x04
1243 #define _TXB2EIDL_EID3 0x08
1244 #define _TXB2EIDL_EID4 0x10
1245 #define _TXB2EIDL_EID5 0x20
1246 #define _TXB2EIDL_EID6 0x40
1247 #define _TXB2EIDL_EID7 0x80
1249 //==============================================================================
1252 //==============================================================================
1253 // TXB2DLC Bits
1255 extern __at(0x0F25) __sfr TXB2DLC;
1257 typedef union
1259 struct
1261 unsigned DLC0 : 1;
1262 unsigned DLC1 : 1;
1263 unsigned DLC2 : 1;
1264 unsigned DLC3 : 1;
1265 unsigned : 1;
1266 unsigned : 1;
1267 unsigned TXRTR : 1;
1268 unsigned : 1;
1271 struct
1273 unsigned DLC : 4;
1274 unsigned : 4;
1276 } __TXB2DLCbits_t;
1278 extern __at(0x0F25) volatile __TXB2DLCbits_t TXB2DLCbits;
1280 #define _TXB2DLC_DLC0 0x01
1281 #define _TXB2DLC_DLC1 0x02
1282 #define _TXB2DLC_DLC2 0x04
1283 #define _TXB2DLC_DLC3 0x08
1284 #define _TXB2DLC_TXRTR 0x40
1286 //==============================================================================
1289 //==============================================================================
1290 // TXB2D0 Bits
1292 extern __at(0x0F26) __sfr TXB2D0;
1294 typedef struct
1296 unsigned TXB2D00 : 1;
1297 unsigned TXB2D01 : 1;
1298 unsigned TXB2D02 : 1;
1299 unsigned TXB2D03 : 1;
1300 unsigned TXB2D04 : 1;
1301 unsigned TXB2D05 : 1;
1302 unsigned TXB2D06 : 1;
1303 unsigned TXB2D07 : 1;
1304 } __TXB2D0bits_t;
1306 extern __at(0x0F26) volatile __TXB2D0bits_t TXB2D0bits;
1308 #define _TXB2D00 0x01
1309 #define _TXB2D01 0x02
1310 #define _TXB2D02 0x04
1311 #define _TXB2D03 0x08
1312 #define _TXB2D04 0x10
1313 #define _TXB2D05 0x20
1314 #define _TXB2D06 0x40
1315 #define _TXB2D07 0x80
1317 //==============================================================================
1320 //==============================================================================
1321 // TXB2D1 Bits
1323 extern __at(0x0F27) __sfr TXB2D1;
1325 typedef struct
1327 unsigned TXB2D10 : 1;
1328 unsigned TXB2D11 : 1;
1329 unsigned TXB2D12 : 1;
1330 unsigned TXB2D13 : 1;
1331 unsigned TXB2D14 : 1;
1332 unsigned TXB2D15 : 1;
1333 unsigned TXB2D16 : 1;
1334 unsigned TXB2D17 : 1;
1335 } __TXB2D1bits_t;
1337 extern __at(0x0F27) volatile __TXB2D1bits_t TXB2D1bits;
1339 #define _TXB2D10 0x01
1340 #define _TXB2D11 0x02
1341 #define _TXB2D12 0x04
1342 #define _TXB2D13 0x08
1343 #define _TXB2D14 0x10
1344 #define _TXB2D15 0x20
1345 #define _TXB2D16 0x40
1346 #define _TXB2D17 0x80
1348 //==============================================================================
1351 //==============================================================================
1352 // TXB2D2 Bits
1354 extern __at(0x0F28) __sfr TXB2D2;
1356 typedef struct
1358 unsigned TXB2D20 : 1;
1359 unsigned TXB2D21 : 1;
1360 unsigned TXB2D22 : 1;
1361 unsigned TXB2D23 : 1;
1362 unsigned TXB2D24 : 1;
1363 unsigned TXB2D25 : 1;
1364 unsigned TXB2D26 : 1;
1365 unsigned TXB2D27 : 1;
1366 } __TXB2D2bits_t;
1368 extern __at(0x0F28) volatile __TXB2D2bits_t TXB2D2bits;
1370 #define _TXB2D20 0x01
1371 #define _TXB2D21 0x02
1372 #define _TXB2D22 0x04
1373 #define _TXB2D23 0x08
1374 #define _TXB2D24 0x10
1375 #define _TXB2D25 0x20
1376 #define _TXB2D26 0x40
1377 #define _TXB2D27 0x80
1379 //==============================================================================
1382 //==============================================================================
1383 // TXB2D3 Bits
1385 extern __at(0x0F29) __sfr TXB2D3;
1387 typedef struct
1389 unsigned TXB2D30 : 1;
1390 unsigned TXB2D31 : 1;
1391 unsigned TXB2D32 : 1;
1392 unsigned TXB2D33 : 1;
1393 unsigned TXB2D34 : 1;
1394 unsigned TXB2D35 : 1;
1395 unsigned TXB2D36 : 1;
1396 unsigned TXB2D37 : 1;
1397 } __TXB2D3bits_t;
1399 extern __at(0x0F29) volatile __TXB2D3bits_t TXB2D3bits;
1401 #define _TXB2D30 0x01
1402 #define _TXB2D31 0x02
1403 #define _TXB2D32 0x04
1404 #define _TXB2D33 0x08
1405 #define _TXB2D34 0x10
1406 #define _TXB2D35 0x20
1407 #define _TXB2D36 0x40
1408 #define _TXB2D37 0x80
1410 //==============================================================================
1413 //==============================================================================
1414 // TXB2D4 Bits
1416 extern __at(0x0F2A) __sfr TXB2D4;
1418 typedef struct
1420 unsigned TXB2D40 : 1;
1421 unsigned TXB2D41 : 1;
1422 unsigned TXB2D42 : 1;
1423 unsigned TXB2D43 : 1;
1424 unsigned TXB2D44 : 1;
1425 unsigned TXB2D45 : 1;
1426 unsigned TXB2D46 : 1;
1427 unsigned TXB2D47 : 1;
1428 } __TXB2D4bits_t;
1430 extern __at(0x0F2A) volatile __TXB2D4bits_t TXB2D4bits;
1432 #define _TXB2D40 0x01
1433 #define _TXB2D41 0x02
1434 #define _TXB2D42 0x04
1435 #define _TXB2D43 0x08
1436 #define _TXB2D44 0x10
1437 #define _TXB2D45 0x20
1438 #define _TXB2D46 0x40
1439 #define _TXB2D47 0x80
1441 //==============================================================================
1444 //==============================================================================
1445 // TXB2D5 Bits
1447 extern __at(0x0F2B) __sfr TXB2D5;
1449 typedef struct
1451 unsigned TXB2D50 : 1;
1452 unsigned TXB2D51 : 1;
1453 unsigned TXB2D52 : 1;
1454 unsigned TXB2D53 : 1;
1455 unsigned TXB2D54 : 1;
1456 unsigned TXB2D55 : 1;
1457 unsigned TXB2D56 : 1;
1458 unsigned TXB2D57 : 1;
1459 } __TXB2D5bits_t;
1461 extern __at(0x0F2B) volatile __TXB2D5bits_t TXB2D5bits;
1463 #define _TXB2D50 0x01
1464 #define _TXB2D51 0x02
1465 #define _TXB2D52 0x04
1466 #define _TXB2D53 0x08
1467 #define _TXB2D54 0x10
1468 #define _TXB2D55 0x20
1469 #define _TXB2D56 0x40
1470 #define _TXB2D57 0x80
1472 //==============================================================================
1475 //==============================================================================
1476 // TXB2D6 Bits
1478 extern __at(0x0F2C) __sfr TXB2D6;
1480 typedef struct
1482 unsigned TXB2D60 : 1;
1483 unsigned TXB2D61 : 1;
1484 unsigned TXB2D62 : 1;
1485 unsigned TXB2D63 : 1;
1486 unsigned TXB2D64 : 1;
1487 unsigned TXB2D65 : 1;
1488 unsigned TXB2D66 : 1;
1489 unsigned TXB2D67 : 1;
1490 } __TXB2D6bits_t;
1492 extern __at(0x0F2C) volatile __TXB2D6bits_t TXB2D6bits;
1494 #define _TXB2D60 0x01
1495 #define _TXB2D61 0x02
1496 #define _TXB2D62 0x04
1497 #define _TXB2D63 0x08
1498 #define _TXB2D64 0x10
1499 #define _TXB2D65 0x20
1500 #define _TXB2D66 0x40
1501 #define _TXB2D67 0x80
1503 //==============================================================================
1506 //==============================================================================
1507 // TXB2D7 Bits
1509 extern __at(0x0F2D) __sfr TXB2D7;
1511 typedef struct
1513 unsigned TXB2D70 : 1;
1514 unsigned TXB2D71 : 1;
1515 unsigned TXB2D72 : 1;
1516 unsigned TXB2D73 : 1;
1517 unsigned TXB2D74 : 1;
1518 unsigned TXB2D75 : 1;
1519 unsigned TXB2D76 : 1;
1520 unsigned TXB2D77 : 1;
1521 } __TXB2D7bits_t;
1523 extern __at(0x0F2D) volatile __TXB2D7bits_t TXB2D7bits;
1525 #define _TXB2D70 0x01
1526 #define _TXB2D71 0x02
1527 #define _TXB2D72 0x04
1528 #define _TXB2D73 0x08
1529 #define _TXB2D74 0x10
1530 #define _TXB2D75 0x20
1531 #define _TXB2D76 0x40
1532 #define _TXB2D77 0x80
1534 //==============================================================================
1537 //==============================================================================
1538 // CANSTATRO4 Bits
1540 extern __at(0x0F2E) __sfr CANSTATRO4;
1542 typedef union
1544 struct
1546 unsigned : 1;
1547 unsigned ICODE0 : 1;
1548 unsigned ICODE1 : 1;
1549 unsigned ICODE2 : 1;
1550 unsigned : 1;
1551 unsigned OPMODE0 : 1;
1552 unsigned OPMODE1 : 1;
1553 unsigned OPMODE2 : 1;
1556 struct
1558 unsigned : 1;
1559 unsigned ICODE : 3;
1560 unsigned : 4;
1563 struct
1565 unsigned : 5;
1566 unsigned OPMODE : 3;
1568 } __CANSTATRO4bits_t;
1570 extern __at(0x0F2E) volatile __CANSTATRO4bits_t CANSTATRO4bits;
1572 #define _CANSTATRO4_ICODE0 0x02
1573 #define _CANSTATRO4_ICODE1 0x04
1574 #define _CANSTATRO4_ICODE2 0x08
1575 #define _CANSTATRO4_OPMODE0 0x20
1576 #define _CANSTATRO4_OPMODE1 0x40
1577 #define _CANSTATRO4_OPMODE2 0x80
1579 //==============================================================================
1582 //==============================================================================
1583 // TXB1CON Bits
1585 extern __at(0x0F30) __sfr TXB1CON;
1587 typedef union
1589 struct
1591 unsigned TXPRI0 : 1;
1592 unsigned TXPRI1 : 1;
1593 unsigned : 1;
1594 unsigned TXREQ : 1;
1595 unsigned TXERR : 1;
1596 unsigned TXLARB : 1;
1597 unsigned TXABT : 1;
1598 unsigned : 1;
1601 struct
1603 unsigned TXPRI : 2;
1604 unsigned : 6;
1606 } __TXB1CONbits_t;
1608 extern __at(0x0F30) volatile __TXB1CONbits_t TXB1CONbits;
1610 #define _TXB1CON_TXPRI0 0x01
1611 #define _TXB1CON_TXPRI1 0x02
1612 #define _TXB1CON_TXREQ 0x08
1613 #define _TXB1CON_TXERR 0x10
1614 #define _TXB1CON_TXLARB 0x20
1615 #define _TXB1CON_TXABT 0x40
1617 //==============================================================================
1620 //==============================================================================
1621 // TXB1SIDH Bits
1623 extern __at(0x0F31) __sfr TXB1SIDH;
1625 typedef struct
1627 unsigned SID3 : 1;
1628 unsigned SID4 : 1;
1629 unsigned SID5 : 1;
1630 unsigned SID6 : 1;
1631 unsigned SID7 : 1;
1632 unsigned SID8 : 1;
1633 unsigned SID9 : 1;
1634 unsigned SID10 : 1;
1635 } __TXB1SIDHbits_t;
1637 extern __at(0x0F31) volatile __TXB1SIDHbits_t TXB1SIDHbits;
1639 #define _TXB1SIDH_SID3 0x01
1640 #define _TXB1SIDH_SID4 0x02
1641 #define _TXB1SIDH_SID5 0x04
1642 #define _TXB1SIDH_SID6 0x08
1643 #define _TXB1SIDH_SID7 0x10
1644 #define _TXB1SIDH_SID8 0x20
1645 #define _TXB1SIDH_SID9 0x40
1646 #define _TXB1SIDH_SID10 0x80
1648 //==============================================================================
1651 //==============================================================================
1652 // TXB1SIDL Bits
1654 extern __at(0x0F32) __sfr TXB1SIDL;
1656 typedef union
1658 struct
1660 unsigned EID16 : 1;
1661 unsigned EID17 : 1;
1662 unsigned : 1;
1663 unsigned EXIDE : 1;
1664 unsigned : 1;
1665 unsigned SID0 : 1;
1666 unsigned SID1 : 1;
1667 unsigned SID2 : 1;
1670 struct
1672 unsigned : 5;
1673 unsigned SID : 3;
1675 } __TXB1SIDLbits_t;
1677 extern __at(0x0F32) volatile __TXB1SIDLbits_t TXB1SIDLbits;
1679 #define _TXB1SIDL_EID16 0x01
1680 #define _TXB1SIDL_EID17 0x02
1681 #define _TXB1SIDL_EXIDE 0x08
1682 #define _TXB1SIDL_SID0 0x20
1683 #define _TXB1SIDL_SID1 0x40
1684 #define _TXB1SIDL_SID2 0x80
1686 //==============================================================================
1689 //==============================================================================
1690 // TXB1EIDH Bits
1692 extern __at(0x0F33) __sfr TXB1EIDH;
1694 typedef struct
1696 unsigned EID8 : 1;
1697 unsigned EID9 : 1;
1698 unsigned EID10 : 1;
1699 unsigned EID11 : 1;
1700 unsigned EID12 : 1;
1701 unsigned EID13 : 1;
1702 unsigned EID14 : 1;
1703 unsigned EID15 : 1;
1704 } __TXB1EIDHbits_t;
1706 extern __at(0x0F33) volatile __TXB1EIDHbits_t TXB1EIDHbits;
1708 #define _TXB1EIDH_EID8 0x01
1709 #define _TXB1EIDH_EID9 0x02
1710 #define _TXB1EIDH_EID10 0x04
1711 #define _TXB1EIDH_EID11 0x08
1712 #define _TXB1EIDH_EID12 0x10
1713 #define _TXB1EIDH_EID13 0x20
1714 #define _TXB1EIDH_EID14 0x40
1715 #define _TXB1EIDH_EID15 0x80
1717 //==============================================================================
1720 //==============================================================================
1721 // TXB1EIDL Bits
1723 extern __at(0x0F34) __sfr TXB1EIDL;
1725 typedef struct
1727 unsigned EID0 : 1;
1728 unsigned EID1 : 1;
1729 unsigned EID2 : 1;
1730 unsigned EID3 : 1;
1731 unsigned EID4 : 1;
1732 unsigned EID5 : 1;
1733 unsigned EID6 : 1;
1734 unsigned EID7 : 1;
1735 } __TXB1EIDLbits_t;
1737 extern __at(0x0F34) volatile __TXB1EIDLbits_t TXB1EIDLbits;
1739 #define _TXB1EIDL_EID0 0x01
1740 #define _TXB1EIDL_EID1 0x02
1741 #define _TXB1EIDL_EID2 0x04
1742 #define _TXB1EIDL_EID3 0x08
1743 #define _TXB1EIDL_EID4 0x10
1744 #define _TXB1EIDL_EID5 0x20
1745 #define _TXB1EIDL_EID6 0x40
1746 #define _TXB1EIDL_EID7 0x80
1748 //==============================================================================
1751 //==============================================================================
1752 // TXB1DLC Bits
1754 extern __at(0x0F35) __sfr TXB1DLC;
1756 typedef union
1758 struct
1760 unsigned DLC0 : 1;
1761 unsigned DLC1 : 1;
1762 unsigned DLC2 : 1;
1763 unsigned DLC3 : 1;
1764 unsigned : 1;
1765 unsigned : 1;
1766 unsigned TXRTR : 1;
1767 unsigned : 1;
1770 struct
1772 unsigned DLC : 4;
1773 unsigned : 4;
1775 } __TXB1DLCbits_t;
1777 extern __at(0x0F35) volatile __TXB1DLCbits_t TXB1DLCbits;
1779 #define _TXB1DLC_DLC0 0x01
1780 #define _TXB1DLC_DLC1 0x02
1781 #define _TXB1DLC_DLC2 0x04
1782 #define _TXB1DLC_DLC3 0x08
1783 #define _TXB1DLC_TXRTR 0x40
1785 //==============================================================================
1788 //==============================================================================
1789 // TXB1D0 Bits
1791 extern __at(0x0F36) __sfr TXB1D0;
1793 typedef struct
1795 unsigned TXB1D00 : 1;
1796 unsigned TXB1D01 : 1;
1797 unsigned TXB1D02 : 1;
1798 unsigned TXB1D03 : 1;
1799 unsigned TXB1D04 : 1;
1800 unsigned TXB1D05 : 1;
1801 unsigned TXB1D06 : 1;
1802 unsigned TXB1D07 : 1;
1803 } __TXB1D0bits_t;
1805 extern __at(0x0F36) volatile __TXB1D0bits_t TXB1D0bits;
1807 #define _TXB1D00 0x01
1808 #define _TXB1D01 0x02
1809 #define _TXB1D02 0x04
1810 #define _TXB1D03 0x08
1811 #define _TXB1D04 0x10
1812 #define _TXB1D05 0x20
1813 #define _TXB1D06 0x40
1814 #define _TXB1D07 0x80
1816 //==============================================================================
1819 //==============================================================================
1820 // TXB1D1 Bits
1822 extern __at(0x0F37) __sfr TXB1D1;
1824 typedef struct
1826 unsigned TXB1D10 : 1;
1827 unsigned TXB1D11 : 1;
1828 unsigned TXB1D12 : 1;
1829 unsigned TXB1D13 : 1;
1830 unsigned TXB1D14 : 1;
1831 unsigned TXB1D15 : 1;
1832 unsigned TXB1D16 : 1;
1833 unsigned TXB1D17 : 1;
1834 } __TXB1D1bits_t;
1836 extern __at(0x0F37) volatile __TXB1D1bits_t TXB1D1bits;
1838 #define _TXB1D10 0x01
1839 #define _TXB1D11 0x02
1840 #define _TXB1D12 0x04
1841 #define _TXB1D13 0x08
1842 #define _TXB1D14 0x10
1843 #define _TXB1D15 0x20
1844 #define _TXB1D16 0x40
1845 #define _TXB1D17 0x80
1847 //==============================================================================
1850 //==============================================================================
1851 // TXB1D2 Bits
1853 extern __at(0x0F38) __sfr TXB1D2;
1855 typedef union
1857 struct
1859 unsigned TXB1D20 : 1;
1860 unsigned TXB1D21 : 1;
1861 unsigned TXB1D22 : 1;
1862 unsigned TXB1D23 : 1;
1863 unsigned TXB1D24 : 1;
1864 unsigned TXB1D25 : 1;
1865 unsigned TXB1D26 : 1;
1866 unsigned TXB1D27 : 1;
1869 struct
1871 unsigned : 1;
1872 unsigned : 1;
1873 unsigned : 1;
1874 unsigned TBB1D23 : 1;
1875 unsigned : 1;
1876 unsigned : 1;
1877 unsigned : 1;
1878 unsigned : 1;
1880 } __TXB1D2bits_t;
1882 extern __at(0x0F38) volatile __TXB1D2bits_t TXB1D2bits;
1884 #define _TXB1D20 0x01
1885 #define _TXB1D21 0x02
1886 #define _TXB1D22 0x04
1887 #define _TXB1D23 0x08
1888 #define _TBB1D23 0x08
1889 #define _TXB1D24 0x10
1890 #define _TXB1D25 0x20
1891 #define _TXB1D26 0x40
1892 #define _TXB1D27 0x80
1894 //==============================================================================
1897 //==============================================================================
1898 // TXB1D3 Bits
1900 extern __at(0x0F39) __sfr TXB1D3;
1902 typedef struct
1904 unsigned TXB1D30 : 1;
1905 unsigned TXB1D31 : 1;
1906 unsigned TXB1D32 : 1;
1907 unsigned TXB1D33 : 1;
1908 unsigned TXB1D34 : 1;
1909 unsigned TXB1D35 : 1;
1910 unsigned TXB1D36 : 1;
1911 unsigned TXB1D37 : 1;
1912 } __TXB1D3bits_t;
1914 extern __at(0x0F39) volatile __TXB1D3bits_t TXB1D3bits;
1916 #define _TXB1D30 0x01
1917 #define _TXB1D31 0x02
1918 #define _TXB1D32 0x04
1919 #define _TXB1D33 0x08
1920 #define _TXB1D34 0x10
1921 #define _TXB1D35 0x20
1922 #define _TXB1D36 0x40
1923 #define _TXB1D37 0x80
1925 //==============================================================================
1928 //==============================================================================
1929 // TXB1D4 Bits
1931 extern __at(0x0F3A) __sfr TXB1D4;
1933 typedef struct
1935 unsigned TXB1D40 : 1;
1936 unsigned TXB1D41 : 1;
1937 unsigned TXB1D42 : 1;
1938 unsigned TXB1D43 : 1;
1939 unsigned TXB1D44 : 1;
1940 unsigned TXB1D45 : 1;
1941 unsigned TXB1D46 : 1;
1942 unsigned TXB1D47 : 1;
1943 } __TXB1D4bits_t;
1945 extern __at(0x0F3A) volatile __TXB1D4bits_t TXB1D4bits;
1947 #define _TXB1D40 0x01
1948 #define _TXB1D41 0x02
1949 #define _TXB1D42 0x04
1950 #define _TXB1D43 0x08
1951 #define _TXB1D44 0x10
1952 #define _TXB1D45 0x20
1953 #define _TXB1D46 0x40
1954 #define _TXB1D47 0x80
1956 //==============================================================================
1959 //==============================================================================
1960 // TXB1D5 Bits
1962 extern __at(0x0F3B) __sfr TXB1D5;
1964 typedef struct
1966 unsigned TXB1D50 : 1;
1967 unsigned TXB1D51 : 1;
1968 unsigned TXB1D52 : 1;
1969 unsigned TXB1D53 : 1;
1970 unsigned TXB1D54 : 1;
1971 unsigned TXB1D55 : 1;
1972 unsigned TXB1D56 : 1;
1973 unsigned TXB1D57 : 1;
1974 } __TXB1D5bits_t;
1976 extern __at(0x0F3B) volatile __TXB1D5bits_t TXB1D5bits;
1978 #define _TXB1D50 0x01
1979 #define _TXB1D51 0x02
1980 #define _TXB1D52 0x04
1981 #define _TXB1D53 0x08
1982 #define _TXB1D54 0x10
1983 #define _TXB1D55 0x20
1984 #define _TXB1D56 0x40
1985 #define _TXB1D57 0x80
1987 //==============================================================================
1990 //==============================================================================
1991 // TXB1D6 Bits
1993 extern __at(0x0F3C) __sfr TXB1D6;
1995 typedef struct
1997 unsigned TXB1D60 : 1;
1998 unsigned TXB1D61 : 1;
1999 unsigned TXB1D62 : 1;
2000 unsigned TXB1D63 : 1;
2001 unsigned TXB1D64 : 1;
2002 unsigned TXB1D65 : 1;
2003 unsigned TXB1D66 : 1;
2004 unsigned TXB1D67 : 1;
2005 } __TXB1D6bits_t;
2007 extern __at(0x0F3C) volatile __TXB1D6bits_t TXB1D6bits;
2009 #define _TXB1D60 0x01
2010 #define _TXB1D61 0x02
2011 #define _TXB1D62 0x04
2012 #define _TXB1D63 0x08
2013 #define _TXB1D64 0x10
2014 #define _TXB1D65 0x20
2015 #define _TXB1D66 0x40
2016 #define _TXB1D67 0x80
2018 //==============================================================================
2021 //==============================================================================
2022 // TXB1D7 Bits
2024 extern __at(0x0F3D) __sfr TXB1D7;
2026 typedef struct
2028 unsigned TXB1D70 : 1;
2029 unsigned TXB1D71 : 1;
2030 unsigned TXB1D72 : 1;
2031 unsigned TXB1D73 : 1;
2032 unsigned TXB1D74 : 1;
2033 unsigned TXB1D75 : 1;
2034 unsigned TXB1D76 : 1;
2035 unsigned TXB1D77 : 1;
2036 } __TXB1D7bits_t;
2038 extern __at(0x0F3D) volatile __TXB1D7bits_t TXB1D7bits;
2040 #define _TXB1D70 0x01
2041 #define _TXB1D71 0x02
2042 #define _TXB1D72 0x04
2043 #define _TXB1D73 0x08
2044 #define _TXB1D74 0x10
2045 #define _TXB1D75 0x20
2046 #define _TXB1D76 0x40
2047 #define _TXB1D77 0x80
2049 //==============================================================================
2052 //==============================================================================
2053 // CANSTATRO3 Bits
2055 extern __at(0x0F3E) __sfr CANSTATRO3;
2057 typedef union
2059 struct
2061 unsigned : 1;
2062 unsigned ICODE0 : 1;
2063 unsigned ICODE1 : 1;
2064 unsigned ICODE2 : 1;
2065 unsigned : 1;
2066 unsigned OPMODE0 : 1;
2067 unsigned OPMODE1 : 1;
2068 unsigned OPMODE2 : 1;
2071 struct
2073 unsigned : 1;
2074 unsigned ICODE : 3;
2075 unsigned : 4;
2078 struct
2080 unsigned : 5;
2081 unsigned OPMODE : 3;
2083 } __CANSTATRO3bits_t;
2085 extern __at(0x0F3E) volatile __CANSTATRO3bits_t CANSTATRO3bits;
2087 #define _CANSTATRO3_ICODE0 0x02
2088 #define _CANSTATRO3_ICODE1 0x04
2089 #define _CANSTATRO3_ICODE2 0x08
2090 #define _CANSTATRO3_OPMODE0 0x20
2091 #define _CANSTATRO3_OPMODE1 0x40
2092 #define _CANSTATRO3_OPMODE2 0x80
2094 //==============================================================================
2097 //==============================================================================
2098 // TXB0CON Bits
2100 extern __at(0x0F40) __sfr TXB0CON;
2102 typedef union
2104 struct
2106 unsigned TXPRI0 : 1;
2107 unsigned TXPRI1 : 1;
2108 unsigned : 1;
2109 unsigned TXREQ : 1;
2110 unsigned TXERR : 1;
2111 unsigned TXLARB : 1;
2112 unsigned TXABT : 1;
2113 unsigned : 1;
2116 struct
2118 unsigned TXPRI : 2;
2119 unsigned : 6;
2121 } __TXB0CONbits_t;
2123 extern __at(0x0F40) volatile __TXB0CONbits_t TXB0CONbits;
2125 #define _TXPRI0 0x01
2126 #define _TXPRI1 0x02
2127 #define _TXREQ 0x08
2128 #define _TXERR 0x10
2129 #define _TXLARB 0x20
2130 #define _TXABT 0x40
2132 //==============================================================================
2135 //==============================================================================
2136 // TXB0SIDH Bits
2138 extern __at(0x0F41) __sfr TXB0SIDH;
2140 typedef struct
2142 unsigned SID3 : 1;
2143 unsigned SID4 : 1;
2144 unsigned SID5 : 1;
2145 unsigned SID6 : 1;
2146 unsigned SID7 : 1;
2147 unsigned SID8 : 1;
2148 unsigned SID9 : 1;
2149 unsigned SID10 : 1;
2150 } __TXB0SIDHbits_t;
2152 extern __at(0x0F41) volatile __TXB0SIDHbits_t TXB0SIDHbits;
2154 #define _TXB0SIDH_SID3 0x01
2155 #define _TXB0SIDH_SID4 0x02
2156 #define _TXB0SIDH_SID5 0x04
2157 #define _TXB0SIDH_SID6 0x08
2158 #define _TXB0SIDH_SID7 0x10
2159 #define _TXB0SIDH_SID8 0x20
2160 #define _TXB0SIDH_SID9 0x40
2161 #define _TXB0SIDH_SID10 0x80
2163 //==============================================================================
2166 //==============================================================================
2167 // TXB0SIDL Bits
2169 extern __at(0x0F42) __sfr TXB0SIDL;
2171 typedef union
2173 struct
2175 unsigned EID16 : 1;
2176 unsigned EID17 : 1;
2177 unsigned : 1;
2178 unsigned EXIDE : 1;
2179 unsigned : 1;
2180 unsigned SID0 : 1;
2181 unsigned SID1 : 1;
2182 unsigned SID2 : 1;
2185 struct
2187 unsigned : 5;
2188 unsigned SID : 3;
2190 } __TXB0SIDLbits_t;
2192 extern __at(0x0F42) volatile __TXB0SIDLbits_t TXB0SIDLbits;
2194 #define _TXB0SIDL_EID16 0x01
2195 #define _TXB0SIDL_EID17 0x02
2196 #define _TXB0SIDL_EXIDE 0x08
2197 #define _TXB0SIDL_SID0 0x20
2198 #define _TXB0SIDL_SID1 0x40
2199 #define _TXB0SIDL_SID2 0x80
2201 //==============================================================================
2204 //==============================================================================
2205 // TXB0EIDH Bits
2207 extern __at(0x0F43) __sfr TXB0EIDH;
2209 typedef struct
2211 unsigned EID8 : 1;
2212 unsigned EID9 : 1;
2213 unsigned EID10 : 1;
2214 unsigned EID11 : 1;
2215 unsigned EID12 : 1;
2216 unsigned EID13 : 1;
2217 unsigned EID14 : 1;
2218 unsigned EID15 : 1;
2219 } __TXB0EIDHbits_t;
2221 extern __at(0x0F43) volatile __TXB0EIDHbits_t TXB0EIDHbits;
2223 #define _TXB0EIDH_EID8 0x01
2224 #define _TXB0EIDH_EID9 0x02
2225 #define _TXB0EIDH_EID10 0x04
2226 #define _TXB0EIDH_EID11 0x08
2227 #define _TXB0EIDH_EID12 0x10
2228 #define _TXB0EIDH_EID13 0x20
2229 #define _TXB0EIDH_EID14 0x40
2230 #define _TXB0EIDH_EID15 0x80
2232 //==============================================================================
2235 //==============================================================================
2236 // TXB0EIDL Bits
2238 extern __at(0x0F44) __sfr TXB0EIDL;
2240 typedef struct
2242 unsigned EID0 : 1;
2243 unsigned EID1 : 1;
2244 unsigned EID2 : 1;
2245 unsigned EID3 : 1;
2246 unsigned EID4 : 1;
2247 unsigned EID5 : 1;
2248 unsigned EID6 : 1;
2249 unsigned EID7 : 1;
2250 } __TXB0EIDLbits_t;
2252 extern __at(0x0F44) volatile __TXB0EIDLbits_t TXB0EIDLbits;
2254 #define _TXB0EIDL_EID0 0x01
2255 #define _TXB0EIDL_EID1 0x02
2256 #define _TXB0EIDL_EID2 0x04
2257 #define _TXB0EIDL_EID3 0x08
2258 #define _TXB0EIDL_EID4 0x10
2259 #define _TXB0EIDL_EID5 0x20
2260 #define _TXB0EIDL_EID6 0x40
2261 #define _TXB0EIDL_EID7 0x80
2263 //==============================================================================
2266 //==============================================================================
2267 // TXB0DLC Bits
2269 extern __at(0x0F45) __sfr TXB0DLC;
2271 typedef union
2273 struct
2275 unsigned DLC0 : 1;
2276 unsigned DLC1 : 1;
2277 unsigned DLC2 : 1;
2278 unsigned DLC3 : 1;
2279 unsigned : 1;
2280 unsigned : 1;
2281 unsigned TXRTR : 1;
2282 unsigned : 1;
2285 struct
2287 unsigned DLC : 4;
2288 unsigned : 4;
2290 } __TXB0DLCbits_t;
2292 extern __at(0x0F45) volatile __TXB0DLCbits_t TXB0DLCbits;
2294 #define _TXB0DLC_DLC0 0x01
2295 #define _TXB0DLC_DLC1 0x02
2296 #define _TXB0DLC_DLC2 0x04
2297 #define _TXB0DLC_DLC3 0x08
2298 #define _TXB0DLC_TXRTR 0x40
2300 //==============================================================================
2303 //==============================================================================
2304 // TXB0D0 Bits
2306 extern __at(0x0F46) __sfr TXB0D0;
2308 typedef struct
2310 unsigned TXB0D00 : 1;
2311 unsigned TXB0D01 : 1;
2312 unsigned TXB0D02 : 1;
2313 unsigned TXB0D03 : 1;
2314 unsigned TXB0D04 : 1;
2315 unsigned TXB0D05 : 1;
2316 unsigned TXB0D06 : 1;
2317 unsigned TXB0D07 : 1;
2318 } __TXB0D0bits_t;
2320 extern __at(0x0F46) volatile __TXB0D0bits_t TXB0D0bits;
2322 #define _TXB0D00 0x01
2323 #define _TXB0D01 0x02
2324 #define _TXB0D02 0x04
2325 #define _TXB0D03 0x08
2326 #define _TXB0D04 0x10
2327 #define _TXB0D05 0x20
2328 #define _TXB0D06 0x40
2329 #define _TXB0D07 0x80
2331 //==============================================================================
2334 //==============================================================================
2335 // TXB0D1 Bits
2337 extern __at(0x0F47) __sfr TXB0D1;
2339 typedef struct
2341 unsigned TXB0D10 : 1;
2342 unsigned TXB0D11 : 1;
2343 unsigned TXB0D12 : 1;
2344 unsigned TXB0D13 : 1;
2345 unsigned TXB0D14 : 1;
2346 unsigned TXB0D15 : 1;
2347 unsigned TXB0D16 : 1;
2348 unsigned TXB0D17 : 1;
2349 } __TXB0D1bits_t;
2351 extern __at(0x0F47) volatile __TXB0D1bits_t TXB0D1bits;
2353 #define _TXB0D10 0x01
2354 #define _TXB0D11 0x02
2355 #define _TXB0D12 0x04
2356 #define _TXB0D13 0x08
2357 #define _TXB0D14 0x10
2358 #define _TXB0D15 0x20
2359 #define _TXB0D16 0x40
2360 #define _TXB0D17 0x80
2362 //==============================================================================
2365 //==============================================================================
2366 // TXB0D2 Bits
2368 extern __at(0x0F48) __sfr TXB0D2;
2370 typedef struct
2372 unsigned TXB0D20 : 1;
2373 unsigned TXB0D21 : 1;
2374 unsigned TXB0D22 : 1;
2375 unsigned TXB0D23 : 1;
2376 unsigned TXB0D24 : 1;
2377 unsigned TXB0D25 : 1;
2378 unsigned TXB0D26 : 1;
2379 unsigned TXB0D27 : 1;
2380 } __TXB0D2bits_t;
2382 extern __at(0x0F48) volatile __TXB0D2bits_t TXB0D2bits;
2384 #define _TXB0D20 0x01
2385 #define _TXB0D21 0x02
2386 #define _TXB0D22 0x04
2387 #define _TXB0D23 0x08
2388 #define _TXB0D24 0x10
2389 #define _TXB0D25 0x20
2390 #define _TXB0D26 0x40
2391 #define _TXB0D27 0x80
2393 //==============================================================================
2396 //==============================================================================
2397 // TXB0D3 Bits
2399 extern __at(0x0F49) __sfr TXB0D3;
2401 typedef struct
2403 unsigned TXB0D30 : 1;
2404 unsigned TXB0D31 : 1;
2405 unsigned TXB0D32 : 1;
2406 unsigned TXB0D33 : 1;
2407 unsigned TXB0D34 : 1;
2408 unsigned TXB0D35 : 1;
2409 unsigned TXB0D36 : 1;
2410 unsigned TXB0D37 : 1;
2411 } __TXB0D3bits_t;
2413 extern __at(0x0F49) volatile __TXB0D3bits_t TXB0D3bits;
2415 #define _TXB0D30 0x01
2416 #define _TXB0D31 0x02
2417 #define _TXB0D32 0x04
2418 #define _TXB0D33 0x08
2419 #define _TXB0D34 0x10
2420 #define _TXB0D35 0x20
2421 #define _TXB0D36 0x40
2422 #define _TXB0D37 0x80
2424 //==============================================================================
2427 //==============================================================================
2428 // TXB0D4 Bits
2430 extern __at(0x0F4A) __sfr TXB0D4;
2432 typedef struct
2434 unsigned TXB0D40 : 1;
2435 unsigned TXB0D41 : 1;
2436 unsigned TXB0D42 : 1;
2437 unsigned TXB0D43 : 1;
2438 unsigned TXB0D44 : 1;
2439 unsigned TXB0D45 : 1;
2440 unsigned TXB0D46 : 1;
2441 unsigned TXB0D47 : 1;
2442 } __TXB0D4bits_t;
2444 extern __at(0x0F4A) volatile __TXB0D4bits_t TXB0D4bits;
2446 #define _TXB0D40 0x01
2447 #define _TXB0D41 0x02
2448 #define _TXB0D42 0x04
2449 #define _TXB0D43 0x08
2450 #define _TXB0D44 0x10
2451 #define _TXB0D45 0x20
2452 #define _TXB0D46 0x40
2453 #define _TXB0D47 0x80
2455 //==============================================================================
2458 //==============================================================================
2459 // TXB0D5 Bits
2461 extern __at(0x0F4B) __sfr TXB0D5;
2463 typedef struct
2465 unsigned TXB0D50 : 1;
2466 unsigned TXB0D51 : 1;
2467 unsigned TXB0D52 : 1;
2468 unsigned TXB0D53 : 1;
2469 unsigned TXB0D54 : 1;
2470 unsigned TXB0D55 : 1;
2471 unsigned TXB0D56 : 1;
2472 unsigned TXB0D57 : 1;
2473 } __TXB0D5bits_t;
2475 extern __at(0x0F4B) volatile __TXB0D5bits_t TXB0D5bits;
2477 #define _TXB0D50 0x01
2478 #define _TXB0D51 0x02
2479 #define _TXB0D52 0x04
2480 #define _TXB0D53 0x08
2481 #define _TXB0D54 0x10
2482 #define _TXB0D55 0x20
2483 #define _TXB0D56 0x40
2484 #define _TXB0D57 0x80
2486 //==============================================================================
2489 //==============================================================================
2490 // TXB0D6 Bits
2492 extern __at(0x0F4C) __sfr TXB0D6;
2494 typedef struct
2496 unsigned TXB0D60 : 1;
2497 unsigned TXB0D61 : 1;
2498 unsigned TXB0D62 : 1;
2499 unsigned TXB0D63 : 1;
2500 unsigned TXB0D64 : 1;
2501 unsigned TXB0D65 : 1;
2502 unsigned TXB0D66 : 1;
2503 unsigned TXB0D67 : 1;
2504 } __TXB0D6bits_t;
2506 extern __at(0x0F4C) volatile __TXB0D6bits_t TXB0D6bits;
2508 #define _TXB0D60 0x01
2509 #define _TXB0D61 0x02
2510 #define _TXB0D62 0x04
2511 #define _TXB0D63 0x08
2512 #define _TXB0D64 0x10
2513 #define _TXB0D65 0x20
2514 #define _TXB0D66 0x40
2515 #define _TXB0D67 0x80
2517 //==============================================================================
2520 //==============================================================================
2521 // TXB0D7 Bits
2523 extern __at(0x0F4D) __sfr TXB0D7;
2525 typedef struct
2527 unsigned TXB0D70 : 1;
2528 unsigned TXB0D71 : 1;
2529 unsigned TXB0D72 : 1;
2530 unsigned TXB0D73 : 1;
2531 unsigned TXB0D74 : 1;
2532 unsigned TXB0D75 : 1;
2533 unsigned TXB0D76 : 1;
2534 unsigned TXB0D77 : 1;
2535 } __TXB0D7bits_t;
2537 extern __at(0x0F4D) volatile __TXB0D7bits_t TXB0D7bits;
2539 #define _TXB0D70 0x01
2540 #define _TXB0D71 0x02
2541 #define _TXB0D72 0x04
2542 #define _TXB0D73 0x08
2543 #define _TXB0D74 0x10
2544 #define _TXB0D75 0x20
2545 #define _TXB0D76 0x40
2546 #define _TXB0D77 0x80
2548 //==============================================================================
2551 //==============================================================================
2552 // CANSTATRO2 Bits
2554 extern __at(0x0F4E) __sfr CANSTATRO2;
2556 typedef union
2558 struct
2560 unsigned : 1;
2561 unsigned ICODE0 : 1;
2562 unsigned ICODE1 : 1;
2563 unsigned ICODE2 : 1;
2564 unsigned : 1;
2565 unsigned OPMODE0 : 1;
2566 unsigned OPMODE1 : 1;
2567 unsigned OPMODE2 : 1;
2570 struct
2572 unsigned : 1;
2573 unsigned ICODE : 3;
2574 unsigned : 4;
2577 struct
2579 unsigned : 5;
2580 unsigned OPMODE : 3;
2582 } __CANSTATRO2bits_t;
2584 extern __at(0x0F4E) volatile __CANSTATRO2bits_t CANSTATRO2bits;
2586 #define _CANSTATRO2_ICODE0 0x02
2587 #define _CANSTATRO2_ICODE1 0x04
2588 #define _CANSTATRO2_ICODE2 0x08
2589 #define _CANSTATRO2_OPMODE0 0x20
2590 #define _CANSTATRO2_OPMODE1 0x40
2591 #define _CANSTATRO2_OPMODE2 0x80
2593 //==============================================================================
2596 //==============================================================================
2597 // RXB1CON Bits
2599 extern __at(0x0F50) __sfr RXB1CON;
2601 typedef union
2603 struct
2605 unsigned FILHIT0 : 1;
2606 unsigned FILHIT1 : 1;
2607 unsigned FILHIT2 : 1;
2608 unsigned RXRTRRO : 1;
2609 unsigned : 1;
2610 unsigned RXM0 : 1;
2611 unsigned RXM1 : 1;
2612 unsigned RXFUL : 1;
2615 struct
2617 unsigned FILHIT : 3;
2618 unsigned : 5;
2621 struct
2623 unsigned : 5;
2624 unsigned RXM : 2;
2625 unsigned : 1;
2627 } __RXB1CONbits_t;
2629 extern __at(0x0F50) volatile __RXB1CONbits_t RXB1CONbits;
2631 #define _RXB1CON_FILHIT0 0x01
2632 #define _RXB1CON_FILHIT1 0x02
2633 #define _RXB1CON_FILHIT2 0x04
2634 #define _RXB1CON_RXRTRRO 0x08
2635 #define _RXB1CON_RXM0 0x20
2636 #define _RXB1CON_RXM1 0x40
2637 #define _RXB1CON_RXFUL 0x80
2639 //==============================================================================
2642 //==============================================================================
2643 // RXB1SIDH Bits
2645 extern __at(0x0F51) __sfr RXB1SIDH;
2647 typedef struct
2649 unsigned SID3 : 1;
2650 unsigned SID4 : 1;
2651 unsigned SID5 : 1;
2652 unsigned SID6 : 1;
2653 unsigned SID7 : 1;
2654 unsigned SID8 : 1;
2655 unsigned SID9 : 1;
2656 unsigned SID10 : 1;
2657 } __RXB1SIDHbits_t;
2659 extern __at(0x0F51) volatile __RXB1SIDHbits_t RXB1SIDHbits;
2661 #define _RXB1SIDH_SID3 0x01
2662 #define _RXB1SIDH_SID4 0x02
2663 #define _RXB1SIDH_SID5 0x04
2664 #define _RXB1SIDH_SID6 0x08
2665 #define _RXB1SIDH_SID7 0x10
2666 #define _RXB1SIDH_SID8 0x20
2667 #define _RXB1SIDH_SID9 0x40
2668 #define _RXB1SIDH_SID10 0x80
2670 //==============================================================================
2673 //==============================================================================
2674 // RXB1SIDL Bits
2676 extern __at(0x0F52) __sfr RXB1SIDL;
2678 typedef union
2680 struct
2682 unsigned EID16 : 1;
2683 unsigned EID17 : 1;
2684 unsigned : 1;
2685 unsigned EXID : 1;
2686 unsigned SRR : 1;
2687 unsigned SID0 : 1;
2688 unsigned SID1 : 1;
2689 unsigned SID2 : 1;
2692 struct
2694 unsigned : 5;
2695 unsigned SID : 3;
2697 } __RXB1SIDLbits_t;
2699 extern __at(0x0F52) volatile __RXB1SIDLbits_t RXB1SIDLbits;
2701 #define _RXB1SIDL_EID16 0x01
2702 #define _RXB1SIDL_EID17 0x02
2703 #define _RXB1SIDL_EXID 0x08
2704 #define _RXB1SIDL_SRR 0x10
2705 #define _RXB1SIDL_SID0 0x20
2706 #define _RXB1SIDL_SID1 0x40
2707 #define _RXB1SIDL_SID2 0x80
2709 //==============================================================================
2712 //==============================================================================
2713 // RXB1EIDH Bits
2715 extern __at(0x0F53) __sfr RXB1EIDH;
2717 typedef struct
2719 unsigned EID8 : 1;
2720 unsigned EID9 : 1;
2721 unsigned EID10 : 1;
2722 unsigned EID11 : 1;
2723 unsigned EID12 : 1;
2724 unsigned EID13 : 1;
2725 unsigned EID14 : 1;
2726 unsigned EID15 : 1;
2727 } __RXB1EIDHbits_t;
2729 extern __at(0x0F53) volatile __RXB1EIDHbits_t RXB1EIDHbits;
2731 #define _RXB1EIDH_EID8 0x01
2732 #define _RXB1EIDH_EID9 0x02
2733 #define _RXB1EIDH_EID10 0x04
2734 #define _RXB1EIDH_EID11 0x08
2735 #define _RXB1EIDH_EID12 0x10
2736 #define _RXB1EIDH_EID13 0x20
2737 #define _RXB1EIDH_EID14 0x40
2738 #define _RXB1EIDH_EID15 0x80
2740 //==============================================================================
2743 //==============================================================================
2744 // RXB1EIDL Bits
2746 extern __at(0x0F54) __sfr RXB1EIDL;
2748 typedef struct
2750 unsigned EID0 : 1;
2751 unsigned EID1 : 1;
2752 unsigned EID2 : 1;
2753 unsigned EID3 : 1;
2754 unsigned EID4 : 1;
2755 unsigned EID5 : 1;
2756 unsigned EID6 : 1;
2757 unsigned EID7 : 1;
2758 } __RXB1EIDLbits_t;
2760 extern __at(0x0F54) volatile __RXB1EIDLbits_t RXB1EIDLbits;
2762 #define _RXB1EIDL_EID0 0x01
2763 #define _RXB1EIDL_EID1 0x02
2764 #define _RXB1EIDL_EID2 0x04
2765 #define _RXB1EIDL_EID3 0x08
2766 #define _RXB1EIDL_EID4 0x10
2767 #define _RXB1EIDL_EID5 0x20
2768 #define _RXB1EIDL_EID6 0x40
2769 #define _RXB1EIDL_EID7 0x80
2771 //==============================================================================
2774 //==============================================================================
2775 // RXB1DLC Bits
2777 extern __at(0x0F55) __sfr RXB1DLC;
2779 typedef union
2781 struct
2783 unsigned DLC0 : 1;
2784 unsigned DLC1 : 1;
2785 unsigned DLC2 : 1;
2786 unsigned DLC3 : 1;
2787 unsigned RB0 : 1;
2788 unsigned RB1 : 1;
2789 unsigned RXRTR : 1;
2790 unsigned : 1;
2793 struct
2795 unsigned : 1;
2796 unsigned : 1;
2797 unsigned : 1;
2798 unsigned : 1;
2799 unsigned RESB0 : 1;
2800 unsigned RESB1 : 1;
2801 unsigned : 1;
2802 unsigned : 1;
2805 struct
2807 unsigned DLC : 4;
2808 unsigned : 4;
2811 struct
2813 unsigned : 4;
2814 unsigned RB : 2;
2815 unsigned : 2;
2818 struct
2820 unsigned : 4;
2821 unsigned RESB : 2;
2822 unsigned : 2;
2824 } __RXB1DLCbits_t;
2826 extern __at(0x0F55) volatile __RXB1DLCbits_t RXB1DLCbits;
2828 #define _RXB1DLC_DLC0 0x01
2829 #define _RXB1DLC_DLC1 0x02
2830 #define _RXB1DLC_DLC2 0x04
2831 #define _RXB1DLC_DLC3 0x08
2832 #define _RXB1DLC_RB0 0x10
2833 #define _RXB1DLC_RESB0 0x10
2834 #define _RXB1DLC_RB1 0x20
2835 #define _RXB1DLC_RESB1 0x20
2836 #define _RXB1DLC_RXRTR 0x40
2838 //==============================================================================
2841 //==============================================================================
2842 // RXB1D0 Bits
2844 extern __at(0x0F56) __sfr RXB1D0;
2846 typedef struct
2848 unsigned RXB1D00 : 1;
2849 unsigned RXB1D01 : 1;
2850 unsigned RXB1D02 : 1;
2851 unsigned RXB1D03 : 1;
2852 unsigned RXB1D04 : 1;
2853 unsigned RXB1D05 : 1;
2854 unsigned RXB1D06 : 1;
2855 unsigned RXB1D07 : 1;
2856 } __RXB1D0bits_t;
2858 extern __at(0x0F56) volatile __RXB1D0bits_t RXB1D0bits;
2860 #define _RXB1D00 0x01
2861 #define _RXB1D01 0x02
2862 #define _RXB1D02 0x04
2863 #define _RXB1D03 0x08
2864 #define _RXB1D04 0x10
2865 #define _RXB1D05 0x20
2866 #define _RXB1D06 0x40
2867 #define _RXB1D07 0x80
2869 //==============================================================================
2872 //==============================================================================
2873 // RXB1D1 Bits
2875 extern __at(0x0F57) __sfr RXB1D1;
2877 typedef struct
2879 unsigned RXB1D10 : 1;
2880 unsigned RXB1D11 : 1;
2881 unsigned RXB1D12 : 1;
2882 unsigned RXB1D13 : 1;
2883 unsigned RXB1D14 : 1;
2884 unsigned RXB1D15 : 1;
2885 unsigned RXB1D16 : 1;
2886 unsigned RXB1D17 : 1;
2887 } __RXB1D1bits_t;
2889 extern __at(0x0F57) volatile __RXB1D1bits_t RXB1D1bits;
2891 #define _RXB1D10 0x01
2892 #define _RXB1D11 0x02
2893 #define _RXB1D12 0x04
2894 #define _RXB1D13 0x08
2895 #define _RXB1D14 0x10
2896 #define _RXB1D15 0x20
2897 #define _RXB1D16 0x40
2898 #define _RXB1D17 0x80
2900 //==============================================================================
2903 //==============================================================================
2904 // RXB1D2 Bits
2906 extern __at(0x0F58) __sfr RXB1D2;
2908 typedef struct
2910 unsigned RXB1D20 : 1;
2911 unsigned RXB1D21 : 1;
2912 unsigned RXB1D22 : 1;
2913 unsigned RXB1D23 : 1;
2914 unsigned RXB1D24 : 1;
2915 unsigned RXB1D25 : 1;
2916 unsigned RXB1D26 : 1;
2917 unsigned RXB1D27 : 1;
2918 } __RXB1D2bits_t;
2920 extern __at(0x0F58) volatile __RXB1D2bits_t RXB1D2bits;
2922 #define _RXB1D20 0x01
2923 #define _RXB1D21 0x02
2924 #define _RXB1D22 0x04
2925 #define _RXB1D23 0x08
2926 #define _RXB1D24 0x10
2927 #define _RXB1D25 0x20
2928 #define _RXB1D26 0x40
2929 #define _RXB1D27 0x80
2931 //==============================================================================
2934 //==============================================================================
2935 // RXB1D3 Bits
2937 extern __at(0x0F59) __sfr RXB1D3;
2939 typedef struct
2941 unsigned RXB1D30 : 1;
2942 unsigned RXB1D31 : 1;
2943 unsigned RXB1D32 : 1;
2944 unsigned RXB1D33 : 1;
2945 unsigned RXB1D34 : 1;
2946 unsigned RXB1D35 : 1;
2947 unsigned RXB1D36 : 1;
2948 unsigned RXB1D37 : 1;
2949 } __RXB1D3bits_t;
2951 extern __at(0x0F59) volatile __RXB1D3bits_t RXB1D3bits;
2953 #define _RXB1D30 0x01
2954 #define _RXB1D31 0x02
2955 #define _RXB1D32 0x04
2956 #define _RXB1D33 0x08
2957 #define _RXB1D34 0x10
2958 #define _RXB1D35 0x20
2959 #define _RXB1D36 0x40
2960 #define _RXB1D37 0x80
2962 //==============================================================================
2965 //==============================================================================
2966 // RXB1D4 Bits
2968 extern __at(0x0F5A) __sfr RXB1D4;
2970 typedef struct
2972 unsigned RXB1D40 : 1;
2973 unsigned RXB1D41 : 1;
2974 unsigned RXB1D42 : 1;
2975 unsigned RXB1D43 : 1;
2976 unsigned RXB1D44 : 1;
2977 unsigned RXB1D45 : 1;
2978 unsigned RXB1D46 : 1;
2979 unsigned RXB1D47 : 1;
2980 } __RXB1D4bits_t;
2982 extern __at(0x0F5A) volatile __RXB1D4bits_t RXB1D4bits;
2984 #define _RXB1D40 0x01
2985 #define _RXB1D41 0x02
2986 #define _RXB1D42 0x04
2987 #define _RXB1D43 0x08
2988 #define _RXB1D44 0x10
2989 #define _RXB1D45 0x20
2990 #define _RXB1D46 0x40
2991 #define _RXB1D47 0x80
2993 //==============================================================================
2996 //==============================================================================
2997 // RXB1D5 Bits
2999 extern __at(0x0F5B) __sfr RXB1D5;
3001 typedef struct
3003 unsigned RXB1D50 : 1;
3004 unsigned RXB1D51 : 1;
3005 unsigned RXB1D52 : 1;
3006 unsigned RXB1D53 : 1;
3007 unsigned RXB1D54 : 1;
3008 unsigned RXB1D55 : 1;
3009 unsigned RXB1D56 : 1;
3010 unsigned RXB1D57 : 1;
3011 } __RXB1D5bits_t;
3013 extern __at(0x0F5B) volatile __RXB1D5bits_t RXB1D5bits;
3015 #define _RXB1D50 0x01
3016 #define _RXB1D51 0x02
3017 #define _RXB1D52 0x04
3018 #define _RXB1D53 0x08
3019 #define _RXB1D54 0x10
3020 #define _RXB1D55 0x20
3021 #define _RXB1D56 0x40
3022 #define _RXB1D57 0x80
3024 //==============================================================================
3027 //==============================================================================
3028 // RXB1D6 Bits
3030 extern __at(0x0F5C) __sfr RXB1D6;
3032 typedef struct
3034 unsigned RXB1D60 : 1;
3035 unsigned RXB1D61 : 1;
3036 unsigned RXB1D62 : 1;
3037 unsigned RXB1D63 : 1;
3038 unsigned RXB1D64 : 1;
3039 unsigned RXB1D65 : 1;
3040 unsigned RXB1D66 : 1;
3041 unsigned RXB1D67 : 1;
3042 } __RXB1D6bits_t;
3044 extern __at(0x0F5C) volatile __RXB1D6bits_t RXB1D6bits;
3046 #define _RXB1D60 0x01
3047 #define _RXB1D61 0x02
3048 #define _RXB1D62 0x04
3049 #define _RXB1D63 0x08
3050 #define _RXB1D64 0x10
3051 #define _RXB1D65 0x20
3052 #define _RXB1D66 0x40
3053 #define _RXB1D67 0x80
3055 //==============================================================================
3058 //==============================================================================
3059 // RXB1D7 Bits
3061 extern __at(0x0F5D) __sfr RXB1D7;
3063 typedef struct
3065 unsigned RXB1D70 : 1;
3066 unsigned RXB1D71 : 1;
3067 unsigned RXB1D72 : 1;
3068 unsigned RXB1D73 : 1;
3069 unsigned RXB1D74 : 1;
3070 unsigned RXB1D75 : 1;
3071 unsigned RXB1D76 : 1;
3072 unsigned RXB1D77 : 1;
3073 } __RXB1D7bits_t;
3075 extern __at(0x0F5D) volatile __RXB1D7bits_t RXB1D7bits;
3077 #define _RXB1D70 0x01
3078 #define _RXB1D71 0x02
3079 #define _RXB1D72 0x04
3080 #define _RXB1D73 0x08
3081 #define _RXB1D74 0x10
3082 #define _RXB1D75 0x20
3083 #define _RXB1D76 0x40
3084 #define _RXB1D77 0x80
3086 //==============================================================================
3089 //==============================================================================
3090 // CANSTATRO1 Bits
3092 extern __at(0x0F5E) __sfr CANSTATRO1;
3094 typedef union
3096 struct
3098 unsigned : 1;
3099 unsigned ICODE0 : 1;
3100 unsigned ICODE1 : 1;
3101 unsigned ICODE2 : 1;
3102 unsigned : 1;
3103 unsigned OPMODE0 : 1;
3104 unsigned OPMODE1 : 1;
3105 unsigned OPMODE2 : 1;
3108 struct
3110 unsigned : 1;
3111 unsigned ICODE : 3;
3112 unsigned : 4;
3115 struct
3117 unsigned : 5;
3118 unsigned OPMODE : 3;
3120 } __CANSTATRO1bits_t;
3122 extern __at(0x0F5E) volatile __CANSTATRO1bits_t CANSTATRO1bits;
3124 #define _CANSTATRO1_ICODE0 0x02
3125 #define _CANSTATRO1_ICODE1 0x04
3126 #define _CANSTATRO1_ICODE2 0x08
3127 #define _CANSTATRO1_OPMODE0 0x20
3128 #define _CANSTATRO1_OPMODE1 0x40
3129 #define _CANSTATRO1_OPMODE2 0x80
3131 //==============================================================================
3134 //==============================================================================
3135 // RXB0CON Bits
3137 extern __at(0x0F60) __sfr RXB0CON;
3139 typedef union
3141 struct
3143 unsigned FILHIT0 : 1;
3144 unsigned JTOFF : 1;
3145 unsigned RXB0DBEN : 1;
3146 unsigned RXRTRRO : 1;
3147 unsigned : 1;
3148 unsigned RXM0 : 1;
3149 unsigned RXM1 : 1;
3150 unsigned RXFUL : 1;
3153 struct
3155 unsigned : 5;
3156 unsigned RXM : 2;
3157 unsigned : 1;
3159 } __RXB0CONbits_t;
3161 extern __at(0x0F60) volatile __RXB0CONbits_t RXB0CONbits;
3163 #define _FILHIT0 0x01
3164 #define _JTOFF 0x02
3165 #define _RXB0DBEN 0x04
3166 #define _RXRTRRO 0x08
3167 #define _RXM0 0x20
3168 #define _RXM1 0x40
3169 #define _RXFUL 0x80
3171 //==============================================================================
3174 //==============================================================================
3175 // RXB0SIDH Bits
3177 extern __at(0x0F61) __sfr RXB0SIDH;
3179 typedef struct
3181 unsigned SID3 : 1;
3182 unsigned SID4 : 1;
3183 unsigned SID5 : 1;
3184 unsigned SID6 : 1;
3185 unsigned SID7 : 1;
3186 unsigned SID8 : 1;
3187 unsigned SID9 : 1;
3188 unsigned SID10 : 1;
3189 } __RXB0SIDHbits_t;
3191 extern __at(0x0F61) volatile __RXB0SIDHbits_t RXB0SIDHbits;
3193 #define _SID3 0x01
3194 #define _SID4 0x02
3195 #define _SID5 0x04
3196 #define _SID6 0x08
3197 #define _SID7 0x10
3198 #define _SID8 0x20
3199 #define _SID9 0x40
3200 #define _SID10 0x80
3202 //==============================================================================
3205 //==============================================================================
3206 // RXB0SIDL Bits
3208 extern __at(0x0F62) __sfr RXB0SIDL;
3210 typedef union
3212 struct
3214 unsigned EID16 : 1;
3215 unsigned EID17 : 1;
3216 unsigned : 1;
3217 unsigned EXID : 1;
3218 unsigned SRR : 1;
3219 unsigned SID0 : 1;
3220 unsigned SID1 : 1;
3221 unsigned SID2 : 1;
3224 struct
3226 unsigned : 5;
3227 unsigned SID : 3;
3229 } __RXB0SIDLbits_t;
3231 extern __at(0x0F62) volatile __RXB0SIDLbits_t RXB0SIDLbits;
3233 #define _EID16 0x01
3234 #define _EID17 0x02
3235 #define _EXID 0x08
3236 #define _SRR 0x10
3237 #define _SID0 0x20
3238 #define _SID1 0x40
3239 #define _SID2 0x80
3241 //==============================================================================
3244 //==============================================================================
3245 // RXB0EIDH Bits
3247 extern __at(0x0F63) __sfr RXB0EIDH;
3249 typedef struct
3251 unsigned EID8 : 1;
3252 unsigned EID9 : 1;
3253 unsigned EID10 : 1;
3254 unsigned EID11 : 1;
3255 unsigned EID12 : 1;
3256 unsigned EID13 : 1;
3257 unsigned EID14 : 1;
3258 unsigned EID15 : 1;
3259 } __RXB0EIDHbits_t;
3261 extern __at(0x0F63) volatile __RXB0EIDHbits_t RXB0EIDHbits;
3263 #define _EID8 0x01
3264 #define _EID9 0x02
3265 #define _EID10 0x04
3266 #define _EID11 0x08
3267 #define _EID12 0x10
3268 #define _EID13 0x20
3269 #define _EID14 0x40
3270 #define _EID15 0x80
3272 //==============================================================================
3275 //==============================================================================
3276 // RXB0EIDL Bits
3278 extern __at(0x0F64) __sfr RXB0EIDL;
3280 typedef struct
3282 unsigned EID0 : 1;
3283 unsigned EID1 : 1;
3284 unsigned EID2 : 1;
3285 unsigned EID3 : 1;
3286 unsigned EID4 : 1;
3287 unsigned EID5 : 1;
3288 unsigned EID6 : 1;
3289 unsigned EID7 : 1;
3290 } __RXB0EIDLbits_t;
3292 extern __at(0x0F64) volatile __RXB0EIDLbits_t RXB0EIDLbits;
3294 #define _EID0 0x01
3295 #define _EID1 0x02
3296 #define _EID2 0x04
3297 #define _EID3 0x08
3298 #define _EID4 0x10
3299 #define _EID5 0x20
3300 #define _EID6 0x40
3301 #define _EID7 0x80
3303 //==============================================================================
3306 //==============================================================================
3307 // RXB0DLC Bits
3309 extern __at(0x0F65) __sfr RXB0DLC;
3311 typedef union
3313 struct
3315 unsigned DLC0 : 1;
3316 unsigned DLC1 : 1;
3317 unsigned DLC2 : 1;
3318 unsigned DLC3 : 1;
3319 unsigned RB0 : 1;
3320 unsigned RB1 : 1;
3321 unsigned RXRTR : 1;
3322 unsigned : 1;
3325 struct
3327 unsigned : 1;
3328 unsigned : 1;
3329 unsigned : 1;
3330 unsigned : 1;
3331 unsigned RESB0 : 1;
3332 unsigned RESB1 : 1;
3333 unsigned : 1;
3334 unsigned : 1;
3337 struct
3339 unsigned DLC : 4;
3340 unsigned : 4;
3343 struct
3345 unsigned : 4;
3346 unsigned RB : 2;
3347 unsigned : 2;
3350 struct
3352 unsigned : 4;
3353 unsigned RESB : 2;
3354 unsigned : 2;
3356 } __RXB0DLCbits_t;
3358 extern __at(0x0F65) volatile __RXB0DLCbits_t RXB0DLCbits;
3360 #define _RXB0DLC_DLC0 0x01
3361 #define _RXB0DLC_DLC1 0x02
3362 #define _RXB0DLC_DLC2 0x04
3363 #define _RXB0DLC_DLC3 0x08
3364 #define _RXB0DLC_RB0 0x10
3365 #define _RXB0DLC_RESB0 0x10
3366 #define _RXB0DLC_RB1 0x20
3367 #define _RXB0DLC_RESB1 0x20
3368 #define _RXB0DLC_RXRTR 0x40
3370 //==============================================================================
3373 //==============================================================================
3374 // RXB0D0 Bits
3376 extern __at(0x0F66) __sfr RXB0D0;
3378 typedef union
3380 struct
3382 unsigned RXB0D00 : 1;
3383 unsigned RXB0D01 : 1;
3384 unsigned RXB0D02 : 1;
3385 unsigned RXB0D03 : 1;
3386 unsigned RXB0D04 : 1;
3387 unsigned RXB0D05 : 1;
3388 unsigned RXB0D06 : 1;
3389 unsigned RXB0D07 : 1;
3392 struct
3394 unsigned RB0D00 : 1;
3395 unsigned RB0D01 : 1;
3396 unsigned RB0D02 : 1;
3397 unsigned RB0D03 : 1;
3398 unsigned RB0D04 : 1;
3399 unsigned RB0D05 : 1;
3400 unsigned RB0D06 : 1;
3401 unsigned RB0D07 : 1;
3403 } __RXB0D0bits_t;
3405 extern __at(0x0F66) volatile __RXB0D0bits_t RXB0D0bits;
3407 #define _RXB0D00 0x01
3408 #define _RB0D00 0x01
3409 #define _RXB0D01 0x02
3410 #define _RB0D01 0x02
3411 #define _RXB0D02 0x04
3412 #define _RB0D02 0x04
3413 #define _RXB0D03 0x08
3414 #define _RB0D03 0x08
3415 #define _RXB0D04 0x10
3416 #define _RB0D04 0x10
3417 #define _RXB0D05 0x20
3418 #define _RB0D05 0x20
3419 #define _RXB0D06 0x40
3420 #define _RB0D06 0x40
3421 #define _RXB0D07 0x80
3422 #define _RB0D07 0x80
3424 //==============================================================================
3427 //==============================================================================
3428 // RXB0D1 Bits
3430 extern __at(0x0F67) __sfr RXB0D1;
3432 typedef union
3434 struct
3436 unsigned RXB0D10 : 1;
3437 unsigned RXB0D11 : 1;
3438 unsigned RXB0D12 : 1;
3439 unsigned RXB0D13 : 1;
3440 unsigned RXB0D14 : 1;
3441 unsigned RXB0D15 : 1;
3442 unsigned RXB0D16 : 1;
3443 unsigned RXB0D17 : 1;
3446 struct
3448 unsigned RB0D10 : 1;
3449 unsigned RB0D11 : 1;
3450 unsigned RB0D12 : 1;
3451 unsigned RB0D13 : 1;
3452 unsigned RB0D14 : 1;
3453 unsigned RB0D15 : 1;
3454 unsigned RB0D16 : 1;
3455 unsigned RB0D17 : 1;
3457 } __RXB0D1bits_t;
3459 extern __at(0x0F67) volatile __RXB0D1bits_t RXB0D1bits;
3461 #define _RXB0D10 0x01
3462 #define _RB0D10 0x01
3463 #define _RXB0D11 0x02
3464 #define _RB0D11 0x02
3465 #define _RXB0D12 0x04
3466 #define _RB0D12 0x04
3467 #define _RXB0D13 0x08
3468 #define _RB0D13 0x08
3469 #define _RXB0D14 0x10
3470 #define _RB0D14 0x10
3471 #define _RXB0D15 0x20
3472 #define _RB0D15 0x20
3473 #define _RXB0D16 0x40
3474 #define _RB0D16 0x40
3475 #define _RXB0D17 0x80
3476 #define _RB0D17 0x80
3478 //==============================================================================
3481 //==============================================================================
3482 // RXB0D2 Bits
3484 extern __at(0x0F68) __sfr RXB0D2;
3486 typedef union
3488 struct
3490 unsigned RXB0D20 : 1;
3491 unsigned RXB0D21 : 1;
3492 unsigned RXB0D22 : 1;
3493 unsigned RXB0D23 : 1;
3494 unsigned RXB0D24 : 1;
3495 unsigned RXB0D25 : 1;
3496 unsigned RXB0D26 : 1;
3497 unsigned RXB0D27 : 1;
3500 struct
3502 unsigned RB0D20 : 1;
3503 unsigned RB0D21 : 1;
3504 unsigned RB0D22 : 1;
3505 unsigned RB0D23 : 1;
3506 unsigned RB0D24 : 1;
3507 unsigned RB0D25 : 1;
3508 unsigned RB0D26 : 1;
3509 unsigned RB0D27 : 1;
3511 } __RXB0D2bits_t;
3513 extern __at(0x0F68) volatile __RXB0D2bits_t RXB0D2bits;
3515 #define _RXB0D20 0x01
3516 #define _RB0D20 0x01
3517 #define _RXB0D21 0x02
3518 #define _RB0D21 0x02
3519 #define _RXB0D22 0x04
3520 #define _RB0D22 0x04
3521 #define _RXB0D23 0x08
3522 #define _RB0D23 0x08
3523 #define _RXB0D24 0x10
3524 #define _RB0D24 0x10
3525 #define _RXB0D25 0x20
3526 #define _RB0D25 0x20
3527 #define _RXB0D26 0x40
3528 #define _RB0D26 0x40
3529 #define _RXB0D27 0x80
3530 #define _RB0D27 0x80
3532 //==============================================================================
3535 //==============================================================================
3536 // RXB0D3 Bits
3538 extern __at(0x0F69) __sfr RXB0D3;
3540 typedef union
3542 struct
3544 unsigned RXB0D30 : 1;
3545 unsigned RXB0D31 : 1;
3546 unsigned RXB0D32 : 1;
3547 unsigned RXB0D33 : 1;
3548 unsigned RXB0D34 : 1;
3549 unsigned RXB0D35 : 1;
3550 unsigned RXB0D36 : 1;
3551 unsigned RXB0D37 : 1;
3554 struct
3556 unsigned RB0D30 : 1;
3557 unsigned RB0D31 : 1;
3558 unsigned RB0D32 : 1;
3559 unsigned RB0D33 : 1;
3560 unsigned RB0D34 : 1;
3561 unsigned RB0D35 : 1;
3562 unsigned RB0D36 : 1;
3563 unsigned RB0D37 : 1;
3565 } __RXB0D3bits_t;
3567 extern __at(0x0F69) volatile __RXB0D3bits_t RXB0D3bits;
3569 #define _RXB0D30 0x01
3570 #define _RB0D30 0x01
3571 #define _RXB0D31 0x02
3572 #define _RB0D31 0x02
3573 #define _RXB0D32 0x04
3574 #define _RB0D32 0x04
3575 #define _RXB0D33 0x08
3576 #define _RB0D33 0x08
3577 #define _RXB0D34 0x10
3578 #define _RB0D34 0x10
3579 #define _RXB0D35 0x20
3580 #define _RB0D35 0x20
3581 #define _RXB0D36 0x40
3582 #define _RB0D36 0x40
3583 #define _RXB0D37 0x80
3584 #define _RB0D37 0x80
3586 //==============================================================================
3589 //==============================================================================
3590 // RXB0D4 Bits
3592 extern __at(0x0F6A) __sfr RXB0D4;
3594 typedef union
3596 struct
3598 unsigned RXB0D40 : 1;
3599 unsigned RXB0D41 : 1;
3600 unsigned RXB0D42 : 1;
3601 unsigned RXB0D43 : 1;
3602 unsigned RXB0D44 : 1;
3603 unsigned RXB0D45 : 1;
3604 unsigned RXB0D46 : 1;
3605 unsigned RXB0D47 : 1;
3608 struct
3610 unsigned RB0D40 : 1;
3611 unsigned RB0D41 : 1;
3612 unsigned RB0D42 : 1;
3613 unsigned RB0D43 : 1;
3614 unsigned RB0D44 : 1;
3615 unsigned RB0D45 : 1;
3616 unsigned RB0D46 : 1;
3617 unsigned RB0D47 : 1;
3619 } __RXB0D4bits_t;
3621 extern __at(0x0F6A) volatile __RXB0D4bits_t RXB0D4bits;
3623 #define _RXB0D40 0x01
3624 #define _RB0D40 0x01
3625 #define _RXB0D41 0x02
3626 #define _RB0D41 0x02
3627 #define _RXB0D42 0x04
3628 #define _RB0D42 0x04
3629 #define _RXB0D43 0x08
3630 #define _RB0D43 0x08
3631 #define _RXB0D44 0x10
3632 #define _RB0D44 0x10
3633 #define _RXB0D45 0x20
3634 #define _RB0D45 0x20
3635 #define _RXB0D46 0x40
3636 #define _RB0D46 0x40
3637 #define _RXB0D47 0x80
3638 #define _RB0D47 0x80
3640 //==============================================================================
3643 //==============================================================================
3644 // RXB0D5 Bits
3646 extern __at(0x0F6B) __sfr RXB0D5;
3648 typedef union
3650 struct
3652 unsigned RXB0D50 : 1;
3653 unsigned RXB0D51 : 1;
3654 unsigned RXB0D52 : 1;
3655 unsigned RXB0D53 : 1;
3656 unsigned RXB0D54 : 1;
3657 unsigned RXB0D55 : 1;
3658 unsigned RXB0D56 : 1;
3659 unsigned RXB0D57 : 1;
3662 struct
3664 unsigned RB0D50 : 1;
3665 unsigned RB0D51 : 1;
3666 unsigned RB0D52 : 1;
3667 unsigned RB0D53 : 1;
3668 unsigned RB0D54 : 1;
3669 unsigned RB0D55 : 1;
3670 unsigned RB0D56 : 1;
3671 unsigned RB0D57 : 1;
3673 } __RXB0D5bits_t;
3675 extern __at(0x0F6B) volatile __RXB0D5bits_t RXB0D5bits;
3677 #define _RXB0D50 0x01
3678 #define _RB0D50 0x01
3679 #define _RXB0D51 0x02
3680 #define _RB0D51 0x02
3681 #define _RXB0D52 0x04
3682 #define _RB0D52 0x04
3683 #define _RXB0D53 0x08
3684 #define _RB0D53 0x08
3685 #define _RXB0D54 0x10
3686 #define _RB0D54 0x10
3687 #define _RXB0D55 0x20
3688 #define _RB0D55 0x20
3689 #define _RXB0D56 0x40
3690 #define _RB0D56 0x40
3691 #define _RXB0D57 0x80
3692 #define _RB0D57 0x80
3694 //==============================================================================
3697 //==============================================================================
3698 // RXB0D6 Bits
3700 extern __at(0x0F6C) __sfr RXB0D6;
3702 typedef union
3704 struct
3706 unsigned RXB0D60 : 1;
3707 unsigned RXB0D61 : 1;
3708 unsigned RXB0D62 : 1;
3709 unsigned RXB0D63 : 1;
3710 unsigned RXB0D64 : 1;
3711 unsigned RXB0D65 : 1;
3712 unsigned RXB0D66 : 1;
3713 unsigned RXB0D67 : 1;
3716 struct
3718 unsigned RB0D60 : 1;
3719 unsigned RB0D61 : 1;
3720 unsigned RB0D62 : 1;
3721 unsigned RB0D63 : 1;
3722 unsigned RB0D64 : 1;
3723 unsigned RB0D65 : 1;
3724 unsigned RB0D66 : 1;
3725 unsigned RB0D67 : 1;
3727 } __RXB0D6bits_t;
3729 extern __at(0x0F6C) volatile __RXB0D6bits_t RXB0D6bits;
3731 #define _RXB0D60 0x01
3732 #define _RB0D60 0x01
3733 #define _RXB0D61 0x02
3734 #define _RB0D61 0x02
3735 #define _RXB0D62 0x04
3736 #define _RB0D62 0x04
3737 #define _RXB0D63 0x08
3738 #define _RB0D63 0x08
3739 #define _RXB0D64 0x10
3740 #define _RB0D64 0x10
3741 #define _RXB0D65 0x20
3742 #define _RB0D65 0x20
3743 #define _RXB0D66 0x40
3744 #define _RB0D66 0x40
3745 #define _RXB0D67 0x80
3746 #define _RB0D67 0x80
3748 //==============================================================================
3751 //==============================================================================
3752 // RXB0D7 Bits
3754 extern __at(0x0F6D) __sfr RXB0D7;
3756 typedef union
3758 struct
3760 unsigned RXB0D70 : 1;
3761 unsigned RXB0D71 : 1;
3762 unsigned RXB0D72 : 1;
3763 unsigned RXB0D73 : 1;
3764 unsigned RXB0D74 : 1;
3765 unsigned RXB0D75 : 1;
3766 unsigned RXB0D76 : 1;
3767 unsigned RXB0D77 : 1;
3770 struct
3772 unsigned RB0D70 : 1;
3773 unsigned RB0D71 : 1;
3774 unsigned RB0D72 : 1;
3775 unsigned RB0D73 : 1;
3776 unsigned RB0D74 : 1;
3777 unsigned RB0D75 : 1;
3778 unsigned RB0D76 : 1;
3779 unsigned RB0D77 : 1;
3781 } __RXB0D7bits_t;
3783 extern __at(0x0F6D) volatile __RXB0D7bits_t RXB0D7bits;
3785 #define _RXB0D70 0x01
3786 #define _RB0D70 0x01
3787 #define _RXB0D71 0x02
3788 #define _RB0D71 0x02
3789 #define _RXB0D72 0x04
3790 #define _RB0D72 0x04
3791 #define _RXB0D73 0x08
3792 #define _RB0D73 0x08
3793 #define _RXB0D74 0x10
3794 #define _RB0D74 0x10
3795 #define _RXB0D75 0x20
3796 #define _RB0D75 0x20
3797 #define _RXB0D76 0x40
3798 #define _RB0D76 0x40
3799 #define _RXB0D77 0x80
3800 #define _RB0D77 0x80
3802 //==============================================================================
3805 //==============================================================================
3806 // CANSTAT Bits
3808 extern __at(0x0F6E) __sfr CANSTAT;
3810 typedef union
3812 struct
3814 unsigned : 1;
3815 unsigned ICODE0 : 1;
3816 unsigned ICODE1 : 1;
3817 unsigned ICODE2 : 1;
3818 unsigned : 1;
3819 unsigned OPMODE0 : 1;
3820 unsigned OPMODE1 : 1;
3821 unsigned OPMODE2 : 1;
3824 struct
3826 unsigned : 1;
3827 unsigned ICODE : 3;
3828 unsigned : 4;
3831 struct
3833 unsigned : 5;
3834 unsigned OPMODE : 3;
3836 } __CANSTATbits_t;
3838 extern __at(0x0F6E) volatile __CANSTATbits_t CANSTATbits;
3840 #define _ICODE0 0x02
3841 #define _ICODE1 0x04
3842 #define _ICODE2 0x08
3843 #define _OPMODE0 0x20
3844 #define _OPMODE1 0x40
3845 #define _OPMODE2 0x80
3847 //==============================================================================
3850 //==============================================================================
3851 // CANCON Bits
3853 extern __at(0x0F6F) __sfr CANCON;
3855 typedef union
3857 struct
3859 unsigned : 1;
3860 unsigned WIN0 : 1;
3861 unsigned WIN1 : 1;
3862 unsigned WIN2 : 1;
3863 unsigned ABAT : 1;
3864 unsigned REQOP0 : 1;
3865 unsigned REQOP1 : 1;
3866 unsigned REQOP2 : 1;
3869 struct
3871 unsigned : 1;
3872 unsigned WIN : 3;
3873 unsigned : 4;
3876 struct
3878 unsigned : 5;
3879 unsigned REQOP : 3;
3881 } __CANCONbits_t;
3883 extern __at(0x0F6F) volatile __CANCONbits_t CANCONbits;
3885 #define _WIN0 0x02
3886 #define _WIN1 0x04
3887 #define _WIN2 0x08
3888 #define _ABAT 0x10
3889 #define _REQOP0 0x20
3890 #define _REQOP1 0x40
3891 #define _REQOP2 0x80
3893 //==============================================================================
3896 //==============================================================================
3897 // BRGCON1 Bits
3899 extern __at(0x0F70) __sfr BRGCON1;
3901 typedef union
3903 struct
3905 unsigned BRP0 : 1;
3906 unsigned BRP1 : 1;
3907 unsigned BRP2 : 1;
3908 unsigned BRP3 : 1;
3909 unsigned BRP4 : 1;
3910 unsigned BRP5 : 1;
3911 unsigned SJW0 : 1;
3912 unsigned SJW1 : 1;
3915 struct
3917 unsigned BRP : 6;
3918 unsigned : 2;
3921 struct
3923 unsigned : 6;
3924 unsigned SJW : 2;
3926 } __BRGCON1bits_t;
3928 extern __at(0x0F70) volatile __BRGCON1bits_t BRGCON1bits;
3930 #define _BRP0 0x01
3931 #define _BRP1 0x02
3932 #define _BRP2 0x04
3933 #define _BRP3 0x08
3934 #define _BRP4 0x10
3935 #define _BRP5 0x20
3936 #define _SJW0 0x40
3937 #define _SJW1 0x80
3939 //==============================================================================
3942 //==============================================================================
3943 // BRGCON2 Bits
3945 extern __at(0x0F71) __sfr BRGCON2;
3947 typedef union
3949 struct
3951 unsigned PRSEG0 : 1;
3952 unsigned PRSEG1 : 1;
3953 unsigned PRSEG2 : 1;
3954 unsigned SEG1PH0 : 1;
3955 unsigned SEG1PH1 : 1;
3956 unsigned SEG1PH2 : 1;
3957 unsigned SAM : 1;
3958 unsigned SEG2PHTS : 1;
3961 struct
3963 unsigned PRSEG : 3;
3964 unsigned : 5;
3967 struct
3969 unsigned : 3;
3970 unsigned SEG1PH : 3;
3971 unsigned : 2;
3973 } __BRGCON2bits_t;
3975 extern __at(0x0F71) volatile __BRGCON2bits_t BRGCON2bits;
3977 #define _PRSEG0 0x01
3978 #define _PRSEG1 0x02
3979 #define _PRSEG2 0x04
3980 #define _SEG1PH0 0x08
3981 #define _SEG1PH1 0x10
3982 #define _SEG1PH2 0x20
3983 #define _SAM 0x40
3984 #define _SEG2PHTS 0x80
3986 //==============================================================================
3989 //==============================================================================
3990 // BRGCON3 Bits
3992 extern __at(0x0F72) __sfr BRGCON3;
3994 typedef union
3996 struct
3998 unsigned SEG2PH0 : 1;
3999 unsigned SEG2PH1 : 1;
4000 unsigned SEG2PH2 : 1;
4001 unsigned : 1;
4002 unsigned : 1;
4003 unsigned : 1;
4004 unsigned WAKFIL : 1;
4005 unsigned : 1;
4008 struct
4010 unsigned SEG2PH : 3;
4011 unsigned : 5;
4013 } __BRGCON3bits_t;
4015 extern __at(0x0F72) volatile __BRGCON3bits_t BRGCON3bits;
4017 #define _SEG2PH0 0x01
4018 #define _SEG2PH1 0x02
4019 #define _SEG2PH2 0x04
4020 #define _WAKFIL 0x40
4022 //==============================================================================
4025 //==============================================================================
4026 // CIOCON Bits
4028 extern __at(0x0F73) __sfr CIOCON;
4030 typedef struct
4032 unsigned : 1;
4033 unsigned : 1;
4034 unsigned : 1;
4035 unsigned : 1;
4036 unsigned CANCAP : 1;
4037 unsigned ENDRHI : 1;
4038 unsigned : 1;
4039 unsigned : 1;
4040 } __CIOCONbits_t;
4042 extern __at(0x0F73) volatile __CIOCONbits_t CIOCONbits;
4044 #define _CANCAP 0x10
4045 #define _ENDRHI 0x20
4047 //==============================================================================
4050 //==============================================================================
4051 // COMSTAT Bits
4053 extern __at(0x0F74) __sfr COMSTAT;
4055 typedef union
4057 struct
4059 unsigned EWARN : 1;
4060 unsigned RXWARN : 1;
4061 unsigned TXWARN : 1;
4062 unsigned RXBP : 1;
4063 unsigned TXBP : 1;
4064 unsigned TXBO : 1;
4065 unsigned RXB1OVFL : 1;
4066 unsigned RXB0OVFL : 1;
4069 struct
4071 unsigned : 1;
4072 unsigned : 1;
4073 unsigned : 1;
4074 unsigned : 1;
4075 unsigned : 1;
4076 unsigned : 1;
4077 unsigned RX2OVFL : 1;
4078 unsigned RX1OVFL : 1;
4080 } __COMSTATbits_t;
4082 extern __at(0x0F74) volatile __COMSTATbits_t COMSTATbits;
4084 #define _EWARN 0x01
4085 #define _RXWARN 0x02
4086 #define _TXWARN 0x04
4087 #define _RXBP 0x08
4088 #define _TXBP 0x10
4089 #define _TXBO 0x20
4090 #define _RXB1OVFL 0x40
4091 #define _RX2OVFL 0x40
4092 #define _RXB0OVFL 0x80
4093 #define _RX1OVFL 0x80
4095 //==============================================================================
4098 //==============================================================================
4099 // RXERRCNT Bits
4101 extern __at(0x0F75) __sfr RXERRCNT;
4103 typedef struct
4105 unsigned REC0 : 1;
4106 unsigned REC1 : 1;
4107 unsigned REC2 : 1;
4108 unsigned REC3 : 1;
4109 unsigned REC4 : 1;
4110 unsigned REC5 : 1;
4111 unsigned REC6 : 1;
4112 unsigned REC7 : 1;
4113 } __RXERRCNTbits_t;
4115 extern __at(0x0F75) volatile __RXERRCNTbits_t RXERRCNTbits;
4117 #define _REC0 0x01
4118 #define _REC1 0x02
4119 #define _REC2 0x04
4120 #define _REC3 0x08
4121 #define _REC4 0x10
4122 #define _REC5 0x20
4123 #define _REC6 0x40
4124 #define _REC7 0x80
4126 //==============================================================================
4129 //==============================================================================
4130 // TXERRCNT Bits
4132 extern __at(0x0F76) __sfr TXERRCNT;
4134 typedef struct
4136 unsigned TEC0 : 1;
4137 unsigned TEC1 : 1;
4138 unsigned TEC2 : 1;
4139 unsigned TEC3 : 1;
4140 unsigned TEC4 : 1;
4141 unsigned TEC5 : 1;
4142 unsigned TEC6 : 1;
4143 unsigned TEC7 : 1;
4144 } __TXERRCNTbits_t;
4146 extern __at(0x0F76) volatile __TXERRCNTbits_t TXERRCNTbits;
4148 #define _TEC0 0x01
4149 #define _TEC1 0x02
4150 #define _TEC2 0x04
4151 #define _TEC3 0x08
4152 #define _TEC4 0x10
4153 #define _TEC5 0x20
4154 #define _TEC6 0x40
4155 #define _TEC7 0x80
4157 //==============================================================================
4160 //==============================================================================
4161 // PORTA Bits
4163 extern __at(0x0F80) __sfr PORTA;
4165 typedef union
4167 struct
4169 unsigned RA0 : 1;
4170 unsigned RA1 : 1;
4171 unsigned RA2 : 1;
4172 unsigned RA3 : 1;
4173 unsigned RA4 : 1;
4174 unsigned RA5 : 1;
4175 unsigned RA6 : 1;
4176 unsigned : 1;
4179 struct
4181 unsigned AN0 : 1;
4182 unsigned AN1 : 1;
4183 unsigned AN2 : 1;
4184 unsigned AN3 : 1;
4185 unsigned T0CKI : 1;
4186 unsigned AN4 : 1;
4187 unsigned OSC2 : 1;
4188 unsigned : 1;
4191 struct
4193 unsigned CVREF : 1;
4194 unsigned : 1;
4195 unsigned VREFM : 1;
4196 unsigned VREFP : 1;
4197 unsigned : 1;
4198 unsigned NOT_SS : 1;
4199 unsigned CLKO : 1;
4200 unsigned : 1;
4203 struct
4205 unsigned : 1;
4206 unsigned : 1;
4207 unsigned : 1;
4208 unsigned : 1;
4209 unsigned : 1;
4210 unsigned SS : 1;
4211 unsigned : 1;
4212 unsigned : 1;
4215 struct
4217 unsigned : 1;
4218 unsigned : 1;
4219 unsigned : 1;
4220 unsigned : 1;
4221 unsigned : 1;
4222 unsigned LVDIN : 1;
4223 unsigned : 1;
4224 unsigned : 1;
4227 struct
4229 unsigned RA : 7;
4230 unsigned : 1;
4232 } __PORTAbits_t;
4234 extern __at(0x0F80) volatile __PORTAbits_t PORTAbits;
4236 #define _PORTA_RA0 0x01
4237 #define _PORTA_AN0 0x01
4238 #define _PORTA_CVREF 0x01
4239 #define _PORTA_RA1 0x02
4240 #define _PORTA_AN1 0x02
4241 #define _PORTA_RA2 0x04
4242 #define _PORTA_AN2 0x04
4243 #define _PORTA_VREFM 0x04
4244 #define _PORTA_RA3 0x08
4245 #define _PORTA_AN3 0x08
4246 #define _PORTA_VREFP 0x08
4247 #define _PORTA_RA4 0x10
4248 #define _PORTA_T0CKI 0x10
4249 #define _PORTA_RA5 0x20
4250 #define _PORTA_AN4 0x20
4251 #define _PORTA_NOT_SS 0x20
4252 #define _PORTA_SS 0x20
4253 #define _PORTA_LVDIN 0x20
4254 #define _PORTA_RA6 0x40
4255 #define _PORTA_OSC2 0x40
4256 #define _PORTA_CLKO 0x40
4258 //==============================================================================
4261 //==============================================================================
4262 // PORTB Bits
4264 extern __at(0x0F81) __sfr PORTB;
4266 typedef union
4268 struct
4270 unsigned RB0 : 1;
4271 unsigned RB1 : 1;
4272 unsigned RB2 : 1;
4273 unsigned RB3 : 1;
4274 unsigned RB4 : 1;
4275 unsigned RB5 : 1;
4276 unsigned RB6 : 1;
4277 unsigned RB7 : 1;
4280 struct
4282 unsigned INT0 : 1;
4283 unsigned INT1 : 1;
4284 unsigned CANTX : 1;
4285 unsigned CANRX : 1;
4286 unsigned : 1;
4287 unsigned PGM : 1;
4288 unsigned PGC : 1;
4289 unsigned PGD : 1;
4292 struct
4294 unsigned INT : 2;
4295 unsigned : 6;
4297 } __PORTBbits_t;
4299 extern __at(0x0F81) volatile __PORTBbits_t PORTBbits;
4301 #define _PORTB_RB0 0x01
4302 #define _PORTB_INT0 0x01
4303 #define _PORTB_RB1 0x02
4304 #define _PORTB_INT1 0x02
4305 #define _PORTB_RB2 0x04
4306 #define _PORTB_CANTX 0x04
4307 #define _PORTB_RB3 0x08
4308 #define _PORTB_CANRX 0x08
4309 #define _PORTB_RB4 0x10
4310 #define _PORTB_RB5 0x20
4311 #define _PORTB_PGM 0x20
4312 #define _PORTB_RB6 0x40
4313 #define _PORTB_PGC 0x40
4314 #define _PORTB_RB7 0x80
4315 #define _PORTB_PGD 0x80
4317 //==============================================================================
4320 //==============================================================================
4321 // PORTC Bits
4323 extern __at(0x0F82) __sfr PORTC;
4325 typedef union
4327 struct
4329 unsigned RC0 : 1;
4330 unsigned RC1 : 1;
4331 unsigned RC2 : 1;
4332 unsigned RC3 : 1;
4333 unsigned RC4 : 1;
4334 unsigned RC5 : 1;
4335 unsigned RC6 : 1;
4336 unsigned RC7 : 1;
4339 struct
4341 unsigned T1OSO : 1;
4342 unsigned T1OSI : 1;
4343 unsigned CCP1 : 1;
4344 unsigned SCK : 1;
4345 unsigned SDI : 1;
4346 unsigned SDO : 1;
4347 unsigned TX : 1;
4348 unsigned RX : 1;
4351 struct
4353 unsigned T1CKI : 1;
4354 unsigned : 1;
4355 unsigned : 1;
4356 unsigned SCL : 1;
4357 unsigned SDA : 1;
4358 unsigned : 1;
4359 unsigned CK : 1;
4360 unsigned : 1;
4362 } __PORTCbits_t;
4364 extern __at(0x0F82) volatile __PORTCbits_t PORTCbits;
4366 #define _PORTC_RC0 0x01
4367 #define _PORTC_T1OSO 0x01
4368 #define _PORTC_T1CKI 0x01
4369 #define _PORTC_RC1 0x02
4370 #define _PORTC_T1OSI 0x02
4371 #define _PORTC_RC2 0x04
4372 #define _PORTC_CCP1 0x04
4373 #define _PORTC_RC3 0x08
4374 #define _PORTC_SCK 0x08
4375 #define _PORTC_SCL 0x08
4376 #define _PORTC_RC4 0x10
4377 #define _PORTC_SDI 0x10
4378 #define _PORTC_SDA 0x10
4379 #define _PORTC_RC5 0x20
4380 #define _PORTC_SDO 0x20
4381 #define _PORTC_RC6 0x40
4382 #define _PORTC_TX 0x40
4383 #define _PORTC_CK 0x40
4384 #define _PORTC_RC7 0x80
4385 #define _PORTC_RX 0x80
4387 //==============================================================================
4390 //==============================================================================
4391 // LATA Bits
4393 extern __at(0x0F89) __sfr LATA;
4395 typedef union
4397 struct
4399 unsigned LATA0 : 1;
4400 unsigned LATA1 : 1;
4401 unsigned LATA2 : 1;
4402 unsigned LATA3 : 1;
4403 unsigned LATA4 : 1;
4404 unsigned LATA5 : 1;
4405 unsigned LATA6 : 1;
4406 unsigned : 1;
4409 struct
4411 unsigned LATA : 7;
4412 unsigned : 1;
4414 } __LATAbits_t;
4416 extern __at(0x0F89) volatile __LATAbits_t LATAbits;
4418 #define _LATA0 0x01
4419 #define _LATA1 0x02
4420 #define _LATA2 0x04
4421 #define _LATA3 0x08
4422 #define _LATA4 0x10
4423 #define _LATA5 0x20
4424 #define _LATA6 0x40
4426 //==============================================================================
4429 //==============================================================================
4430 // LATB Bits
4432 extern __at(0x0F8A) __sfr LATB;
4434 typedef struct
4436 unsigned LATB0 : 1;
4437 unsigned LATB1 : 1;
4438 unsigned LATB2 : 1;
4439 unsigned LATB3 : 1;
4440 unsigned LATB4 : 1;
4441 unsigned LATB5 : 1;
4442 unsigned LATB6 : 1;
4443 unsigned LATB7 : 1;
4444 } __LATBbits_t;
4446 extern __at(0x0F8A) volatile __LATBbits_t LATBbits;
4448 #define _LATB0 0x01
4449 #define _LATB1 0x02
4450 #define _LATB2 0x04
4451 #define _LATB3 0x08
4452 #define _LATB4 0x10
4453 #define _LATB5 0x20
4454 #define _LATB6 0x40
4455 #define _LATB7 0x80
4457 //==============================================================================
4460 //==============================================================================
4461 // LATC Bits
4463 extern __at(0x0F8B) __sfr LATC;
4465 typedef struct
4467 unsigned LATC0 : 1;
4468 unsigned LATC1 : 1;
4469 unsigned LATC2 : 1;
4470 unsigned LATC3 : 1;
4471 unsigned LATC4 : 1;
4472 unsigned LATC5 : 1;
4473 unsigned LATC6 : 1;
4474 unsigned LATC7 : 1;
4475 } __LATCbits_t;
4477 extern __at(0x0F8B) volatile __LATCbits_t LATCbits;
4479 #define _LATC0 0x01
4480 #define _LATC1 0x02
4481 #define _LATC2 0x04
4482 #define _LATC3 0x08
4483 #define _LATC4 0x10
4484 #define _LATC5 0x20
4485 #define _LATC6 0x40
4486 #define _LATC7 0x80
4488 //==============================================================================
4491 //==============================================================================
4492 // DDRA Bits
4494 extern __at(0x0F92) __sfr DDRA;
4496 typedef union
4498 struct
4500 unsigned TRISA0 : 1;
4501 unsigned TRISA1 : 1;
4502 unsigned TRISA2 : 1;
4503 unsigned TRISA3 : 1;
4504 unsigned TRISA4 : 1;
4505 unsigned TRISA5 : 1;
4506 unsigned TRISA6 : 1;
4507 unsigned : 1;
4510 struct
4512 unsigned RA0 : 1;
4513 unsigned RA1 : 1;
4514 unsigned RA2 : 1;
4515 unsigned RA3 : 1;
4516 unsigned RA4 : 1;
4517 unsigned RA5 : 1;
4518 unsigned RA6 : 1;
4519 unsigned : 1;
4522 struct
4524 unsigned RA : 7;
4525 unsigned : 1;
4528 struct
4530 unsigned TRISA : 7;
4531 unsigned : 1;
4533 } __DDRAbits_t;
4535 extern __at(0x0F92) volatile __DDRAbits_t DDRAbits;
4537 #define _TRISA0 0x01
4538 #define _RA0 0x01
4539 #define _TRISA1 0x02
4540 #define _RA1 0x02
4541 #define _TRISA2 0x04
4542 #define _RA2 0x04
4543 #define _TRISA3 0x08
4544 #define _RA3 0x08
4545 #define _TRISA4 0x10
4546 #define _RA4 0x10
4547 #define _TRISA5 0x20
4548 #define _RA5 0x20
4549 #define _TRISA6 0x40
4550 #define _RA6 0x40
4552 //==============================================================================
4555 //==============================================================================
4556 // TRISA Bits
4558 extern __at(0x0F92) __sfr TRISA;
4560 typedef union
4562 struct
4564 unsigned TRISA0 : 1;
4565 unsigned TRISA1 : 1;
4566 unsigned TRISA2 : 1;
4567 unsigned TRISA3 : 1;
4568 unsigned TRISA4 : 1;
4569 unsigned TRISA5 : 1;
4570 unsigned TRISA6 : 1;
4571 unsigned : 1;
4574 struct
4576 unsigned RA0 : 1;
4577 unsigned RA1 : 1;
4578 unsigned RA2 : 1;
4579 unsigned RA3 : 1;
4580 unsigned RA4 : 1;
4581 unsigned RA5 : 1;
4582 unsigned RA6 : 1;
4583 unsigned : 1;
4586 struct
4588 unsigned TRISA : 7;
4589 unsigned : 1;
4592 struct
4594 unsigned RA : 7;
4595 unsigned : 1;
4597 } __TRISAbits_t;
4599 extern __at(0x0F92) volatile __TRISAbits_t TRISAbits;
4601 #define _TRISA_TRISA0 0x01
4602 #define _TRISA_RA0 0x01
4603 #define _TRISA_TRISA1 0x02
4604 #define _TRISA_RA1 0x02
4605 #define _TRISA_TRISA2 0x04
4606 #define _TRISA_RA2 0x04
4607 #define _TRISA_TRISA3 0x08
4608 #define _TRISA_RA3 0x08
4609 #define _TRISA_TRISA4 0x10
4610 #define _TRISA_RA4 0x10
4611 #define _TRISA_TRISA5 0x20
4612 #define _TRISA_RA5 0x20
4613 #define _TRISA_TRISA6 0x40
4614 #define _TRISA_RA6 0x40
4616 //==============================================================================
4619 //==============================================================================
4620 // DDRB Bits
4622 extern __at(0x0F93) __sfr DDRB;
4624 typedef union
4626 struct
4628 unsigned TRISB0 : 1;
4629 unsigned TRISB1 : 1;
4630 unsigned TRISB2 : 1;
4631 unsigned TRISB3 : 1;
4632 unsigned TRISB4 : 1;
4633 unsigned TRISB5 : 1;
4634 unsigned TRISB6 : 1;
4635 unsigned TRISB7 : 1;
4638 struct
4640 unsigned RB0 : 1;
4641 unsigned RB1 : 1;
4642 unsigned RB2 : 1;
4643 unsigned RB3 : 1;
4644 unsigned RB4 : 1;
4645 unsigned RB5 : 1;
4646 unsigned RB6 : 1;
4647 unsigned RB7 : 1;
4649 } __DDRBbits_t;
4651 extern __at(0x0F93) volatile __DDRBbits_t DDRBbits;
4653 #define _TRISB0 0x01
4654 #define _RB0 0x01
4655 #define _TRISB1 0x02
4656 #define _RB1 0x02
4657 #define _TRISB2 0x04
4658 #define _RB2 0x04
4659 #define _TRISB3 0x08
4660 #define _RB3 0x08
4661 #define _TRISB4 0x10
4662 #define _RB4 0x10
4663 #define _TRISB5 0x20
4664 #define _RB5 0x20
4665 #define _TRISB6 0x40
4666 #define _RB6 0x40
4667 #define _TRISB7 0x80
4668 #define _RB7 0x80
4670 //==============================================================================
4673 //==============================================================================
4674 // TRISB Bits
4676 extern __at(0x0F93) __sfr TRISB;
4678 typedef union
4680 struct
4682 unsigned TRISB0 : 1;
4683 unsigned TRISB1 : 1;
4684 unsigned TRISB2 : 1;
4685 unsigned TRISB3 : 1;
4686 unsigned TRISB4 : 1;
4687 unsigned TRISB5 : 1;
4688 unsigned TRISB6 : 1;
4689 unsigned TRISB7 : 1;
4692 struct
4694 unsigned RB0 : 1;
4695 unsigned RB1 : 1;
4696 unsigned RB2 : 1;
4697 unsigned RB3 : 1;
4698 unsigned RB4 : 1;
4699 unsigned RB5 : 1;
4700 unsigned RB6 : 1;
4701 unsigned RB7 : 1;
4703 } __TRISBbits_t;
4705 extern __at(0x0F93) volatile __TRISBbits_t TRISBbits;
4707 #define _TRISB_TRISB0 0x01
4708 #define _TRISB_RB0 0x01
4709 #define _TRISB_TRISB1 0x02
4710 #define _TRISB_RB1 0x02
4711 #define _TRISB_TRISB2 0x04
4712 #define _TRISB_RB2 0x04
4713 #define _TRISB_TRISB3 0x08
4714 #define _TRISB_RB3 0x08
4715 #define _TRISB_TRISB4 0x10
4716 #define _TRISB_RB4 0x10
4717 #define _TRISB_TRISB5 0x20
4718 #define _TRISB_RB5 0x20
4719 #define _TRISB_TRISB6 0x40
4720 #define _TRISB_RB6 0x40
4721 #define _TRISB_TRISB7 0x80
4722 #define _TRISB_RB7 0x80
4724 //==============================================================================
4727 //==============================================================================
4728 // DDRC Bits
4730 extern __at(0x0F94) __sfr DDRC;
4732 typedef union
4734 struct
4736 unsigned TRISC0 : 1;
4737 unsigned TRISC1 : 1;
4738 unsigned TRISC2 : 1;
4739 unsigned TRISC3 : 1;
4740 unsigned TRISC4 : 1;
4741 unsigned TRISC5 : 1;
4742 unsigned TRISC6 : 1;
4743 unsigned TRISC7 : 1;
4746 struct
4748 unsigned RC0 : 1;
4749 unsigned RC1 : 1;
4750 unsigned RC2 : 1;
4751 unsigned RC3 : 1;
4752 unsigned RC4 : 1;
4753 unsigned RC5 : 1;
4754 unsigned RC6 : 1;
4755 unsigned RC7 : 1;
4757 } __DDRCbits_t;
4759 extern __at(0x0F94) volatile __DDRCbits_t DDRCbits;
4761 #define _TRISC0 0x01
4762 #define _RC0 0x01
4763 #define _TRISC1 0x02
4764 #define _RC1 0x02
4765 #define _TRISC2 0x04
4766 #define _RC2 0x04
4767 #define _TRISC3 0x08
4768 #define _RC3 0x08
4769 #define _TRISC4 0x10
4770 #define _RC4 0x10
4771 #define _TRISC5 0x20
4772 #define _RC5 0x20
4773 #define _TRISC6 0x40
4774 #define _RC6 0x40
4775 #define _TRISC7 0x80
4776 #define _RC7 0x80
4778 //==============================================================================
4781 //==============================================================================
4782 // TRISC Bits
4784 extern __at(0x0F94) __sfr TRISC;
4786 typedef union
4788 struct
4790 unsigned TRISC0 : 1;
4791 unsigned TRISC1 : 1;
4792 unsigned TRISC2 : 1;
4793 unsigned TRISC3 : 1;
4794 unsigned TRISC4 : 1;
4795 unsigned TRISC5 : 1;
4796 unsigned TRISC6 : 1;
4797 unsigned TRISC7 : 1;
4800 struct
4802 unsigned RC0 : 1;
4803 unsigned RC1 : 1;
4804 unsigned RC2 : 1;
4805 unsigned RC3 : 1;
4806 unsigned RC4 : 1;
4807 unsigned RC5 : 1;
4808 unsigned RC6 : 1;
4809 unsigned RC7 : 1;
4811 } __TRISCbits_t;
4813 extern __at(0x0F94) volatile __TRISCbits_t TRISCbits;
4815 #define _TRISC_TRISC0 0x01
4816 #define _TRISC_RC0 0x01
4817 #define _TRISC_TRISC1 0x02
4818 #define _TRISC_RC1 0x02
4819 #define _TRISC_TRISC2 0x04
4820 #define _TRISC_RC2 0x04
4821 #define _TRISC_TRISC3 0x08
4822 #define _TRISC_RC3 0x08
4823 #define _TRISC_TRISC4 0x10
4824 #define _TRISC_RC4 0x10
4825 #define _TRISC_TRISC5 0x20
4826 #define _TRISC_RC5 0x20
4827 #define _TRISC_TRISC6 0x40
4828 #define _TRISC_RC6 0x40
4829 #define _TRISC_TRISC7 0x80
4830 #define _TRISC_RC7 0x80
4832 //==============================================================================
4835 //==============================================================================
4836 // PIE1 Bits
4838 extern __at(0x0F9D) __sfr PIE1;
4840 typedef struct
4842 unsigned TMR1IE : 1;
4843 unsigned TMR2IE : 1;
4844 unsigned CCP1IE : 1;
4845 unsigned SSPIE : 1;
4846 unsigned TXIE : 1;
4847 unsigned RCIE : 1;
4848 unsigned ADIE : 1;
4849 unsigned : 1;
4850 } __PIE1bits_t;
4852 extern __at(0x0F9D) volatile __PIE1bits_t PIE1bits;
4854 #define _TMR1IE 0x01
4855 #define _TMR2IE 0x02
4856 #define _CCP1IE 0x04
4857 #define _SSPIE 0x08
4858 #define _TXIE 0x10
4859 #define _RCIE 0x20
4860 #define _ADIE 0x40
4862 //==============================================================================
4865 //==============================================================================
4866 // PIR1 Bits
4868 extern __at(0x0F9E) __sfr PIR1;
4870 typedef struct
4872 unsigned TMR1IF : 1;
4873 unsigned TMR2IF : 1;
4874 unsigned CCP1IF : 1;
4875 unsigned SSPIF : 1;
4876 unsigned TXIF : 1;
4877 unsigned RCIF : 1;
4878 unsigned ADIF : 1;
4879 unsigned : 1;
4880 } __PIR1bits_t;
4882 extern __at(0x0F9E) volatile __PIR1bits_t PIR1bits;
4884 #define _TMR1IF 0x01
4885 #define _TMR2IF 0x02
4886 #define _CCP1IF 0x04
4887 #define _SSPIF 0x08
4888 #define _TXIF 0x10
4889 #define _RCIF 0x20
4890 #define _ADIF 0x40
4892 //==============================================================================
4895 //==============================================================================
4896 // IPR1 Bits
4898 extern __at(0x0F9F) __sfr IPR1;
4900 typedef struct
4902 unsigned TMR1IP : 1;
4903 unsigned TMR2IP : 1;
4904 unsigned CCP1IP : 1;
4905 unsigned SSPIP : 1;
4906 unsigned TXIP : 1;
4907 unsigned RCIP : 1;
4908 unsigned ADIP : 1;
4909 unsigned : 1;
4910 } __IPR1bits_t;
4912 extern __at(0x0F9F) volatile __IPR1bits_t IPR1bits;
4914 #define _TMR1IP 0x01
4915 #define _TMR2IP 0x02
4916 #define _CCP1IP 0x04
4917 #define _SSPIP 0x08
4918 #define _TXIP 0x10
4919 #define _RCIP 0x20
4920 #define _ADIP 0x40
4922 //==============================================================================
4925 //==============================================================================
4926 // PIE2 Bits
4928 extern __at(0x0FA0) __sfr PIE2;
4930 typedef struct
4932 unsigned : 1;
4933 unsigned TMR3IE : 1;
4934 unsigned LVDIE : 1;
4935 unsigned BCLIE : 1;
4936 unsigned EEIE : 1;
4937 unsigned : 1;
4938 unsigned : 1;
4939 unsigned : 1;
4940 } __PIE2bits_t;
4942 extern __at(0x0FA0) volatile __PIE2bits_t PIE2bits;
4944 #define _TMR3IE 0x02
4945 #define _LVDIE 0x04
4946 #define _BCLIE 0x08
4947 #define _EEIE 0x10
4949 //==============================================================================
4952 //==============================================================================
4953 // PIR2 Bits
4955 extern __at(0x0FA1) __sfr PIR2;
4957 typedef struct
4959 unsigned : 1;
4960 unsigned TMR3IF : 1;
4961 unsigned LVDIF : 1;
4962 unsigned BCLIF : 1;
4963 unsigned EEIF : 1;
4964 unsigned : 1;
4965 unsigned : 1;
4966 unsigned : 1;
4967 } __PIR2bits_t;
4969 extern __at(0x0FA1) volatile __PIR2bits_t PIR2bits;
4971 #define _TMR3IF 0x02
4972 #define _LVDIF 0x04
4973 #define _BCLIF 0x08
4974 #define _EEIF 0x10
4976 //==============================================================================
4979 //==============================================================================
4980 // IPR2 Bits
4982 extern __at(0x0FA2) __sfr IPR2;
4984 typedef struct
4986 unsigned : 1;
4987 unsigned TMR3IP : 1;
4988 unsigned LVDIP : 1;
4989 unsigned BCLIP : 1;
4990 unsigned EEIP : 1;
4991 unsigned : 1;
4992 unsigned : 1;
4993 unsigned : 1;
4994 } __IPR2bits_t;
4996 extern __at(0x0FA2) volatile __IPR2bits_t IPR2bits;
4998 #define _TMR3IP 0x02
4999 #define _LVDIP 0x04
5000 #define _BCLIP 0x08
5001 #define _EEIP 0x10
5003 //==============================================================================
5006 //==============================================================================
5007 // PIE3 Bits
5009 extern __at(0x0FA3) __sfr PIE3;
5011 typedef union
5013 struct
5015 unsigned RXB0IE : 1;
5016 unsigned RXB1IE : 1;
5017 unsigned TXB0IE : 1;
5018 unsigned TXB1IE : 1;
5019 unsigned TXB2IE : 1;
5020 unsigned ERRIE : 1;
5021 unsigned WAKIE : 1;
5022 unsigned IRXIE : 1;
5025 struct
5027 unsigned RX0IE : 1;
5028 unsigned RX1IE : 1;
5029 unsigned TX0IE : 1;
5030 unsigned TX1IE : 1;
5031 unsigned TX2IE : 1;
5032 unsigned : 1;
5033 unsigned : 1;
5034 unsigned IVRE : 1;
5036 } __PIE3bits_t;
5038 extern __at(0x0FA3) volatile __PIE3bits_t PIE3bits;
5040 #define _RXB0IE 0x01
5041 #define _RX0IE 0x01
5042 #define _RXB1IE 0x02
5043 #define _RX1IE 0x02
5044 #define _TXB0IE 0x04
5045 #define _TX0IE 0x04
5046 #define _TXB1IE 0x08
5047 #define _TX1IE 0x08
5048 #define _TXB2IE 0x10
5049 #define _TX2IE 0x10
5050 #define _ERRIE 0x20
5051 #define _WAKIE 0x40
5052 #define _IRXIE 0x80
5053 #define _IVRE 0x80
5055 //==============================================================================
5058 //==============================================================================
5059 // PIR3 Bits
5061 extern __at(0x0FA4) __sfr PIR3;
5063 typedef union
5065 struct
5067 unsigned RXB0IF : 1;
5068 unsigned RXB1IF : 1;
5069 unsigned TXB0IF : 1;
5070 unsigned TXB1IF : 1;
5071 unsigned TXB2IF : 1;
5072 unsigned ERRIF : 1;
5073 unsigned WAKIF : 1;
5074 unsigned IRXIF : 1;
5077 struct
5079 unsigned RX0IF : 1;
5080 unsigned RX1IF : 1;
5081 unsigned TX0IF : 1;
5082 unsigned TX1IF : 1;
5083 unsigned TX2IF : 1;
5084 unsigned : 1;
5085 unsigned : 1;
5086 unsigned IVRF : 1;
5088 } __PIR3bits_t;
5090 extern __at(0x0FA4) volatile __PIR3bits_t PIR3bits;
5092 #define _RXB0IF 0x01
5093 #define _RX0IF 0x01
5094 #define _RXB1IF 0x02
5095 #define _RX1IF 0x02
5096 #define _TXB0IF 0x04
5097 #define _TX0IF 0x04
5098 #define _TXB1IF 0x08
5099 #define _TX1IF 0x08
5100 #define _TXB2IF 0x10
5101 #define _TX2IF 0x10
5102 #define _ERRIF 0x20
5103 #define _WAKIF 0x40
5104 #define _IRXIF 0x80
5105 #define _IVRF 0x80
5107 //==============================================================================
5110 //==============================================================================
5111 // IPR3 Bits
5113 extern __at(0x0FA5) __sfr IPR3;
5115 typedef union
5117 struct
5119 unsigned RXB0IP : 1;
5120 unsigned RXB1IP : 1;
5121 unsigned TXB0IP : 1;
5122 unsigned TXB1IP : 1;
5123 unsigned TXB2IP : 1;
5124 unsigned ERRIP : 1;
5125 unsigned WAKIP : 1;
5126 unsigned IRXIP : 1;
5129 struct
5131 unsigned : 1;
5132 unsigned : 1;
5133 unsigned : 1;
5134 unsigned : 1;
5135 unsigned : 1;
5136 unsigned : 1;
5137 unsigned : 1;
5138 unsigned IVRP : 1;
5140 } __IPR3bits_t;
5142 extern __at(0x0FA5) volatile __IPR3bits_t IPR3bits;
5144 #define _RXB0IP 0x01
5145 #define _RXB1IP 0x02
5146 #define _TXB0IP 0x04
5147 #define _TXB1IP 0x08
5148 #define _TXB2IP 0x10
5149 #define _ERRIP 0x20
5150 #define _WAKIP 0x40
5151 #define _IRXIP 0x80
5152 #define _IVRP 0x80
5154 //==============================================================================
5157 //==============================================================================
5158 // EECON1 Bits
5160 extern __at(0x0FA6) __sfr EECON1;
5162 typedef union
5164 struct
5166 unsigned RD : 1;
5167 unsigned WR : 1;
5168 unsigned WREN : 1;
5169 unsigned WRERR : 1;
5170 unsigned FREE : 1;
5171 unsigned : 1;
5172 unsigned CFGS : 1;
5173 unsigned EEPGD : 1;
5176 struct
5178 unsigned : 1;
5179 unsigned : 1;
5180 unsigned : 1;
5181 unsigned : 1;
5182 unsigned : 1;
5183 unsigned : 1;
5184 unsigned EEFS : 1;
5185 unsigned : 1;
5187 } __EECON1bits_t;
5189 extern __at(0x0FA6) volatile __EECON1bits_t EECON1bits;
5191 #define _RD 0x01
5192 #define _WR 0x02
5193 #define _WREN 0x04
5194 #define _WRERR 0x08
5195 #define _FREE 0x10
5196 #define _CFGS 0x40
5197 #define _EEFS 0x40
5198 #define _EEPGD 0x80
5200 //==============================================================================
5202 extern __at(0x0FA7) __sfr EECON2;
5203 extern __at(0x0FA8) __sfr EEDATA;
5204 extern __at(0x0FA9) __sfr EEADR;
5206 //==============================================================================
5207 // RCSTA Bits
5209 extern __at(0x0FAB) __sfr RCSTA;
5211 typedef union
5213 struct
5215 unsigned RX9D : 1;
5216 unsigned OERR : 1;
5217 unsigned FERR : 1;
5218 unsigned ADDEN : 1;
5219 unsigned CREN : 1;
5220 unsigned SREN : 1;
5221 unsigned RX9 : 1;
5222 unsigned SPEN : 1;
5225 struct
5227 unsigned RCD8 : 1;
5228 unsigned : 1;
5229 unsigned : 1;
5230 unsigned : 1;
5231 unsigned : 1;
5232 unsigned : 1;
5233 unsigned RC9 : 1;
5234 unsigned : 1;
5237 struct
5239 unsigned : 1;
5240 unsigned : 1;
5241 unsigned : 1;
5242 unsigned : 1;
5243 unsigned : 1;
5244 unsigned : 1;
5245 unsigned RC8_9 : 1;
5246 unsigned : 1;
5249 struct
5251 unsigned : 1;
5252 unsigned : 1;
5253 unsigned : 1;
5254 unsigned : 1;
5255 unsigned : 1;
5256 unsigned : 1;
5257 unsigned NOT_RC8 : 1;
5258 unsigned : 1;
5260 } __RCSTAbits_t;
5262 extern __at(0x0FAB) volatile __RCSTAbits_t RCSTAbits;
5264 #define _RX9D 0x01
5265 #define _RCD8 0x01
5266 #define _OERR 0x02
5267 #define _FERR 0x04
5268 #define _ADDEN 0x08
5269 #define _CREN 0x10
5270 #define _SREN 0x20
5271 #define _RX9 0x40
5272 #define _RC9 0x40
5273 #define _RC8_9 0x40
5274 #define _NOT_RC8 0x40
5275 #define _SPEN 0x80
5277 //==============================================================================
5280 //==============================================================================
5281 // TXSTA Bits
5283 extern __at(0x0FAC) __sfr TXSTA;
5285 typedef union
5287 struct
5289 unsigned TX9D : 1;
5290 unsigned TRMT : 1;
5291 unsigned BRGH : 1;
5292 unsigned : 1;
5293 unsigned SYNC : 1;
5294 unsigned TXEN : 1;
5295 unsigned TX9 : 1;
5296 unsigned CSRC : 1;
5299 struct
5301 unsigned TXD8 : 1;
5302 unsigned : 1;
5303 unsigned : 1;
5304 unsigned : 1;
5305 unsigned : 1;
5306 unsigned : 1;
5307 unsigned TX8_9 : 1;
5308 unsigned : 1;
5311 struct
5313 unsigned : 1;
5314 unsigned : 1;
5315 unsigned : 1;
5316 unsigned : 1;
5317 unsigned : 1;
5318 unsigned : 1;
5319 unsigned NOT_TX8 : 1;
5320 unsigned : 1;
5322 } __TXSTAbits_t;
5324 extern __at(0x0FAC) volatile __TXSTAbits_t TXSTAbits;
5326 #define _TX9D 0x01
5327 #define _TXD8 0x01
5328 #define _TRMT 0x02
5329 #define _BRGH 0x04
5330 #define _SYNC 0x10
5331 #define _TXEN 0x20
5332 #define _TX9 0x40
5333 #define _TX8_9 0x40
5334 #define _NOT_TX8 0x40
5335 #define _CSRC 0x80
5337 //==============================================================================
5339 extern __at(0x0FAD) __sfr TXREG;
5340 extern __at(0x0FAE) __sfr RCREG;
5341 extern __at(0x0FAF) __sfr SPBRG;
5343 //==============================================================================
5344 // T3CON Bits
5346 extern __at(0x0FB1) __sfr T3CON;
5348 typedef union
5350 struct
5352 unsigned TMR3ON : 1;
5353 unsigned TMR3CS : 1;
5354 unsigned NOT_T3SYNC : 1;
5355 unsigned T3CCP1 : 1;
5356 unsigned T3CKPS0 : 1;
5357 unsigned T3CKPS1 : 1;
5358 unsigned T3ECCP1 : 1;
5359 unsigned RD16 : 1;
5362 struct
5364 unsigned : 1;
5365 unsigned : 1;
5366 unsigned T3INSYNC : 1;
5367 unsigned : 1;
5368 unsigned : 1;
5369 unsigned : 1;
5370 unsigned : 1;
5371 unsigned : 1;
5374 struct
5376 unsigned : 1;
5377 unsigned : 1;
5378 unsigned T3SYNC : 1;
5379 unsigned : 1;
5380 unsigned : 1;
5381 unsigned : 1;
5382 unsigned : 1;
5383 unsigned : 1;
5386 struct
5388 unsigned : 4;
5389 unsigned T3CKPS : 2;
5390 unsigned : 2;
5392 } __T3CONbits_t;
5394 extern __at(0x0FB1) volatile __T3CONbits_t T3CONbits;
5396 #define _T3CON_TMR3ON 0x01
5397 #define _T3CON_TMR3CS 0x02
5398 #define _T3CON_NOT_T3SYNC 0x04
5399 #define _T3CON_T3INSYNC 0x04
5400 #define _T3CON_T3SYNC 0x04
5401 #define _T3CON_T3CCP1 0x08
5402 #define _T3CON_T3CKPS0 0x10
5403 #define _T3CON_T3CKPS1 0x20
5404 #define _T3CON_T3ECCP1 0x40
5405 #define _T3CON_RD16 0x80
5407 //==============================================================================
5409 extern __at(0x0FB2) __sfr TMR3;
5410 extern __at(0x0FB2) __sfr TMR3L;
5411 extern __at(0x0FB3) __sfr TMR3H;
5413 //==============================================================================
5414 // CCP1CON Bits
5416 extern __at(0x0FBD) __sfr CCP1CON;
5418 typedef union
5420 struct
5422 unsigned CCP1M0 : 1;
5423 unsigned CCP1M1 : 1;
5424 unsigned CCP1M2 : 1;
5425 unsigned CCP1M3 : 1;
5426 unsigned DC1B0 : 1;
5427 unsigned DC1B1 : 1;
5428 unsigned : 1;
5429 unsigned : 1;
5432 struct
5434 unsigned : 1;
5435 unsigned : 1;
5436 unsigned : 1;
5437 unsigned : 1;
5438 unsigned CCP1Y : 1;
5439 unsigned CCP1X : 1;
5440 unsigned : 1;
5441 unsigned : 1;
5444 struct
5446 unsigned CCP1M : 4;
5447 unsigned : 4;
5450 struct
5452 unsigned : 4;
5453 unsigned DC1B : 2;
5454 unsigned : 2;
5456 } __CCP1CONbits_t;
5458 extern __at(0x0FBD) volatile __CCP1CONbits_t CCP1CONbits;
5460 #define _CCP1M0 0x01
5461 #define _CCP1M1 0x02
5462 #define _CCP1M2 0x04
5463 #define _CCP1M3 0x08
5464 #define _DC1B0 0x10
5465 #define _CCP1Y 0x10
5466 #define _DC1B1 0x20
5467 #define _CCP1X 0x20
5469 //==============================================================================
5471 extern __at(0x0FBE) __sfr CCPR1;
5472 extern __at(0x0FBE) __sfr CCPR1L;
5473 extern __at(0x0FBF) __sfr CCPR1H;
5475 //==============================================================================
5476 // ADCON1 Bits
5478 extern __at(0x0FC1) __sfr ADCON1;
5480 typedef union
5482 struct
5484 unsigned PCFG0 : 1;
5485 unsigned PCFG1 : 1;
5486 unsigned PCFG2 : 1;
5487 unsigned PCFG3 : 1;
5488 unsigned : 1;
5489 unsigned : 1;
5490 unsigned ADCS2 : 1;
5491 unsigned ADFM : 1;
5494 struct
5496 unsigned PCFG : 4;
5497 unsigned : 4;
5499 } __ADCON1bits_t;
5501 extern __at(0x0FC1) volatile __ADCON1bits_t ADCON1bits;
5503 #define _PCFG0 0x01
5504 #define _PCFG1 0x02
5505 #define _PCFG2 0x04
5506 #define _PCFG3 0x08
5507 #define _ADCS2 0x40
5508 #define _ADFM 0x80
5510 //==============================================================================
5513 //==============================================================================
5514 // ADCON0 Bits
5516 extern __at(0x0FC2) __sfr ADCON0;
5518 typedef union
5520 struct
5522 unsigned ADON : 1;
5523 unsigned : 1;
5524 unsigned GO_NOT_DONE : 1;
5525 unsigned CHS0 : 1;
5526 unsigned CHS1 : 1;
5527 unsigned CHS2 : 1;
5528 unsigned ADCS0 : 1;
5529 unsigned ADCS1 : 1;
5532 struct
5534 unsigned : 1;
5535 unsigned : 1;
5536 unsigned DONE : 1;
5537 unsigned : 1;
5538 unsigned : 1;
5539 unsigned : 1;
5540 unsigned : 1;
5541 unsigned : 1;
5544 struct
5546 unsigned : 1;
5547 unsigned : 1;
5548 unsigned GO_DONE : 1;
5549 unsigned : 1;
5550 unsigned : 1;
5551 unsigned : 1;
5552 unsigned : 1;
5553 unsigned : 1;
5556 struct
5558 unsigned : 1;
5559 unsigned : 1;
5560 unsigned GO : 1;
5561 unsigned : 1;
5562 unsigned : 1;
5563 unsigned : 1;
5564 unsigned : 1;
5565 unsigned : 1;
5568 struct
5570 unsigned : 1;
5571 unsigned : 1;
5572 unsigned NOT_DONE : 1;
5573 unsigned : 1;
5574 unsigned : 1;
5575 unsigned : 1;
5576 unsigned : 1;
5577 unsigned : 1;
5580 struct
5582 unsigned : 3;
5583 unsigned CHS : 3;
5584 unsigned : 2;
5587 struct
5589 unsigned : 6;
5590 unsigned ADCS : 2;
5592 } __ADCON0bits_t;
5594 extern __at(0x0FC2) volatile __ADCON0bits_t ADCON0bits;
5596 #define _ADON 0x01
5597 #define _GO_NOT_DONE 0x04
5598 #define _DONE 0x04
5599 #define _GO_DONE 0x04
5600 #define _GO 0x04
5601 #define _NOT_DONE 0x04
5602 #define _CHS0 0x08
5603 #define _CHS1 0x10
5604 #define _CHS2 0x20
5605 #define _ADCS0 0x40
5606 #define _ADCS1 0x80
5608 //==============================================================================
5610 extern __at(0x0FC3) __sfr ADRES;
5611 extern __at(0x0FC3) __sfr ADRESL;
5612 extern __at(0x0FC4) __sfr ADRESH;
5614 //==============================================================================
5615 // SSPCON2 Bits
5617 extern __at(0x0FC5) __sfr SSPCON2;
5619 typedef struct
5621 unsigned SEN : 1;
5622 unsigned RSEN : 1;
5623 unsigned PEN : 1;
5624 unsigned RCEN : 1;
5625 unsigned ACKEN : 1;
5626 unsigned ACKDT : 1;
5627 unsigned ACKSTAT : 1;
5628 unsigned GCEN : 1;
5629 } __SSPCON2bits_t;
5631 extern __at(0x0FC5) volatile __SSPCON2bits_t SSPCON2bits;
5633 #define _SEN 0x01
5634 #define _RSEN 0x02
5635 #define _PEN 0x04
5636 #define _RCEN 0x08
5637 #define _ACKEN 0x10
5638 #define _ACKDT 0x20
5639 #define _ACKSTAT 0x40
5640 #define _GCEN 0x80
5642 //==============================================================================
5645 //==============================================================================
5646 // SSPCON1 Bits
5648 extern __at(0x0FC6) __sfr SSPCON1;
5650 typedef union
5652 struct
5654 unsigned SSPM0 : 1;
5655 unsigned SSPM1 : 1;
5656 unsigned SSPM2 : 1;
5657 unsigned SSPM3 : 1;
5658 unsigned CKP : 1;
5659 unsigned SSPEN : 1;
5660 unsigned SSPOV : 1;
5661 unsigned WCOL : 1;
5664 struct
5666 unsigned SSPM : 4;
5667 unsigned : 4;
5669 } __SSPCON1bits_t;
5671 extern __at(0x0FC6) volatile __SSPCON1bits_t SSPCON1bits;
5673 #define _SSPM0 0x01
5674 #define _SSPM1 0x02
5675 #define _SSPM2 0x04
5676 #define _SSPM3 0x08
5677 #define _CKP 0x10
5678 #define _SSPEN 0x20
5679 #define _SSPOV 0x40
5680 #define _WCOL 0x80
5682 //==============================================================================
5685 //==============================================================================
5686 // SSPSTAT Bits
5688 extern __at(0x0FC7) __sfr SSPSTAT;
5690 typedef union
5692 struct
5694 unsigned BF : 1;
5695 unsigned UA : 1;
5696 unsigned R_NOT_W : 1;
5697 unsigned S : 1;
5698 unsigned P : 1;
5699 unsigned D_NOT_A : 1;
5700 unsigned CKE : 1;
5701 unsigned SMP : 1;
5704 struct
5706 unsigned : 1;
5707 unsigned : 1;
5708 unsigned I2C_READ : 1;
5709 unsigned I2C_START : 1;
5710 unsigned I2C_STOP : 1;
5711 unsigned I2C_DATA : 1;
5712 unsigned : 1;
5713 unsigned : 1;
5716 struct
5718 unsigned : 1;
5719 unsigned : 1;
5720 unsigned R : 1;
5721 unsigned : 1;
5722 unsigned : 1;
5723 unsigned D : 1;
5724 unsigned : 1;
5725 unsigned : 1;
5728 struct
5730 unsigned : 1;
5731 unsigned : 1;
5732 unsigned READ_WRITE : 1;
5733 unsigned : 1;
5734 unsigned : 1;
5735 unsigned DATA_ADDRESS : 1;
5736 unsigned : 1;
5737 unsigned : 1;
5740 struct
5742 unsigned : 1;
5743 unsigned : 1;
5744 unsigned NOT_WRITE : 1;
5745 unsigned : 1;
5746 unsigned : 1;
5747 unsigned NOT_ADDRESS : 1;
5748 unsigned : 1;
5749 unsigned : 1;
5752 struct
5754 unsigned : 1;
5755 unsigned : 1;
5756 unsigned NOT_W : 1;
5757 unsigned : 1;
5758 unsigned : 1;
5759 unsigned NOT_A : 1;
5760 unsigned : 1;
5761 unsigned : 1;
5764 struct
5766 unsigned : 1;
5767 unsigned : 1;
5768 unsigned R_W : 1;
5769 unsigned : 1;
5770 unsigned : 1;
5771 unsigned D_A : 1;
5772 unsigned : 1;
5773 unsigned : 1;
5776 struct
5778 unsigned : 1;
5779 unsigned : 1;
5780 unsigned : 1;
5781 unsigned : 1;
5782 unsigned : 1;
5783 unsigned I2C_DAT : 1;
5784 unsigned : 1;
5785 unsigned : 1;
5787 } __SSPSTATbits_t;
5789 extern __at(0x0FC7) volatile __SSPSTATbits_t SSPSTATbits;
5791 #define _BF 0x01
5792 #define _UA 0x02
5793 #define _R_NOT_W 0x04
5794 #define _I2C_READ 0x04
5795 #define _R 0x04
5796 #define _READ_WRITE 0x04
5797 #define _NOT_WRITE 0x04
5798 #define _NOT_W 0x04
5799 #define _R_W 0x04
5800 #define _S 0x08
5801 #define _I2C_START 0x08
5802 #define _P 0x10
5803 #define _I2C_STOP 0x10
5804 #define _D_NOT_A 0x20
5805 #define _I2C_DATA 0x20
5806 #define _D 0x20
5807 #define _DATA_ADDRESS 0x20
5808 #define _NOT_ADDRESS 0x20
5809 #define _NOT_A 0x20
5810 #define _D_A 0x20
5811 #define _I2C_DAT 0x20
5812 #define _CKE 0x40
5813 #define _SMP 0x80
5815 //==============================================================================
5817 extern __at(0x0FC8) __sfr SSPADD;
5818 extern __at(0x0FC9) __sfr SSPBUF;
5820 //==============================================================================
5821 // T2CON Bits
5823 extern __at(0x0FCA) __sfr T2CON;
5825 typedef union
5827 struct
5829 unsigned T2CKPS0 : 1;
5830 unsigned T2CKPS1 : 1;
5831 unsigned TMR2ON : 1;
5832 unsigned TOUTPS0 : 1;
5833 unsigned TOUTPS1 : 1;
5834 unsigned TOUTPS2 : 1;
5835 unsigned TOUTPS3 : 1;
5836 unsigned : 1;
5839 struct
5841 unsigned T2CKPS : 2;
5842 unsigned : 6;
5845 struct
5847 unsigned : 3;
5848 unsigned TOUTPS : 4;
5849 unsigned : 1;
5851 } __T2CONbits_t;
5853 extern __at(0x0FCA) volatile __T2CONbits_t T2CONbits;
5855 #define _T2CKPS0 0x01
5856 #define _T2CKPS1 0x02
5857 #define _TMR2ON 0x04
5858 #define _TOUTPS0 0x08
5859 #define _TOUTPS1 0x10
5860 #define _TOUTPS2 0x20
5861 #define _TOUTPS3 0x40
5863 //==============================================================================
5865 extern __at(0x0FCB) __sfr PR2;
5866 extern __at(0x0FCC) __sfr TMR2;
5868 //==============================================================================
5869 // T1CON Bits
5871 extern __at(0x0FCD) __sfr T1CON;
5873 typedef union
5875 struct
5877 unsigned TMR1ON : 1;
5878 unsigned TMR1CS : 1;
5879 unsigned NOT_T1SYNC : 1;
5880 unsigned T1OSCEN : 1;
5881 unsigned T1CKPS0 : 1;
5882 unsigned T1CKPS1 : 1;
5883 unsigned : 1;
5884 unsigned RD16 : 1;
5887 struct
5889 unsigned : 1;
5890 unsigned : 1;
5891 unsigned T1INSYNC : 1;
5892 unsigned : 1;
5893 unsigned : 1;
5894 unsigned : 1;
5895 unsigned : 1;
5896 unsigned : 1;
5899 struct
5901 unsigned : 1;
5902 unsigned : 1;
5903 unsigned T1SYNC : 1;
5904 unsigned : 1;
5905 unsigned : 1;
5906 unsigned : 1;
5907 unsigned : 1;
5908 unsigned : 1;
5911 struct
5913 unsigned : 4;
5914 unsigned T1CKPS : 2;
5915 unsigned : 2;
5917 } __T1CONbits_t;
5919 extern __at(0x0FCD) volatile __T1CONbits_t T1CONbits;
5921 #define _TMR1ON 0x01
5922 #define _TMR1CS 0x02
5923 #define _NOT_T1SYNC 0x04
5924 #define _T1INSYNC 0x04
5925 #define _T1SYNC 0x04
5926 #define _T1OSCEN 0x08
5927 #define _T1CKPS0 0x10
5928 #define _T1CKPS1 0x20
5929 #define _RD16 0x80
5931 //==============================================================================
5933 extern __at(0x0FCE) __sfr TMR1;
5934 extern __at(0x0FCE) __sfr TMR1L;
5935 extern __at(0x0FCF) __sfr TMR1H;
5937 //==============================================================================
5938 // RCON Bits
5940 extern __at(0x0FD0) __sfr RCON;
5942 typedef union
5944 struct
5946 unsigned NOT_BOR : 1;
5947 unsigned NOT_POR : 1;
5948 unsigned NOT_PD : 1;
5949 unsigned NOT_TO : 1;
5950 unsigned NOT_RI : 1;
5951 unsigned : 1;
5952 unsigned : 1;
5953 unsigned IPEN : 1;
5956 struct
5958 unsigned BOR : 1;
5959 unsigned POR : 1;
5960 unsigned PD : 1;
5961 unsigned TO : 1;
5962 unsigned RI : 1;
5963 unsigned : 1;
5964 unsigned : 1;
5965 unsigned NOT_IPEN : 1;
5967 } __RCONbits_t;
5969 extern __at(0x0FD0) volatile __RCONbits_t RCONbits;
5971 #define _NOT_BOR 0x01
5972 #define _BOR 0x01
5973 #define _NOT_POR 0x02
5974 #define _POR 0x02
5975 #define _NOT_PD 0x04
5976 #define _PD 0x04
5977 #define _NOT_TO 0x08
5978 #define _TO 0x08
5979 #define _NOT_RI 0x10
5980 #define _RI 0x10
5981 #define _IPEN 0x80
5982 #define _NOT_IPEN 0x80
5984 //==============================================================================
5987 //==============================================================================
5988 // WDTCON Bits
5990 extern __at(0x0FD1) __sfr WDTCON;
5992 typedef union
5994 struct
5996 unsigned SWDTEN : 1;
5997 unsigned : 1;
5998 unsigned : 1;
5999 unsigned : 1;
6000 unsigned : 1;
6001 unsigned : 1;
6002 unsigned : 1;
6003 unsigned : 1;
6006 struct
6008 unsigned SWDTE : 1;
6009 unsigned : 1;
6010 unsigned : 1;
6011 unsigned : 1;
6012 unsigned : 1;
6013 unsigned : 1;
6014 unsigned : 1;
6015 unsigned : 1;
6017 } __WDTCONbits_t;
6019 extern __at(0x0FD1) volatile __WDTCONbits_t WDTCONbits;
6021 #define _SWDTEN 0x01
6022 #define _SWDTE 0x01
6024 //==============================================================================
6027 //==============================================================================
6028 // LVDCON Bits
6030 extern __at(0x0FD2) __sfr LVDCON;
6032 typedef union
6034 struct
6036 unsigned LVDL0 : 1;
6037 unsigned LVDL1 : 1;
6038 unsigned LVDL2 : 1;
6039 unsigned LVDL3 : 1;
6040 unsigned LVDEN : 1;
6041 unsigned IRVST : 1;
6042 unsigned : 1;
6043 unsigned : 1;
6046 struct
6048 unsigned : 1;
6049 unsigned : 1;
6050 unsigned : 1;
6051 unsigned : 1;
6052 unsigned : 1;
6053 unsigned IVRST : 1;
6054 unsigned : 1;
6055 unsigned : 1;
6058 struct
6060 unsigned LVDL : 4;
6061 unsigned : 4;
6063 } __LVDCONbits_t;
6065 extern __at(0x0FD2) volatile __LVDCONbits_t LVDCONbits;
6067 #define _LVDL0 0x01
6068 #define _LVDL1 0x02
6069 #define _LVDL2 0x04
6070 #define _LVDL3 0x08
6071 #define _LVDEN 0x10
6072 #define _IRVST 0x20
6073 #define _IVRST 0x20
6075 //==============================================================================
6078 //==============================================================================
6079 // OSCCON Bits
6081 extern __at(0x0FD3) __sfr OSCCON;
6083 typedef struct
6085 unsigned SCS : 1;
6086 unsigned : 1;
6087 unsigned : 1;
6088 unsigned : 1;
6089 unsigned : 1;
6090 unsigned : 1;
6091 unsigned : 1;
6092 unsigned : 1;
6093 } __OSCCONbits_t;
6095 extern __at(0x0FD3) volatile __OSCCONbits_t OSCCONbits;
6097 #define _SCS 0x01
6099 //==============================================================================
6102 //==============================================================================
6103 // T0CON Bits
6105 extern __at(0x0FD5) __sfr T0CON;
6107 typedef union
6109 struct
6111 unsigned T0PS0 : 1;
6112 unsigned T0PS1 : 1;
6113 unsigned T0PS2 : 1;
6114 unsigned PSA : 1;
6115 unsigned T0SE : 1;
6116 unsigned T0CS : 1;
6117 unsigned T08BIT : 1;
6118 unsigned TMR0ON : 1;
6121 struct
6123 unsigned T0PS : 3;
6124 unsigned : 5;
6126 } __T0CONbits_t;
6128 extern __at(0x0FD5) volatile __T0CONbits_t T0CONbits;
6130 #define _T0PS0 0x01
6131 #define _T0PS1 0x02
6132 #define _T0PS2 0x04
6133 #define _PSA 0x08
6134 #define _T0SE 0x10
6135 #define _T0CS 0x20
6136 #define _T08BIT 0x40
6137 #define _TMR0ON 0x80
6139 //==============================================================================
6141 extern __at(0x0FD6) __sfr TMR0;
6142 extern __at(0x0FD6) __sfr TMR0L;
6143 extern __at(0x0FD7) __sfr TMR0H;
6145 //==============================================================================
6146 // STATUS Bits
6148 extern __at(0x0FD8) __sfr STATUS;
6150 typedef struct
6152 unsigned C : 1;
6153 unsigned DC : 1;
6154 unsigned Z : 1;
6155 unsigned OV : 1;
6156 unsigned N : 1;
6157 unsigned : 1;
6158 unsigned : 1;
6159 unsigned : 1;
6160 } __STATUSbits_t;
6162 extern __at(0x0FD8) volatile __STATUSbits_t STATUSbits;
6164 #define _C 0x01
6165 #define _DC 0x02
6166 #define _Z 0x04
6167 #define _OV 0x08
6168 #define _N 0x10
6170 //==============================================================================
6172 extern __at(0x0FD9) __sfr FSR2L;
6173 extern __at(0x0FDA) __sfr FSR2H;
6174 extern __at(0x0FDB) __sfr PLUSW2;
6175 extern __at(0x0FDC) __sfr PREINC2;
6176 extern __at(0x0FDD) __sfr POSTDEC2;
6177 extern __at(0x0FDE) __sfr POSTINC2;
6178 extern __at(0x0FDF) __sfr INDF2;
6179 extern __at(0x0FE0) __sfr BSR;
6180 extern __at(0x0FE1) __sfr FSR1L;
6181 extern __at(0x0FE2) __sfr FSR1H;
6182 extern __at(0x0FE3) __sfr PLUSW1;
6183 extern __at(0x0FE4) __sfr PREINC1;
6184 extern __at(0x0FE5) __sfr POSTDEC1;
6185 extern __at(0x0FE6) __sfr POSTINC1;
6186 extern __at(0x0FE7) __sfr INDF1;
6187 extern __at(0x0FE8) __sfr WREG;
6188 extern __at(0x0FE9) __sfr FSR0L;
6189 extern __at(0x0FEA) __sfr FSR0H;
6190 extern __at(0x0FEB) __sfr PLUSW0;
6191 extern __at(0x0FEC) __sfr PREINC0;
6192 extern __at(0x0FED) __sfr POSTDEC0;
6193 extern __at(0x0FEE) __sfr POSTINC0;
6194 extern __at(0x0FEF) __sfr INDF0;
6196 //==============================================================================
6197 // INTCON3 Bits
6199 extern __at(0x0FF0) __sfr INTCON3;
6201 typedef union
6203 struct
6205 unsigned INT1IF : 1;
6206 unsigned INT2IF : 1;
6207 unsigned : 1;
6208 unsigned INT1IE : 1;
6209 unsigned INT2IE : 1;
6210 unsigned : 1;
6211 unsigned INT1IP : 1;
6212 unsigned INT2IP : 1;
6215 struct
6217 unsigned INT1F : 1;
6218 unsigned INT2F : 1;
6219 unsigned : 1;
6220 unsigned INT1E : 1;
6221 unsigned INT2E : 1;
6222 unsigned : 1;
6223 unsigned INT1P : 1;
6224 unsigned INT2P : 1;
6226 } __INTCON3bits_t;
6228 extern __at(0x0FF0) volatile __INTCON3bits_t INTCON3bits;
6230 #define _INT1IF 0x01
6231 #define _INT1F 0x01
6232 #define _INT2IF 0x02
6233 #define _INT2F 0x02
6234 #define _INT1IE 0x08
6235 #define _INT1E 0x08
6236 #define _INT2IE 0x10
6237 #define _INT2E 0x10
6238 #define _INT1IP 0x40
6239 #define _INT1P 0x40
6240 #define _INT2IP 0x80
6241 #define _INT2P 0x80
6243 //==============================================================================
6246 //==============================================================================
6247 // INTCON2 Bits
6249 extern __at(0x0FF1) __sfr INTCON2;
6251 typedef union
6253 struct
6255 unsigned RBIP : 1;
6256 unsigned : 1;
6257 unsigned TMR0IP : 1;
6258 unsigned : 1;
6259 unsigned INTEDG2 : 1;
6260 unsigned INTEDG1 : 1;
6261 unsigned INTEDG0 : 1;
6262 unsigned NOT_RBPU : 1;
6265 struct
6267 unsigned : 1;
6268 unsigned : 1;
6269 unsigned T0IP : 1;
6270 unsigned : 1;
6271 unsigned : 1;
6272 unsigned : 1;
6273 unsigned : 1;
6274 unsigned RBPU : 1;
6276 } __INTCON2bits_t;
6278 extern __at(0x0FF1) volatile __INTCON2bits_t INTCON2bits;
6280 #define _RBIP 0x01
6281 #define _TMR0IP 0x04
6282 #define _T0IP 0x04
6283 #define _INTEDG2 0x10
6284 #define _INTEDG1 0x20
6285 #define _INTEDG0 0x40
6286 #define _NOT_RBPU 0x80
6287 #define _RBPU 0x80
6289 //==============================================================================
6292 //==============================================================================
6293 // INTCON Bits
6295 extern __at(0x0FF2) __sfr INTCON;
6297 typedef union
6299 struct
6301 unsigned RBIF : 1;
6302 unsigned INT0IF : 1;
6303 unsigned TMR0IF : 1;
6304 unsigned RBIE : 1;
6305 unsigned INT0IE : 1;
6306 unsigned TMR0IE : 1;
6307 unsigned PEIE_GIEL : 1;
6308 unsigned GIE_GIEH : 1;
6311 struct
6313 unsigned : 1;
6314 unsigned INT0F : 1;
6315 unsigned T0IF : 1;
6316 unsigned : 1;
6317 unsigned INT0E : 1;
6318 unsigned T0IE : 1;
6319 unsigned PEIE : 1;
6320 unsigned GIE : 1;
6323 struct
6325 unsigned : 1;
6326 unsigned : 1;
6327 unsigned : 1;
6328 unsigned : 1;
6329 unsigned : 1;
6330 unsigned : 1;
6331 unsigned GIEL : 1;
6332 unsigned GIEH : 1;
6334 } __INTCONbits_t;
6336 extern __at(0x0FF2) volatile __INTCONbits_t INTCONbits;
6338 #define _RBIF 0x01
6339 #define _INT0IF 0x02
6340 #define _INT0F 0x02
6341 #define _TMR0IF 0x04
6342 #define _T0IF 0x04
6343 #define _RBIE 0x08
6344 #define _INT0IE 0x10
6345 #define _INT0E 0x10
6346 #define _TMR0IE 0x20
6347 #define _T0IE 0x20
6348 #define _PEIE_GIEL 0x40
6349 #define _PEIE 0x40
6350 #define _GIEL 0x40
6351 #define _GIE_GIEH 0x80
6352 #define _GIE 0x80
6353 #define _GIEH 0x80
6355 //==============================================================================
6358 //==============================================================================
6359 // INTCON1 Bits
6361 extern __at(0x0FF2) __sfr INTCON1;
6363 typedef union
6365 struct
6367 unsigned RBIF : 1;
6368 unsigned INT0IF : 1;
6369 unsigned TMR0IF : 1;
6370 unsigned RBIE : 1;
6371 unsigned INT0IE : 1;
6372 unsigned TMR0IE : 1;
6373 unsigned PEIE_GIEL : 1;
6374 unsigned GIE_GIEH : 1;
6377 struct
6379 unsigned : 1;
6380 unsigned INT0F : 1;
6381 unsigned T0IF : 1;
6382 unsigned : 1;
6383 unsigned INT0E : 1;
6384 unsigned T0IE : 1;
6385 unsigned PEIE : 1;
6386 unsigned GIE : 1;
6389 struct
6391 unsigned : 1;
6392 unsigned : 1;
6393 unsigned : 1;
6394 unsigned : 1;
6395 unsigned : 1;
6396 unsigned : 1;
6397 unsigned GIEL : 1;
6398 unsigned GIEH : 1;
6400 } __INTCON1bits_t;
6402 extern __at(0x0FF2) volatile __INTCON1bits_t INTCON1bits;
6404 #define _INTCON1_RBIF 0x01
6405 #define _INTCON1_INT0IF 0x02
6406 #define _INTCON1_INT0F 0x02
6407 #define _INTCON1_TMR0IF 0x04
6408 #define _INTCON1_T0IF 0x04
6409 #define _INTCON1_RBIE 0x08
6410 #define _INTCON1_INT0IE 0x10
6411 #define _INTCON1_INT0E 0x10
6412 #define _INTCON1_TMR0IE 0x20
6413 #define _INTCON1_T0IE 0x20
6414 #define _INTCON1_PEIE_GIEL 0x40
6415 #define _INTCON1_PEIE 0x40
6416 #define _INTCON1_GIEL 0x40
6417 #define _INTCON1_GIE_GIEH 0x80
6418 #define _INTCON1_GIE 0x80
6419 #define _INTCON1_GIEH 0x80
6421 //==============================================================================
6423 extern __at(0x0FF3) __sfr PROD;
6424 extern __at(0x0FF3) __sfr PRODL;
6425 extern __at(0x0FF4) __sfr PRODH;
6426 extern __at(0x0FF5) __sfr TABLAT;
6427 extern __at(0x0FF6) __sfr TBLPTR;
6428 extern __at(0x0FF6) __sfr TBLPTRL;
6429 extern __at(0x0FF7) __sfr TBLPTRH;
6430 extern __at(0x0FF8) __sfr TBLPTRU;
6431 extern __at(0x0FF9) __sfr PC;
6432 extern __at(0x0FF9) __sfr PCL;
6433 extern __at(0x0FFA) __sfr PCLATH;
6434 extern __at(0x0FFB) __sfr PCLATU;
6436 //==============================================================================
6437 // STKPTR Bits
6439 extern __at(0x0FFC) __sfr STKPTR;
6441 typedef union
6443 struct
6445 unsigned STKPTR0 : 1;
6446 unsigned STKPTR1 : 1;
6447 unsigned STKPTR2 : 1;
6448 unsigned STKPTR3 : 1;
6449 unsigned STKPTR4 : 1;
6450 unsigned : 1;
6451 unsigned STKUNF : 1;
6452 unsigned STKFUL : 1;
6455 struct
6457 unsigned SP0 : 1;
6458 unsigned SP1 : 1;
6459 unsigned SP2 : 1;
6460 unsigned SP3 : 1;
6461 unsigned SP4 : 1;
6462 unsigned : 1;
6463 unsigned : 1;
6464 unsigned STKOVF : 1;
6467 struct
6469 unsigned STKPTR : 5;
6470 unsigned : 3;
6473 struct
6475 unsigned SP : 5;
6476 unsigned : 3;
6478 } __STKPTRbits_t;
6480 extern __at(0x0FFC) volatile __STKPTRbits_t STKPTRbits;
6482 #define _STKPTR0 0x01
6483 #define _SP0 0x01
6484 #define _STKPTR1 0x02
6485 #define _SP1 0x02
6486 #define _STKPTR2 0x04
6487 #define _SP2 0x04
6488 #define _STKPTR3 0x08
6489 #define _SP3 0x08
6490 #define _STKPTR4 0x10
6491 #define _SP4 0x10
6492 #define _STKUNF 0x40
6493 #define _STKFUL 0x80
6494 #define _STKOVF 0x80
6496 //==============================================================================
6498 extern __at(0x0FFD) __sfr TOS;
6499 extern __at(0x0FFD) __sfr TOSL;
6500 extern __at(0x0FFE) __sfr TOSH;
6501 extern __at(0x0FFF) __sfr TOSU;
6503 //==============================================================================
6505 // Configuration Bits
6507 //==============================================================================
6509 #define __CONFIG1H 0x300001
6510 #define __CONFIG2L 0x300002
6511 #define __CONFIG2H 0x300003
6512 #define __CONFIG4L 0x300006
6513 #define __CONFIG5L 0x300008
6514 #define __CONFIG5H 0x300009
6515 #define __CONFIG6L 0x30000A
6516 #define __CONFIG6H 0x30000B
6517 #define __CONFIG7L 0x30000C
6518 #define __CONFIG7H 0x30000D
6520 //----------------------------- CONFIG1H Options -------------------------------
6522 #define _LP_OSC 0xF8 // LP oscillator.
6523 #define _LP_OSC_1H 0xF8 // LP oscillator.
6524 #define _XT_OSC 0xF9 // XT oscillator.
6525 #define _XT_OSC_1H 0xF9 // XT oscillator.
6526 #define _HS_OSC 0xFA // HS oscillator.
6527 #define _HS_OSC_1H 0xFA // HS oscillator.
6528 #define _RC_OSC 0xFB // RC oscillator.
6529 #define _RC_OSC_1H 0xFB // RC oscillator.
6530 #define _EC_OSC 0xFC // EC oscillator w/ OSC2 configured as divide-by-4 clock output.
6531 #define _EC_OSC_1H 0xFC // EC oscillator w/ OSC2 configured as divide-by-4 clock output.
6532 #define _ECIO_OSC 0xFD // EC oscillator w/ OSC2 configured as RA6.
6533 #define _ECIO_OSC_1H 0xFD // EC oscillator w/ OSC2 configured as RA6.
6534 #define _HSPLL_OSC 0xFE // HS oscillator with PLL enabled/Clock frequency = (4 x FOSC).
6535 #define _HSPLL_OSC_1H 0xFE // HS oscillator with PLL enabled/Clock frequency = (4 x FOSC).
6536 #define _RCIO_OSC 0xFF // RC oscillator w/ OSC2 configured as RA6.
6537 #define _RCIO_OSC_1H 0xFF // RC oscillator w/ OSC2 configured as RA6.
6538 #define _OSCS_ON_1H 0xDF // Oscillator system clock switch option is enabled (oscillator switching is enabled).
6539 #define _OSCS_OFF_1H 0xFF // Oscillator system clock switch option is disabled (main oscillator is source).
6541 //----------------------------- CONFIG2L Options -------------------------------
6543 #define _PWRT_ON_2L 0xFE // PWRT enabled.
6544 #define _PWRT_OFF_2L 0xFF // PWRT disabled.
6545 #define _BOR_OFF_2L 0xFD // Brown-out Reset disabled.
6546 #define _BOR_ON_2L 0xFF // Brown-out Reset enabled.
6547 #define _BORV_45_2L 0xF3 // VBOR set to 4.5V.
6548 #define _BORV_42_2L 0xF7 // VBOR set to 4.2V.
6549 #define _BORV_27_2L 0xFB // VBOR set to 2.7V.
6550 #define _BORV_25 0xFF // VBOR set to 2.5V.
6551 #define _BORV_25_2L 0xFF // VBOR set to 2.5V.
6553 //----------------------------- CONFIG2H Options -------------------------------
6555 #define _WDT_OFF_2H 0xFE // WDT disabled (control is placed on the SWDTEN bit).
6556 #define _WDT_ON_2H 0xFF // WDT enabled.
6557 #define _WDTPS_1_2H 0xF1 // 1:1.
6558 #define _WDTPS_2_2H 0xF3 // 1:2.
6559 #define _WDTPS_4_2H 0xF5 // 1:4.
6560 #define _WDTPS_8_2H 0xF7 // 1:8.
6561 #define _WDTPS_16_2H 0xF9 // 1:16.
6562 #define _WDTPS_32_2H 0xFB // 1:32.
6563 #define _WDTPS_64_2H 0xFD // 1:64.
6564 #define _WDTPS_128_2H 0xFF // 1:128.
6566 //----------------------------- CONFIG4L Options -------------------------------
6568 #define _STVR_OFF_4L 0xFE // Stack Full/Underflow will not cause Reset.
6569 #define _STVR_ON_4L 0xFF // Stack Full/Underflow will cause Reset.
6570 #define _LVP_OFF_4L 0xFB // Low-Voltage ICSP disabled.
6571 #define _LVP_ON_4L 0xFF // Low-Voltage ICSP enabled.
6572 #define _DEBUG_ON_4L 0x7F // Background Debugger enabled. RB6 and RB7 are dedicated to In-Circuit Debug.
6573 #define _DEBUG_OFF_4L 0xFF // Background Debugger disabled. RB6 and RB7 configured as general purpose I/O pins.
6575 //----------------------------- CONFIG5L Options -------------------------------
6577 #define _CP0_ON_5L 0xFE // Block 0 (000200-001FFFh) code protected.
6578 #define _CP0_OFF_5L 0xFF // Block 0 (000200-001FFFh) not code protected.
6579 #define _CP1_ON_5L 0xFD // Block 1 (002000-003FFFh) code protected.
6580 #define _CP1_OFF_5L 0xFF // Block 1 (002000-003FFFh) not code protected.
6581 #define _CP2_ON_5L 0xFB // Block 2 (004000-005FFFh) code protected.
6582 #define _CP2_OFF_5L 0xFF // Block 2 (004000-005FFFh) not code protected.
6583 #define _CP3_ON_5L 0xF7 // Block 3 (006000-007FFFh) code protected.
6584 #define _CP3_OFF_5L 0xFF // Block 3 (006000-007FFFh) not code protected.
6586 //----------------------------- CONFIG5H Options -------------------------------
6588 #define _CPB_ON_5H 0xBF // Boot Block (000000-0001FFh) code protected.
6589 #define _CPB_OFF_5H 0xFF // Boot Block (000000-0001FFh) not code protected.
6590 #define _CPD_ON_5H 0x7F // Data EEPROM code protected.
6591 #define _CPD_OFF_5H 0xFF // Data EEPROM not code protected.
6593 //----------------------------- CONFIG6L Options -------------------------------
6595 #define _WRT0_ON_6L 0xFE // Block 0 (000200-001FFFh) write protected.
6596 #define _WRT0_OFF_6L 0xFF // Block 0 (000200-001FFFh) not write protected.
6597 #define _WRT1_ON_6L 0xFD // Block 1 (002000-003FFFh) write protected.
6598 #define _WRT1_OFF_6L 0xFF // Block 1 (002000-003FFFh) not write protected.
6599 #define _WRT2_ON_6L 0xFB // Block 2 (004000-005FFFh) write protected.
6600 #define _WRT2_OFF_6L 0xFF // Block 2 (004000-005FFFh) not write protected.
6601 #define _WRT3_ON_6L 0xF7 // Block 3 (006000-007FFFh) write protected.
6602 #define _WRT3_OFF_6L 0xFF // Block 3 (006000-007FFFh) not write protected.
6604 //----------------------------- CONFIG6H Options -------------------------------
6606 #define _WRTC_ON_6H 0xDF // Configuration registers (300000-3000FFh) write protected.
6607 #define _WRTC_OFF_6H 0xFF // Configuration registers (300000-3000FFh) not write protected.
6608 #define _WRTB_ON_6H 0xBF // Boot Block (000000-0001FFh) write protected.
6609 #define _WRTB_OFF_6H 0xFF // Boot Block (000000-0001FFh) not write protected.
6610 #define _WRTD_ON_6H 0x7F // Data EEPROM write protected.
6611 #define _WRTD_OFF_6H 0xFF // Data EEPROM not write protected.
6613 //----------------------------- CONFIG7L Options -------------------------------
6615 #define _EBTR0_ON_7L 0xFE // Block 0 (000200-001FFFh) protected from Table Reads executed in other blocks.
6616 #define _EBTR0_OFF_7L 0xFF // Block 0 (000200-001FFFh) not protected from Table Reads executed in other blocks.
6617 #define _EBTR1_ON_7L 0xFD // Block 1 (002000-003FFFh) protected from Table Reads executed in other blocks.
6618 #define _EBTR1_OFF_7L 0xFF // Block 1 (002000-003FFFh) not protected from Table Reads executed in other blocks.
6619 #define _EBTR2_ON_7L 0xFB // Block 2 (004000-005FFFh) protected from Table Reads executed in other blocks.
6620 #define _EBTR2_OFF_7L 0xFF // Block 2 (004000-005FFFh) not protected from Table Reads executed in other blocks.
6621 #define _EBTR3_ON_7L 0xF7 // Block 3 (006000-007FFFh) protected from Table Reads executed in other blocks.
6622 #define _EBTR3_OFF_7L 0xFF // Block 3 (006000-007FFFh) not protected from Table Reads executed in other blocks.
6624 //----------------------------- CONFIG7H Options -------------------------------
6626 #define _EBTRB_ON_7H 0xBF // Boot Block (000000-0001FFh) protected from Table Reads executed in other blocks.
6627 #define _EBTRB_OFF_7H 0xFF // Boot Block (000000-0001FFh) not protected from Table Reads executed in other blocks.
6629 //==============================================================================
6631 #define __DEVID1 0x3FFFFE
6632 #define __DEVID2 0x3FFFFF
6634 #define __IDLOC0 0x200000
6635 #define __IDLOC1 0x200001
6636 #define __IDLOC2 0x200002
6637 #define __IDLOC3 0x200003
6638 #define __IDLOC4 0x200004
6639 #define __IDLOC5 0x200005
6640 #define __IDLOC6 0x200006
6641 #define __IDLOC7 0x200007
6643 #endif // #ifndef __PIC18F258_H__