struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / non-free / include / pic16 / pic18lf458.h
blob651ab153f3834d9eb60dc22b7f661ca7da0382a5
1 /*
2 * This declarations of the PIC18LF458 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:59 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 __PIC18LF458_H__
26 #define __PIC18LF458_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 RESB : 2;
3347 unsigned : 2;
3350 struct
3352 unsigned : 4;
3353 unsigned RB : 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 // PORTD Bits
4393 extern __at(0x0F83) __sfr PORTD;
4395 typedef union
4397 struct
4399 unsigned RD0 : 1;
4400 unsigned RD1 : 1;
4401 unsigned RD2 : 1;
4402 unsigned RD3 : 1;
4403 unsigned RD4 : 1;
4404 unsigned RD5 : 1;
4405 unsigned RD6 : 1;
4406 unsigned RD7 : 1;
4409 struct
4411 unsigned C1INP : 1;
4412 unsigned C1INM : 1;
4413 unsigned C2INP : 1;
4414 unsigned C2INM : 1;
4415 unsigned P1A : 1;
4416 unsigned P1B : 1;
4417 unsigned P1C : 1;
4418 unsigned P1D : 1;
4421 struct
4423 unsigned PSP0 : 1;
4424 unsigned PSP1 : 1;
4425 unsigned PSP2 : 1;
4426 unsigned PSP3 : 1;
4427 unsigned ECCP1 : 1;
4428 unsigned PSP5 : 1;
4429 unsigned PSP6 : 1;
4430 unsigned PSP7 : 1;
4433 struct
4435 unsigned : 1;
4436 unsigned : 1;
4437 unsigned : 1;
4438 unsigned : 1;
4439 unsigned PSP4 : 1;
4440 unsigned : 1;
4441 unsigned : 1;
4442 unsigned : 1;
4444 } __PORTDbits_t;
4446 extern __at(0x0F83) volatile __PORTDbits_t PORTDbits;
4448 #define _PORTD_RD0 0x01
4449 #define _PORTD_C1INP 0x01
4450 #define _PORTD_PSP0 0x01
4451 #define _PORTD_RD1 0x02
4452 #define _PORTD_C1INM 0x02
4453 #define _PORTD_PSP1 0x02
4454 #define _PORTD_RD2 0x04
4455 #define _PORTD_C2INP 0x04
4456 #define _PORTD_PSP2 0x04
4457 #define _PORTD_RD3 0x08
4458 #define _PORTD_C2INM 0x08
4459 #define _PORTD_PSP3 0x08
4460 #define _PORTD_RD4 0x10
4461 #define _PORTD_P1A 0x10
4462 #define _PORTD_ECCP1 0x10
4463 #define _PORTD_PSP4 0x10
4464 #define _PORTD_RD5 0x20
4465 #define _PORTD_P1B 0x20
4466 #define _PORTD_PSP5 0x20
4467 #define _PORTD_RD6 0x40
4468 #define _PORTD_P1C 0x40
4469 #define _PORTD_PSP6 0x40
4470 #define _PORTD_RD7 0x80
4471 #define _PORTD_P1D 0x80
4472 #define _PORTD_PSP7 0x80
4474 //==============================================================================
4477 //==============================================================================
4478 // PORTE Bits
4480 extern __at(0x0F84) __sfr PORTE;
4482 typedef union
4484 struct
4486 unsigned RE0 : 1;
4487 unsigned RE1 : 1;
4488 unsigned RE2 : 1;
4489 unsigned : 1;
4490 unsigned : 1;
4491 unsigned : 1;
4492 unsigned : 1;
4493 unsigned : 1;
4496 struct
4498 unsigned AN5 : 1;
4499 unsigned AN6 : 1;
4500 unsigned AN7 : 1;
4501 unsigned : 1;
4502 unsigned : 1;
4503 unsigned : 1;
4504 unsigned : 1;
4505 unsigned : 1;
4508 struct
4510 unsigned NOT_RD : 1;
4511 unsigned NOT_WR : 1;
4512 unsigned NOT_CS : 1;
4513 unsigned : 1;
4514 unsigned : 1;
4515 unsigned : 1;
4516 unsigned : 1;
4517 unsigned : 1;
4520 struct
4522 unsigned RD : 1;
4523 unsigned WR : 1;
4524 unsigned CS : 1;
4525 unsigned : 1;
4526 unsigned : 1;
4527 unsigned : 1;
4528 unsigned : 1;
4529 unsigned : 1;
4532 struct
4534 unsigned RE : 3;
4535 unsigned : 5;
4537 } __PORTEbits_t;
4539 extern __at(0x0F84) volatile __PORTEbits_t PORTEbits;
4541 #define _PORTE_RE0 0x01
4542 #define _PORTE_AN5 0x01
4543 #define _PORTE_NOT_RD 0x01
4544 #define _PORTE_RD 0x01
4545 #define _PORTE_RE1 0x02
4546 #define _PORTE_AN6 0x02
4547 #define _PORTE_NOT_WR 0x02
4548 #define _PORTE_WR 0x02
4549 #define _PORTE_RE2 0x04
4550 #define _PORTE_AN7 0x04
4551 #define _PORTE_NOT_CS 0x04
4552 #define _PORTE_CS 0x04
4554 //==============================================================================
4557 //==============================================================================
4558 // LATA Bits
4560 extern __at(0x0F89) __sfr LATA;
4562 typedef union
4564 struct
4566 unsigned LATA0 : 1;
4567 unsigned LATA1 : 1;
4568 unsigned LATA2 : 1;
4569 unsigned LATA3 : 1;
4570 unsigned LATA4 : 1;
4571 unsigned LATA5 : 1;
4572 unsigned LATA6 : 1;
4573 unsigned : 1;
4576 struct
4578 unsigned LATA : 7;
4579 unsigned : 1;
4581 } __LATAbits_t;
4583 extern __at(0x0F89) volatile __LATAbits_t LATAbits;
4585 #define _LATA0 0x01
4586 #define _LATA1 0x02
4587 #define _LATA2 0x04
4588 #define _LATA3 0x08
4589 #define _LATA4 0x10
4590 #define _LATA5 0x20
4591 #define _LATA6 0x40
4593 //==============================================================================
4596 //==============================================================================
4597 // LATB Bits
4599 extern __at(0x0F8A) __sfr LATB;
4601 typedef struct
4603 unsigned LATB0 : 1;
4604 unsigned LATB1 : 1;
4605 unsigned LATB2 : 1;
4606 unsigned LATB3 : 1;
4607 unsigned LATB4 : 1;
4608 unsigned LATB5 : 1;
4609 unsigned LATB6 : 1;
4610 unsigned LATB7 : 1;
4611 } __LATBbits_t;
4613 extern __at(0x0F8A) volatile __LATBbits_t LATBbits;
4615 #define _LATB0 0x01
4616 #define _LATB1 0x02
4617 #define _LATB2 0x04
4618 #define _LATB3 0x08
4619 #define _LATB4 0x10
4620 #define _LATB5 0x20
4621 #define _LATB6 0x40
4622 #define _LATB7 0x80
4624 //==============================================================================
4627 //==============================================================================
4628 // LATC Bits
4630 extern __at(0x0F8B) __sfr LATC;
4632 typedef struct
4634 unsigned LATC0 : 1;
4635 unsigned LATC1 : 1;
4636 unsigned LATC2 : 1;
4637 unsigned LATC3 : 1;
4638 unsigned LATC4 : 1;
4639 unsigned LATC5 : 1;
4640 unsigned LATC6 : 1;
4641 unsigned LATC7 : 1;
4642 } __LATCbits_t;
4644 extern __at(0x0F8B) volatile __LATCbits_t LATCbits;
4646 #define _LATC0 0x01
4647 #define _LATC1 0x02
4648 #define _LATC2 0x04
4649 #define _LATC3 0x08
4650 #define _LATC4 0x10
4651 #define _LATC5 0x20
4652 #define _LATC6 0x40
4653 #define _LATC7 0x80
4655 //==============================================================================
4658 //==============================================================================
4659 // LATD Bits
4661 extern __at(0x0F8C) __sfr LATD;
4663 typedef struct
4665 unsigned LATD0 : 1;
4666 unsigned LATD1 : 1;
4667 unsigned LATD2 : 1;
4668 unsigned LATD3 : 1;
4669 unsigned LATD4 : 1;
4670 unsigned LATD5 : 1;
4671 unsigned LATD6 : 1;
4672 unsigned LATD7 : 1;
4673 } __LATDbits_t;
4675 extern __at(0x0F8C) volatile __LATDbits_t LATDbits;
4677 #define _LATD0 0x01
4678 #define _LATD1 0x02
4679 #define _LATD2 0x04
4680 #define _LATD3 0x08
4681 #define _LATD4 0x10
4682 #define _LATD5 0x20
4683 #define _LATD6 0x40
4684 #define _LATD7 0x80
4686 //==============================================================================
4689 //==============================================================================
4690 // LATE Bits
4692 extern __at(0x0F8D) __sfr LATE;
4694 typedef union
4696 struct
4698 unsigned LATE0 : 1;
4699 unsigned LATE1 : 1;
4700 unsigned LATE2 : 1;
4701 unsigned : 1;
4702 unsigned : 1;
4703 unsigned : 1;
4704 unsigned : 1;
4705 unsigned : 1;
4708 struct
4710 unsigned LATE : 3;
4711 unsigned : 5;
4713 } __LATEbits_t;
4715 extern __at(0x0F8D) volatile __LATEbits_t LATEbits;
4717 #define _LATE0 0x01
4718 #define _LATE1 0x02
4719 #define _LATE2 0x04
4721 //==============================================================================
4724 //==============================================================================
4725 // DDRA Bits
4727 extern __at(0x0F92) __sfr DDRA;
4729 typedef union
4731 struct
4733 unsigned TRISA0 : 1;
4734 unsigned TRISA1 : 1;
4735 unsigned TRISA2 : 1;
4736 unsigned TRISA3 : 1;
4737 unsigned TRISA4 : 1;
4738 unsigned TRISA5 : 1;
4739 unsigned TRISA6 : 1;
4740 unsigned : 1;
4743 struct
4745 unsigned RA0 : 1;
4746 unsigned RA1 : 1;
4747 unsigned RA2 : 1;
4748 unsigned RA3 : 1;
4749 unsigned RA4 : 1;
4750 unsigned RA5 : 1;
4751 unsigned RA6 : 1;
4752 unsigned : 1;
4755 struct
4757 unsigned RA : 7;
4758 unsigned : 1;
4761 struct
4763 unsigned TRISA : 7;
4764 unsigned : 1;
4766 } __DDRAbits_t;
4768 extern __at(0x0F92) volatile __DDRAbits_t DDRAbits;
4770 #define _TRISA0 0x01
4771 #define _RA0 0x01
4772 #define _TRISA1 0x02
4773 #define _RA1 0x02
4774 #define _TRISA2 0x04
4775 #define _RA2 0x04
4776 #define _TRISA3 0x08
4777 #define _RA3 0x08
4778 #define _TRISA4 0x10
4779 #define _RA4 0x10
4780 #define _TRISA5 0x20
4781 #define _RA5 0x20
4782 #define _TRISA6 0x40
4783 #define _RA6 0x40
4785 //==============================================================================
4788 //==============================================================================
4789 // TRISA Bits
4791 extern __at(0x0F92) __sfr TRISA;
4793 typedef union
4795 struct
4797 unsigned TRISA0 : 1;
4798 unsigned TRISA1 : 1;
4799 unsigned TRISA2 : 1;
4800 unsigned TRISA3 : 1;
4801 unsigned TRISA4 : 1;
4802 unsigned TRISA5 : 1;
4803 unsigned TRISA6 : 1;
4804 unsigned : 1;
4807 struct
4809 unsigned RA0 : 1;
4810 unsigned RA1 : 1;
4811 unsigned RA2 : 1;
4812 unsigned RA3 : 1;
4813 unsigned RA4 : 1;
4814 unsigned RA5 : 1;
4815 unsigned RA6 : 1;
4816 unsigned : 1;
4819 struct
4821 unsigned RA : 7;
4822 unsigned : 1;
4825 struct
4827 unsigned TRISA : 7;
4828 unsigned : 1;
4830 } __TRISAbits_t;
4832 extern __at(0x0F92) volatile __TRISAbits_t TRISAbits;
4834 #define _TRISA_TRISA0 0x01
4835 #define _TRISA_RA0 0x01
4836 #define _TRISA_TRISA1 0x02
4837 #define _TRISA_RA1 0x02
4838 #define _TRISA_TRISA2 0x04
4839 #define _TRISA_RA2 0x04
4840 #define _TRISA_TRISA3 0x08
4841 #define _TRISA_RA3 0x08
4842 #define _TRISA_TRISA4 0x10
4843 #define _TRISA_RA4 0x10
4844 #define _TRISA_TRISA5 0x20
4845 #define _TRISA_RA5 0x20
4846 #define _TRISA_TRISA6 0x40
4847 #define _TRISA_RA6 0x40
4849 //==============================================================================
4852 //==============================================================================
4853 // DDRB Bits
4855 extern __at(0x0F93) __sfr DDRB;
4857 typedef union
4859 struct
4861 unsigned TRISB0 : 1;
4862 unsigned TRISB1 : 1;
4863 unsigned TRISB2 : 1;
4864 unsigned TRISB3 : 1;
4865 unsigned TRISB4 : 1;
4866 unsigned TRISB5 : 1;
4867 unsigned TRISB6 : 1;
4868 unsigned TRISB7 : 1;
4871 struct
4873 unsigned RB0 : 1;
4874 unsigned RB1 : 1;
4875 unsigned RB2 : 1;
4876 unsigned RB3 : 1;
4877 unsigned RB4 : 1;
4878 unsigned RB5 : 1;
4879 unsigned RB6 : 1;
4880 unsigned RB7 : 1;
4882 } __DDRBbits_t;
4884 extern __at(0x0F93) volatile __DDRBbits_t DDRBbits;
4886 #define _TRISB0 0x01
4887 #define _RB0 0x01
4888 #define _TRISB1 0x02
4889 #define _RB1 0x02
4890 #define _TRISB2 0x04
4891 #define _RB2 0x04
4892 #define _TRISB3 0x08
4893 #define _RB3 0x08
4894 #define _TRISB4 0x10
4895 #define _RB4 0x10
4896 #define _TRISB5 0x20
4897 #define _RB5 0x20
4898 #define _TRISB6 0x40
4899 #define _RB6 0x40
4900 #define _TRISB7 0x80
4901 #define _RB7 0x80
4903 //==============================================================================
4906 //==============================================================================
4907 // TRISB Bits
4909 extern __at(0x0F93) __sfr TRISB;
4911 typedef union
4913 struct
4915 unsigned TRISB0 : 1;
4916 unsigned TRISB1 : 1;
4917 unsigned TRISB2 : 1;
4918 unsigned TRISB3 : 1;
4919 unsigned TRISB4 : 1;
4920 unsigned TRISB5 : 1;
4921 unsigned TRISB6 : 1;
4922 unsigned TRISB7 : 1;
4925 struct
4927 unsigned RB0 : 1;
4928 unsigned RB1 : 1;
4929 unsigned RB2 : 1;
4930 unsigned RB3 : 1;
4931 unsigned RB4 : 1;
4932 unsigned RB5 : 1;
4933 unsigned RB6 : 1;
4934 unsigned RB7 : 1;
4936 } __TRISBbits_t;
4938 extern __at(0x0F93) volatile __TRISBbits_t TRISBbits;
4940 #define _TRISB_TRISB0 0x01
4941 #define _TRISB_RB0 0x01
4942 #define _TRISB_TRISB1 0x02
4943 #define _TRISB_RB1 0x02
4944 #define _TRISB_TRISB2 0x04
4945 #define _TRISB_RB2 0x04
4946 #define _TRISB_TRISB3 0x08
4947 #define _TRISB_RB3 0x08
4948 #define _TRISB_TRISB4 0x10
4949 #define _TRISB_RB4 0x10
4950 #define _TRISB_TRISB5 0x20
4951 #define _TRISB_RB5 0x20
4952 #define _TRISB_TRISB6 0x40
4953 #define _TRISB_RB6 0x40
4954 #define _TRISB_TRISB7 0x80
4955 #define _TRISB_RB7 0x80
4957 //==============================================================================
4960 //==============================================================================
4961 // DDRC Bits
4963 extern __at(0x0F94) __sfr DDRC;
4965 typedef union
4967 struct
4969 unsigned TRISC0 : 1;
4970 unsigned TRISC1 : 1;
4971 unsigned TRISC2 : 1;
4972 unsigned TRISC3 : 1;
4973 unsigned TRISC4 : 1;
4974 unsigned TRISC5 : 1;
4975 unsigned TRISC6 : 1;
4976 unsigned TRISC7 : 1;
4979 struct
4981 unsigned RC0 : 1;
4982 unsigned RC1 : 1;
4983 unsigned RC2 : 1;
4984 unsigned RC3 : 1;
4985 unsigned RC4 : 1;
4986 unsigned RC5 : 1;
4987 unsigned RC6 : 1;
4988 unsigned RC7 : 1;
4990 } __DDRCbits_t;
4992 extern __at(0x0F94) volatile __DDRCbits_t DDRCbits;
4994 #define _TRISC0 0x01
4995 #define _RC0 0x01
4996 #define _TRISC1 0x02
4997 #define _RC1 0x02
4998 #define _TRISC2 0x04
4999 #define _RC2 0x04
5000 #define _TRISC3 0x08
5001 #define _RC3 0x08
5002 #define _TRISC4 0x10
5003 #define _RC4 0x10
5004 #define _TRISC5 0x20
5005 #define _RC5 0x20
5006 #define _TRISC6 0x40
5007 #define _RC6 0x40
5008 #define _TRISC7 0x80
5009 #define _RC7 0x80
5011 //==============================================================================
5014 //==============================================================================
5015 // TRISC Bits
5017 extern __at(0x0F94) __sfr TRISC;
5019 typedef union
5021 struct
5023 unsigned TRISC0 : 1;
5024 unsigned TRISC1 : 1;
5025 unsigned TRISC2 : 1;
5026 unsigned TRISC3 : 1;
5027 unsigned TRISC4 : 1;
5028 unsigned TRISC5 : 1;
5029 unsigned TRISC6 : 1;
5030 unsigned TRISC7 : 1;
5033 struct
5035 unsigned RC0 : 1;
5036 unsigned RC1 : 1;
5037 unsigned RC2 : 1;
5038 unsigned RC3 : 1;
5039 unsigned RC4 : 1;
5040 unsigned RC5 : 1;
5041 unsigned RC6 : 1;
5042 unsigned RC7 : 1;
5044 } __TRISCbits_t;
5046 extern __at(0x0F94) volatile __TRISCbits_t TRISCbits;
5048 #define _TRISC_TRISC0 0x01
5049 #define _TRISC_RC0 0x01
5050 #define _TRISC_TRISC1 0x02
5051 #define _TRISC_RC1 0x02
5052 #define _TRISC_TRISC2 0x04
5053 #define _TRISC_RC2 0x04
5054 #define _TRISC_TRISC3 0x08
5055 #define _TRISC_RC3 0x08
5056 #define _TRISC_TRISC4 0x10
5057 #define _TRISC_RC4 0x10
5058 #define _TRISC_TRISC5 0x20
5059 #define _TRISC_RC5 0x20
5060 #define _TRISC_TRISC6 0x40
5061 #define _TRISC_RC6 0x40
5062 #define _TRISC_TRISC7 0x80
5063 #define _TRISC_RC7 0x80
5065 //==============================================================================
5068 //==============================================================================
5069 // DDRD Bits
5071 extern __at(0x0F95) __sfr DDRD;
5073 typedef union
5075 struct
5077 unsigned TRISD0 : 1;
5078 unsigned TRISD1 : 1;
5079 unsigned TRISD2 : 1;
5080 unsigned TRISD3 : 1;
5081 unsigned TRISD4 : 1;
5082 unsigned TRISD5 : 1;
5083 unsigned TRISD6 : 1;
5084 unsigned TRISD7 : 1;
5087 struct
5089 unsigned RD0 : 1;
5090 unsigned RD1 : 1;
5091 unsigned RD2 : 1;
5092 unsigned RD3 : 1;
5093 unsigned RD4 : 1;
5094 unsigned RD5 : 1;
5095 unsigned RD6 : 1;
5096 unsigned RD7 : 1;
5098 } __DDRDbits_t;
5100 extern __at(0x0F95) volatile __DDRDbits_t DDRDbits;
5102 #define _TRISD0 0x01
5103 #define _RD0 0x01
5104 #define _TRISD1 0x02
5105 #define _RD1 0x02
5106 #define _TRISD2 0x04
5107 #define _RD2 0x04
5108 #define _TRISD3 0x08
5109 #define _RD3 0x08
5110 #define _TRISD4 0x10
5111 #define _RD4 0x10
5112 #define _TRISD5 0x20
5113 #define _RD5 0x20
5114 #define _TRISD6 0x40
5115 #define _RD6 0x40
5116 #define _TRISD7 0x80
5117 #define _RD7 0x80
5119 //==============================================================================
5122 //==============================================================================
5123 // TRISD Bits
5125 extern __at(0x0F95) __sfr TRISD;
5127 typedef union
5129 struct
5131 unsigned TRISD0 : 1;
5132 unsigned TRISD1 : 1;
5133 unsigned TRISD2 : 1;
5134 unsigned TRISD3 : 1;
5135 unsigned TRISD4 : 1;
5136 unsigned TRISD5 : 1;
5137 unsigned TRISD6 : 1;
5138 unsigned TRISD7 : 1;
5141 struct
5143 unsigned RD0 : 1;
5144 unsigned RD1 : 1;
5145 unsigned RD2 : 1;
5146 unsigned RD3 : 1;
5147 unsigned RD4 : 1;
5148 unsigned RD5 : 1;
5149 unsigned RD6 : 1;
5150 unsigned RD7 : 1;
5152 } __TRISDbits_t;
5154 extern __at(0x0F95) volatile __TRISDbits_t TRISDbits;
5156 #define _TRISD_TRISD0 0x01
5157 #define _TRISD_RD0 0x01
5158 #define _TRISD_TRISD1 0x02
5159 #define _TRISD_RD1 0x02
5160 #define _TRISD_TRISD2 0x04
5161 #define _TRISD_RD2 0x04
5162 #define _TRISD_TRISD3 0x08
5163 #define _TRISD_RD3 0x08
5164 #define _TRISD_TRISD4 0x10
5165 #define _TRISD_RD4 0x10
5166 #define _TRISD_TRISD5 0x20
5167 #define _TRISD_RD5 0x20
5168 #define _TRISD_TRISD6 0x40
5169 #define _TRISD_RD6 0x40
5170 #define _TRISD_TRISD7 0x80
5171 #define _TRISD_RD7 0x80
5173 //==============================================================================
5176 //==============================================================================
5177 // DDRE Bits
5179 extern __at(0x0F96) __sfr DDRE;
5181 typedef union
5183 struct
5185 unsigned TRISE0 : 1;
5186 unsigned TRISE1 : 1;
5187 unsigned TRISE2 : 1;
5188 unsigned : 1;
5189 unsigned PSPMODE : 1;
5190 unsigned IBOV : 1;
5191 unsigned OBF : 1;
5192 unsigned IBF : 1;
5195 struct
5197 unsigned RE0 : 1;
5198 unsigned RE1 : 1;
5199 unsigned RE2 : 1;
5200 unsigned : 1;
5201 unsigned : 1;
5202 unsigned : 1;
5203 unsigned : 1;
5204 unsigned : 1;
5207 struct
5209 unsigned DDRE0 : 1;
5210 unsigned DDRE1 : 1;
5211 unsigned DDRE2 : 1;
5212 unsigned : 1;
5213 unsigned : 1;
5214 unsigned : 1;
5215 unsigned : 1;
5216 unsigned : 1;
5219 struct
5221 unsigned TRISE : 3;
5222 unsigned : 5;
5225 struct
5227 unsigned DDRE : 3;
5228 unsigned : 5;
5231 struct
5233 unsigned RE : 3;
5234 unsigned : 5;
5236 } __DDREbits_t;
5238 extern __at(0x0F96) volatile __DDREbits_t DDREbits;
5240 #define _TRISE0 0x01
5241 #define _RE0 0x01
5242 #define _DDRE0 0x01
5243 #define _TRISE1 0x02
5244 #define _RE1 0x02
5245 #define _DDRE1 0x02
5246 #define _TRISE2 0x04
5247 #define _RE2 0x04
5248 #define _DDRE2 0x04
5249 #define _PSPMODE 0x10
5250 #define _IBOV 0x20
5251 #define _OBF 0x40
5252 #define _IBF 0x80
5254 //==============================================================================
5257 //==============================================================================
5258 // TRISE Bits
5260 extern __at(0x0F96) __sfr TRISE;
5262 typedef union
5264 struct
5266 unsigned TRISE0 : 1;
5267 unsigned TRISE1 : 1;
5268 unsigned TRISE2 : 1;
5269 unsigned : 1;
5270 unsigned PSPMODE : 1;
5271 unsigned IBOV : 1;
5272 unsigned OBF : 1;
5273 unsigned IBF : 1;
5276 struct
5278 unsigned RE0 : 1;
5279 unsigned RE1 : 1;
5280 unsigned RE2 : 1;
5281 unsigned : 1;
5282 unsigned : 1;
5283 unsigned : 1;
5284 unsigned : 1;
5285 unsigned : 1;
5288 struct
5290 unsigned DDRE0 : 1;
5291 unsigned DDRE1 : 1;
5292 unsigned DDRE2 : 1;
5293 unsigned : 1;
5294 unsigned : 1;
5295 unsigned : 1;
5296 unsigned : 1;
5297 unsigned : 1;
5300 struct
5302 unsigned RE : 3;
5303 unsigned : 5;
5306 struct
5308 unsigned DDRE : 3;
5309 unsigned : 5;
5312 struct
5314 unsigned TRISE : 3;
5315 unsigned : 5;
5317 } __TRISEbits_t;
5319 extern __at(0x0F96) volatile __TRISEbits_t TRISEbits;
5321 #define _TRISE_TRISE0 0x01
5322 #define _TRISE_RE0 0x01
5323 #define _TRISE_DDRE0 0x01
5324 #define _TRISE_TRISE1 0x02
5325 #define _TRISE_RE1 0x02
5326 #define _TRISE_DDRE1 0x02
5327 #define _TRISE_TRISE2 0x04
5328 #define _TRISE_RE2 0x04
5329 #define _TRISE_DDRE2 0x04
5330 #define _TRISE_PSPMODE 0x10
5331 #define _TRISE_IBOV 0x20
5332 #define _TRISE_OBF 0x40
5333 #define _TRISE_IBF 0x80
5335 //==============================================================================
5338 //==============================================================================
5339 // PIE1 Bits
5341 extern __at(0x0F9D) __sfr PIE1;
5343 typedef struct
5345 unsigned TMR1IE : 1;
5346 unsigned TMR2IE : 1;
5347 unsigned CCP1IE : 1;
5348 unsigned SSPIE : 1;
5349 unsigned TXIE : 1;
5350 unsigned RCIE : 1;
5351 unsigned ADIE : 1;
5352 unsigned PSPIE : 1;
5353 } __PIE1bits_t;
5355 extern __at(0x0F9D) volatile __PIE1bits_t PIE1bits;
5357 #define _TMR1IE 0x01
5358 #define _TMR2IE 0x02
5359 #define _CCP1IE 0x04
5360 #define _SSPIE 0x08
5361 #define _TXIE 0x10
5362 #define _RCIE 0x20
5363 #define _ADIE 0x40
5364 #define _PSPIE 0x80
5366 //==============================================================================
5369 //==============================================================================
5370 // PIR1 Bits
5372 extern __at(0x0F9E) __sfr PIR1;
5374 typedef struct
5376 unsigned TMR1IF : 1;
5377 unsigned TMR2IF : 1;
5378 unsigned CCP1IF : 1;
5379 unsigned SSPIF : 1;
5380 unsigned TXIF : 1;
5381 unsigned RCIF : 1;
5382 unsigned ADIF : 1;
5383 unsigned PSPIF : 1;
5384 } __PIR1bits_t;
5386 extern __at(0x0F9E) volatile __PIR1bits_t PIR1bits;
5388 #define _TMR1IF 0x01
5389 #define _TMR2IF 0x02
5390 #define _CCP1IF 0x04
5391 #define _SSPIF 0x08
5392 #define _TXIF 0x10
5393 #define _RCIF 0x20
5394 #define _ADIF 0x40
5395 #define _PSPIF 0x80
5397 //==============================================================================
5400 //==============================================================================
5401 // IPR1 Bits
5403 extern __at(0x0F9F) __sfr IPR1;
5405 typedef struct
5407 unsigned TMR1IP : 1;
5408 unsigned TMR2IP : 1;
5409 unsigned CCP1IP : 1;
5410 unsigned SSPIP : 1;
5411 unsigned TXIP : 1;
5412 unsigned RCIP : 1;
5413 unsigned ADIP : 1;
5414 unsigned PSPIP : 1;
5415 } __IPR1bits_t;
5417 extern __at(0x0F9F) volatile __IPR1bits_t IPR1bits;
5419 #define _TMR1IP 0x01
5420 #define _TMR2IP 0x02
5421 #define _CCP1IP 0x04
5422 #define _SSPIP 0x08
5423 #define _TXIP 0x10
5424 #define _RCIP 0x20
5425 #define _ADIP 0x40
5426 #define _PSPIP 0x80
5428 //==============================================================================
5431 //==============================================================================
5432 // PIE2 Bits
5434 extern __at(0x0FA0) __sfr PIE2;
5436 typedef struct
5438 unsigned ECCP1IE : 1;
5439 unsigned TMR3IE : 1;
5440 unsigned LVDIE : 1;
5441 unsigned BCLIE : 1;
5442 unsigned EEIE : 1;
5443 unsigned : 1;
5444 unsigned CMIE : 1;
5445 unsigned : 1;
5446 } __PIE2bits_t;
5448 extern __at(0x0FA0) volatile __PIE2bits_t PIE2bits;
5450 #define _ECCP1IE 0x01
5451 #define _TMR3IE 0x02
5452 #define _LVDIE 0x04
5453 #define _BCLIE 0x08
5454 #define _EEIE 0x10
5455 #define _CMIE 0x40
5457 //==============================================================================
5460 //==============================================================================
5461 // PIR2 Bits
5463 extern __at(0x0FA1) __sfr PIR2;
5465 typedef struct
5467 unsigned ECCP1IF : 1;
5468 unsigned TMR3IF : 1;
5469 unsigned LVDIF : 1;
5470 unsigned BCLIF : 1;
5471 unsigned EEIF : 1;
5472 unsigned : 1;
5473 unsigned CMIF : 1;
5474 unsigned : 1;
5475 } __PIR2bits_t;
5477 extern __at(0x0FA1) volatile __PIR2bits_t PIR2bits;
5479 #define _ECCP1IF 0x01
5480 #define _TMR3IF 0x02
5481 #define _LVDIF 0x04
5482 #define _BCLIF 0x08
5483 #define _EEIF 0x10
5484 #define _CMIF 0x40
5486 //==============================================================================
5489 //==============================================================================
5490 // IPR2 Bits
5492 extern __at(0x0FA2) __sfr IPR2;
5494 typedef struct
5496 unsigned ECCP1IP : 1;
5497 unsigned TMR3IP : 1;
5498 unsigned LVDIP : 1;
5499 unsigned BCLIP : 1;
5500 unsigned EEIP : 1;
5501 unsigned : 1;
5502 unsigned CMIP : 1;
5503 unsigned : 1;
5504 } __IPR2bits_t;
5506 extern __at(0x0FA2) volatile __IPR2bits_t IPR2bits;
5508 #define _ECCP1IP 0x01
5509 #define _TMR3IP 0x02
5510 #define _LVDIP 0x04
5511 #define _BCLIP 0x08
5512 #define _EEIP 0x10
5513 #define _CMIP 0x40
5515 //==============================================================================
5518 //==============================================================================
5519 // PIE3 Bits
5521 extern __at(0x0FA3) __sfr PIE3;
5523 typedef union
5525 struct
5527 unsigned RXB0IE : 1;
5528 unsigned RXB1IE : 1;
5529 unsigned TXB0IE : 1;
5530 unsigned TXB1IE : 1;
5531 unsigned TXB2IE : 1;
5532 unsigned ERRIE : 1;
5533 unsigned WAKIE : 1;
5534 unsigned IRXIE : 1;
5537 struct
5539 unsigned RX0IE : 1;
5540 unsigned RX1IE : 1;
5541 unsigned TX0IE : 1;
5542 unsigned TX1IE : 1;
5543 unsigned TX2IE : 1;
5544 unsigned : 1;
5545 unsigned : 1;
5546 unsigned IVRE : 1;
5548 } __PIE3bits_t;
5550 extern __at(0x0FA3) volatile __PIE3bits_t PIE3bits;
5552 #define _RXB0IE 0x01
5553 #define _RX0IE 0x01
5554 #define _RXB1IE 0x02
5555 #define _RX1IE 0x02
5556 #define _TXB0IE 0x04
5557 #define _TX0IE 0x04
5558 #define _TXB1IE 0x08
5559 #define _TX1IE 0x08
5560 #define _TXB2IE 0x10
5561 #define _TX2IE 0x10
5562 #define _ERRIE 0x20
5563 #define _WAKIE 0x40
5564 #define _IRXIE 0x80
5565 #define _IVRE 0x80
5567 //==============================================================================
5570 //==============================================================================
5571 // PIR3 Bits
5573 extern __at(0x0FA4) __sfr PIR3;
5575 typedef union
5577 struct
5579 unsigned RXB0IF : 1;
5580 unsigned RXB1IF : 1;
5581 unsigned TXB0IF : 1;
5582 unsigned TXB1IF : 1;
5583 unsigned TXB2IF : 1;
5584 unsigned ERRIF : 1;
5585 unsigned WAKIF : 1;
5586 unsigned IRXIF : 1;
5589 struct
5591 unsigned RX0IF : 1;
5592 unsigned RX1IF : 1;
5593 unsigned TX0IF : 1;
5594 unsigned TX1IF : 1;
5595 unsigned TX2IF : 1;
5596 unsigned : 1;
5597 unsigned : 1;
5598 unsigned IVRF : 1;
5600 } __PIR3bits_t;
5602 extern __at(0x0FA4) volatile __PIR3bits_t PIR3bits;
5604 #define _RXB0IF 0x01
5605 #define _RX0IF 0x01
5606 #define _RXB1IF 0x02
5607 #define _RX1IF 0x02
5608 #define _TXB0IF 0x04
5609 #define _TX0IF 0x04
5610 #define _TXB1IF 0x08
5611 #define _TX1IF 0x08
5612 #define _TXB2IF 0x10
5613 #define _TX2IF 0x10
5614 #define _ERRIF 0x20
5615 #define _WAKIF 0x40
5616 #define _IRXIF 0x80
5617 #define _IVRF 0x80
5619 //==============================================================================
5622 //==============================================================================
5623 // IPR3 Bits
5625 extern __at(0x0FA5) __sfr IPR3;
5627 typedef union
5629 struct
5631 unsigned RXB0IP : 1;
5632 unsigned RXB1IP : 1;
5633 unsigned TXB0IP : 1;
5634 unsigned TXB1IP : 1;
5635 unsigned TXB2IP : 1;
5636 unsigned ERRIP : 1;
5637 unsigned WAKIP : 1;
5638 unsigned IRXIP : 1;
5641 struct
5643 unsigned : 1;
5644 unsigned : 1;
5645 unsigned : 1;
5646 unsigned : 1;
5647 unsigned : 1;
5648 unsigned : 1;
5649 unsigned : 1;
5650 unsigned IVRP : 1;
5652 } __IPR3bits_t;
5654 extern __at(0x0FA5) volatile __IPR3bits_t IPR3bits;
5656 #define _RXB0IP 0x01
5657 #define _RXB1IP 0x02
5658 #define _TXB0IP 0x04
5659 #define _TXB1IP 0x08
5660 #define _TXB2IP 0x10
5661 #define _ERRIP 0x20
5662 #define _WAKIP 0x40
5663 #define _IRXIP 0x80
5664 #define _IVRP 0x80
5666 //==============================================================================
5669 //==============================================================================
5670 // EECON1 Bits
5672 extern __at(0x0FA6) __sfr EECON1;
5674 typedef union
5676 struct
5678 unsigned RD : 1;
5679 unsigned WR : 1;
5680 unsigned WREN : 1;
5681 unsigned WRERR : 1;
5682 unsigned FREE : 1;
5683 unsigned : 1;
5684 unsigned CFGS : 1;
5685 unsigned EEPGD : 1;
5688 struct
5690 unsigned : 1;
5691 unsigned : 1;
5692 unsigned : 1;
5693 unsigned : 1;
5694 unsigned : 1;
5695 unsigned : 1;
5696 unsigned EEFS : 1;
5697 unsigned : 1;
5699 } __EECON1bits_t;
5701 extern __at(0x0FA6) volatile __EECON1bits_t EECON1bits;
5703 #define _RD 0x01
5704 #define _WR 0x02
5705 #define _WREN 0x04
5706 #define _WRERR 0x08
5707 #define _FREE 0x10
5708 #define _CFGS 0x40
5709 #define _EEFS 0x40
5710 #define _EEPGD 0x80
5712 //==============================================================================
5714 extern __at(0x0FA7) __sfr EECON2;
5715 extern __at(0x0FA8) __sfr EEDATA;
5716 extern __at(0x0FA9) __sfr EEADR;
5718 //==============================================================================
5719 // RCSTA Bits
5721 extern __at(0x0FAB) __sfr RCSTA;
5723 typedef union
5725 struct
5727 unsigned RX9D : 1;
5728 unsigned OERR : 1;
5729 unsigned FERR : 1;
5730 unsigned ADDEN : 1;
5731 unsigned CREN : 1;
5732 unsigned SREN : 1;
5733 unsigned RX9 : 1;
5734 unsigned SPEN : 1;
5737 struct
5739 unsigned RCD8 : 1;
5740 unsigned : 1;
5741 unsigned : 1;
5742 unsigned : 1;
5743 unsigned : 1;
5744 unsigned : 1;
5745 unsigned RC9 : 1;
5746 unsigned : 1;
5749 struct
5751 unsigned : 1;
5752 unsigned : 1;
5753 unsigned : 1;
5754 unsigned : 1;
5755 unsigned : 1;
5756 unsigned : 1;
5757 unsigned RC8_9 : 1;
5758 unsigned : 1;
5761 struct
5763 unsigned : 1;
5764 unsigned : 1;
5765 unsigned : 1;
5766 unsigned : 1;
5767 unsigned : 1;
5768 unsigned : 1;
5769 unsigned NOT_RC8 : 1;
5770 unsigned : 1;
5772 } __RCSTAbits_t;
5774 extern __at(0x0FAB) volatile __RCSTAbits_t RCSTAbits;
5776 #define _RX9D 0x01
5777 #define _RCD8 0x01
5778 #define _OERR 0x02
5779 #define _FERR 0x04
5780 #define _ADDEN 0x08
5781 #define _CREN 0x10
5782 #define _SREN 0x20
5783 #define _RX9 0x40
5784 #define _RC9 0x40
5785 #define _RC8_9 0x40
5786 #define _NOT_RC8 0x40
5787 #define _SPEN 0x80
5789 //==============================================================================
5792 //==============================================================================
5793 // TXSTA Bits
5795 extern __at(0x0FAC) __sfr TXSTA;
5797 typedef union
5799 struct
5801 unsigned TX9D : 1;
5802 unsigned TRMT : 1;
5803 unsigned BRGH : 1;
5804 unsigned : 1;
5805 unsigned SYNC : 1;
5806 unsigned TXEN : 1;
5807 unsigned TX9 : 1;
5808 unsigned CSRC : 1;
5811 struct
5813 unsigned TXD8 : 1;
5814 unsigned : 1;
5815 unsigned : 1;
5816 unsigned : 1;
5817 unsigned : 1;
5818 unsigned : 1;
5819 unsigned TX8_9 : 1;
5820 unsigned : 1;
5823 struct
5825 unsigned : 1;
5826 unsigned : 1;
5827 unsigned : 1;
5828 unsigned : 1;
5829 unsigned : 1;
5830 unsigned : 1;
5831 unsigned NOT_TX8 : 1;
5832 unsigned : 1;
5834 } __TXSTAbits_t;
5836 extern __at(0x0FAC) volatile __TXSTAbits_t TXSTAbits;
5838 #define _TX9D 0x01
5839 #define _TXD8 0x01
5840 #define _TRMT 0x02
5841 #define _BRGH 0x04
5842 #define _SYNC 0x10
5843 #define _TXEN 0x20
5844 #define _TX9 0x40
5845 #define _TX8_9 0x40
5846 #define _NOT_TX8 0x40
5847 #define _CSRC 0x80
5849 //==============================================================================
5851 extern __at(0x0FAD) __sfr TXREG;
5852 extern __at(0x0FAE) __sfr RCREG;
5853 extern __at(0x0FAF) __sfr SPBRG;
5855 //==============================================================================
5856 // T3CON Bits
5858 extern __at(0x0FB1) __sfr T3CON;
5860 typedef union
5862 struct
5864 unsigned TMR3ON : 1;
5865 unsigned TMR3CS : 1;
5866 unsigned NOT_T3SYNC : 1;
5867 unsigned T3CCP1 : 1;
5868 unsigned T3CKPS0 : 1;
5869 unsigned T3CKPS1 : 1;
5870 unsigned T3ECCP1 : 1;
5871 unsigned RD16 : 1;
5874 struct
5876 unsigned : 1;
5877 unsigned : 1;
5878 unsigned T3INSYNC : 1;
5879 unsigned : 1;
5880 unsigned : 1;
5881 unsigned : 1;
5882 unsigned : 1;
5883 unsigned : 1;
5886 struct
5888 unsigned : 1;
5889 unsigned : 1;
5890 unsigned T3SYNC : 1;
5891 unsigned : 1;
5892 unsigned : 1;
5893 unsigned : 1;
5894 unsigned : 1;
5895 unsigned : 1;
5898 struct
5900 unsigned : 4;
5901 unsigned T3CKPS : 2;
5902 unsigned : 2;
5904 } __T3CONbits_t;
5906 extern __at(0x0FB1) volatile __T3CONbits_t T3CONbits;
5908 #define _T3CON_TMR3ON 0x01
5909 #define _T3CON_TMR3CS 0x02
5910 #define _T3CON_NOT_T3SYNC 0x04
5911 #define _T3CON_T3INSYNC 0x04
5912 #define _T3CON_T3SYNC 0x04
5913 #define _T3CON_T3CCP1 0x08
5914 #define _T3CON_T3CKPS0 0x10
5915 #define _T3CON_T3CKPS1 0x20
5916 #define _T3CON_T3ECCP1 0x40
5917 #define _T3CON_RD16 0x80
5919 //==============================================================================
5921 extern __at(0x0FB2) __sfr TMR3;
5922 extern __at(0x0FB2) __sfr TMR3L;
5923 extern __at(0x0FB3) __sfr TMR3H;
5925 //==============================================================================
5926 // CMCON Bits
5928 extern __at(0x0FB4) __sfr CMCON;
5930 typedef union
5932 struct
5934 unsigned CM0 : 1;
5935 unsigned CM1 : 1;
5936 unsigned CM2 : 1;
5937 unsigned CIS : 1;
5938 unsigned C1INV : 1;
5939 unsigned C2INV : 1;
5940 unsigned C1OUT : 1;
5941 unsigned C2OUT : 1;
5944 struct
5946 unsigned CM : 3;
5947 unsigned : 5;
5949 } __CMCONbits_t;
5951 extern __at(0x0FB4) volatile __CMCONbits_t CMCONbits;
5953 #define _CM0 0x01
5954 #define _CM1 0x02
5955 #define _CM2 0x04
5956 #define _CIS 0x08
5957 #define _C1INV 0x10
5958 #define _C2INV 0x20
5959 #define _C1OUT 0x40
5960 #define _C2OUT 0x80
5962 //==============================================================================
5965 //==============================================================================
5966 // CVRCON Bits
5968 extern __at(0x0FB5) __sfr CVRCON;
5970 typedef union
5972 struct
5974 unsigned CVR0 : 1;
5975 unsigned CVR1 : 1;
5976 unsigned CVR2 : 1;
5977 unsigned CVR3 : 1;
5978 unsigned CVRSS : 1;
5979 unsigned CVRR : 1;
5980 unsigned CVROE : 1;
5981 unsigned CVREN : 1;
5984 struct
5986 unsigned CVR : 4;
5987 unsigned : 4;
5989 } __CVRCONbits_t;
5991 extern __at(0x0FB5) volatile __CVRCONbits_t CVRCONbits;
5993 #define _CVR0 0x01
5994 #define _CVR1 0x02
5995 #define _CVR2 0x04
5996 #define _CVR3 0x08
5997 #define _CVRSS 0x10
5998 #define _CVRR 0x20
5999 #define _CVROE 0x40
6000 #define _CVREN 0x80
6002 //==============================================================================
6005 //==============================================================================
6006 // ECCPAS Bits
6008 extern __at(0x0FB6) __sfr ECCPAS;
6010 typedef union
6012 struct
6014 unsigned PSSBD0 : 1;
6015 unsigned PSSBD1 : 1;
6016 unsigned PSSAC0 : 1;
6017 unsigned PSSAC1 : 1;
6018 unsigned ECCPAS0 : 1;
6019 unsigned ECCPAS1 : 1;
6020 unsigned ECCPAS2 : 1;
6021 unsigned ECCPASE : 1;
6024 struct
6026 unsigned PSSBD : 2;
6027 unsigned : 6;
6030 struct
6032 unsigned : 2;
6033 unsigned PSSAC : 2;
6034 unsigned : 4;
6037 struct
6039 unsigned : 4;
6040 unsigned ECCPAS : 3;
6041 unsigned : 1;
6043 } __ECCPASbits_t;
6045 extern __at(0x0FB6) volatile __ECCPASbits_t ECCPASbits;
6047 #define _PSSBD0 0x01
6048 #define _PSSBD1 0x02
6049 #define _PSSAC0 0x04
6050 #define _PSSAC1 0x08
6051 #define _ECCPAS0 0x10
6052 #define _ECCPAS1 0x20
6053 #define _ECCPAS2 0x40
6054 #define _ECCPASE 0x80
6056 //==============================================================================
6059 //==============================================================================
6060 // ECCP1DEL Bits
6062 extern __at(0x0FB7) __sfr ECCP1DEL;
6064 typedef struct
6066 unsigned EPDC0 : 1;
6067 unsigned EPDC1 : 1;
6068 unsigned EPDC2 : 1;
6069 unsigned EPDC3 : 1;
6070 unsigned EPDC4 : 1;
6071 unsigned EPDC5 : 1;
6072 unsigned EPDC6 : 1;
6073 unsigned EPDC7 : 1;
6074 } __ECCP1DELbits_t;
6076 extern __at(0x0FB7) volatile __ECCP1DELbits_t ECCP1DELbits;
6078 #define _EPDC0 0x01
6079 #define _EPDC1 0x02
6080 #define _EPDC2 0x04
6081 #define _EPDC3 0x08
6082 #define _EPDC4 0x10
6083 #define _EPDC5 0x20
6084 #define _EPDC6 0x40
6085 #define _EPDC7 0x80
6087 //==============================================================================
6090 //==============================================================================
6091 // ECCP1CON Bits
6093 extern __at(0x0FBA) __sfr ECCP1CON;
6095 typedef union
6097 struct
6099 unsigned ECCP1M0 : 1;
6100 unsigned ECCP1M1 : 1;
6101 unsigned ECCP1M2 : 1;
6102 unsigned ECCP1M3 : 1;
6103 unsigned EDC1B0 : 1;
6104 unsigned EDC1B1 : 1;
6105 unsigned EPWM1M0 : 1;
6106 unsigned EPWM1M1 : 1;
6109 struct
6111 unsigned : 1;
6112 unsigned : 1;
6113 unsigned : 1;
6114 unsigned : 1;
6115 unsigned EDC2B0 : 1;
6116 unsigned EDC2B1 : 1;
6117 unsigned : 1;
6118 unsigned : 1;
6121 struct
6123 unsigned ECCP1M : 4;
6124 unsigned : 4;
6127 struct
6129 unsigned : 4;
6130 unsigned EDC2B : 2;
6131 unsigned : 2;
6134 struct
6136 unsigned : 4;
6137 unsigned EDC1B : 2;
6138 unsigned : 2;
6141 struct
6143 unsigned : 6;
6144 unsigned EPWM1M : 2;
6146 } __ECCP1CONbits_t;
6148 extern __at(0x0FBA) volatile __ECCP1CONbits_t ECCP1CONbits;
6150 #define _ECCP1M0 0x01
6151 #define _ECCP1M1 0x02
6152 #define _ECCP1M2 0x04
6153 #define _ECCP1M3 0x08
6154 #define _EDC1B0 0x10
6155 #define _EDC2B0 0x10
6156 #define _EDC1B1 0x20
6157 #define _EDC2B1 0x20
6158 #define _EPWM1M0 0x40
6159 #define _EPWM1M1 0x80
6161 //==============================================================================
6163 extern __at(0x0FBB) __sfr ECCPR1;
6164 extern __at(0x0FBB) __sfr ECCPR1L;
6165 extern __at(0x0FBC) __sfr ECCPR1H;
6167 //==============================================================================
6168 // CCP1CON Bits
6170 extern __at(0x0FBD) __sfr CCP1CON;
6172 typedef union
6174 struct
6176 unsigned CCP1M0 : 1;
6177 unsigned CCP1M1 : 1;
6178 unsigned CCP1M2 : 1;
6179 unsigned CCP1M3 : 1;
6180 unsigned DC1B0 : 1;
6181 unsigned DC1B1 : 1;
6182 unsigned : 1;
6183 unsigned : 1;
6186 struct
6188 unsigned : 1;
6189 unsigned : 1;
6190 unsigned : 1;
6191 unsigned : 1;
6192 unsigned CCP1Y : 1;
6193 unsigned CCP1X : 1;
6194 unsigned : 1;
6195 unsigned : 1;
6198 struct
6200 unsigned CCP1M : 4;
6201 unsigned : 4;
6204 struct
6206 unsigned : 4;
6207 unsigned DC1B : 2;
6208 unsigned : 2;
6210 } __CCP1CONbits_t;
6212 extern __at(0x0FBD) volatile __CCP1CONbits_t CCP1CONbits;
6214 #define _CCP1M0 0x01
6215 #define _CCP1M1 0x02
6216 #define _CCP1M2 0x04
6217 #define _CCP1M3 0x08
6218 #define _DC1B0 0x10
6219 #define _CCP1Y 0x10
6220 #define _DC1B1 0x20
6221 #define _CCP1X 0x20
6223 //==============================================================================
6225 extern __at(0x0FBE) __sfr CCPR1;
6226 extern __at(0x0FBE) __sfr CCPR1L;
6227 extern __at(0x0FBF) __sfr CCPR1H;
6229 //==============================================================================
6230 // ADCON1 Bits
6232 extern __at(0x0FC1) __sfr ADCON1;
6234 typedef union
6236 struct
6238 unsigned PCFG0 : 1;
6239 unsigned PCFG1 : 1;
6240 unsigned PCFG2 : 1;
6241 unsigned PCFG3 : 1;
6242 unsigned : 1;
6243 unsigned : 1;
6244 unsigned ADCS2 : 1;
6245 unsigned ADFM : 1;
6248 struct
6250 unsigned PCFG : 4;
6251 unsigned : 4;
6253 } __ADCON1bits_t;
6255 extern __at(0x0FC1) volatile __ADCON1bits_t ADCON1bits;
6257 #define _PCFG0 0x01
6258 #define _PCFG1 0x02
6259 #define _PCFG2 0x04
6260 #define _PCFG3 0x08
6261 #define _ADCS2 0x40
6262 #define _ADFM 0x80
6264 //==============================================================================
6267 //==============================================================================
6268 // ADCON0 Bits
6270 extern __at(0x0FC2) __sfr ADCON0;
6272 typedef union
6274 struct
6276 unsigned ADON : 1;
6277 unsigned : 1;
6278 unsigned GO_NOT_DONE : 1;
6279 unsigned CHS0 : 1;
6280 unsigned CHS1 : 1;
6281 unsigned CHS2 : 1;
6282 unsigned ADCS0 : 1;
6283 unsigned ADCS1 : 1;
6286 struct
6288 unsigned : 1;
6289 unsigned : 1;
6290 unsigned DONE : 1;
6291 unsigned : 1;
6292 unsigned : 1;
6293 unsigned : 1;
6294 unsigned : 1;
6295 unsigned : 1;
6298 struct
6300 unsigned : 1;
6301 unsigned : 1;
6302 unsigned GO_DONE : 1;
6303 unsigned : 1;
6304 unsigned : 1;
6305 unsigned : 1;
6306 unsigned : 1;
6307 unsigned : 1;
6310 struct
6312 unsigned : 1;
6313 unsigned : 1;
6314 unsigned GO : 1;
6315 unsigned : 1;
6316 unsigned : 1;
6317 unsigned : 1;
6318 unsigned : 1;
6319 unsigned : 1;
6322 struct
6324 unsigned : 1;
6325 unsigned : 1;
6326 unsigned NOT_DONE : 1;
6327 unsigned : 1;
6328 unsigned : 1;
6329 unsigned : 1;
6330 unsigned : 1;
6331 unsigned : 1;
6334 struct
6336 unsigned : 3;
6337 unsigned CHS : 3;
6338 unsigned : 2;
6341 struct
6343 unsigned : 6;
6344 unsigned ADCS : 2;
6346 } __ADCON0bits_t;
6348 extern __at(0x0FC2) volatile __ADCON0bits_t ADCON0bits;
6350 #define _ADON 0x01
6351 #define _GO_NOT_DONE 0x04
6352 #define _DONE 0x04
6353 #define _GO_DONE 0x04
6354 #define _GO 0x04
6355 #define _NOT_DONE 0x04
6356 #define _CHS0 0x08
6357 #define _CHS1 0x10
6358 #define _CHS2 0x20
6359 #define _ADCS0 0x40
6360 #define _ADCS1 0x80
6362 //==============================================================================
6364 extern __at(0x0FC3) __sfr ADRES;
6365 extern __at(0x0FC3) __sfr ADRESL;
6366 extern __at(0x0FC4) __sfr ADRESH;
6368 //==============================================================================
6369 // SSPCON2 Bits
6371 extern __at(0x0FC5) __sfr SSPCON2;
6373 typedef struct
6375 unsigned SEN : 1;
6376 unsigned RSEN : 1;
6377 unsigned PEN : 1;
6378 unsigned RCEN : 1;
6379 unsigned ACKEN : 1;
6380 unsigned ACKDT : 1;
6381 unsigned ACKSTAT : 1;
6382 unsigned GCEN : 1;
6383 } __SSPCON2bits_t;
6385 extern __at(0x0FC5) volatile __SSPCON2bits_t SSPCON2bits;
6387 #define _SEN 0x01
6388 #define _RSEN 0x02
6389 #define _PEN 0x04
6390 #define _RCEN 0x08
6391 #define _ACKEN 0x10
6392 #define _ACKDT 0x20
6393 #define _ACKSTAT 0x40
6394 #define _GCEN 0x80
6396 //==============================================================================
6399 //==============================================================================
6400 // SSPCON1 Bits
6402 extern __at(0x0FC6) __sfr SSPCON1;
6404 typedef union
6406 struct
6408 unsigned SSPM0 : 1;
6409 unsigned SSPM1 : 1;
6410 unsigned SSPM2 : 1;
6411 unsigned SSPM3 : 1;
6412 unsigned CKP : 1;
6413 unsigned SSPEN : 1;
6414 unsigned SSPOV : 1;
6415 unsigned WCOL : 1;
6418 struct
6420 unsigned SSPM : 4;
6421 unsigned : 4;
6423 } __SSPCON1bits_t;
6425 extern __at(0x0FC6) volatile __SSPCON1bits_t SSPCON1bits;
6427 #define _SSPM0 0x01
6428 #define _SSPM1 0x02
6429 #define _SSPM2 0x04
6430 #define _SSPM3 0x08
6431 #define _CKP 0x10
6432 #define _SSPEN 0x20
6433 #define _SSPOV 0x40
6434 #define _WCOL 0x80
6436 //==============================================================================
6439 //==============================================================================
6440 // SSPSTAT Bits
6442 extern __at(0x0FC7) __sfr SSPSTAT;
6444 typedef union
6446 struct
6448 unsigned BF : 1;
6449 unsigned UA : 1;
6450 unsigned R_NOT_W : 1;
6451 unsigned S : 1;
6452 unsigned P : 1;
6453 unsigned D_NOT_A : 1;
6454 unsigned CKE : 1;
6455 unsigned SMP : 1;
6458 struct
6460 unsigned : 1;
6461 unsigned : 1;
6462 unsigned I2C_READ : 1;
6463 unsigned I2C_START : 1;
6464 unsigned I2C_STOP : 1;
6465 unsigned I2C_DATA : 1;
6466 unsigned : 1;
6467 unsigned : 1;
6470 struct
6472 unsigned : 1;
6473 unsigned : 1;
6474 unsigned R : 1;
6475 unsigned : 1;
6476 unsigned : 1;
6477 unsigned D : 1;
6478 unsigned : 1;
6479 unsigned : 1;
6482 struct
6484 unsigned : 1;
6485 unsigned : 1;
6486 unsigned READ_WRITE : 1;
6487 unsigned : 1;
6488 unsigned : 1;
6489 unsigned DATA_ADDRESS : 1;
6490 unsigned : 1;
6491 unsigned : 1;
6494 struct
6496 unsigned : 1;
6497 unsigned : 1;
6498 unsigned NOT_WRITE : 1;
6499 unsigned : 1;
6500 unsigned : 1;
6501 unsigned NOT_ADDRESS : 1;
6502 unsigned : 1;
6503 unsigned : 1;
6506 struct
6508 unsigned : 1;
6509 unsigned : 1;
6510 unsigned NOT_W : 1;
6511 unsigned : 1;
6512 unsigned : 1;
6513 unsigned NOT_A : 1;
6514 unsigned : 1;
6515 unsigned : 1;
6518 struct
6520 unsigned : 1;
6521 unsigned : 1;
6522 unsigned R_W : 1;
6523 unsigned : 1;
6524 unsigned : 1;
6525 unsigned D_A : 1;
6526 unsigned : 1;
6527 unsigned : 1;
6530 struct
6532 unsigned : 1;
6533 unsigned : 1;
6534 unsigned : 1;
6535 unsigned : 1;
6536 unsigned : 1;
6537 unsigned I2C_DAT : 1;
6538 unsigned : 1;
6539 unsigned : 1;
6541 } __SSPSTATbits_t;
6543 extern __at(0x0FC7) volatile __SSPSTATbits_t SSPSTATbits;
6545 #define _BF 0x01
6546 #define _UA 0x02
6547 #define _R_NOT_W 0x04
6548 #define _I2C_READ 0x04
6549 #define _R 0x04
6550 #define _READ_WRITE 0x04
6551 #define _NOT_WRITE 0x04
6552 #define _NOT_W 0x04
6553 #define _R_W 0x04
6554 #define _S 0x08
6555 #define _I2C_START 0x08
6556 #define _P 0x10
6557 #define _I2C_STOP 0x10
6558 #define _D_NOT_A 0x20
6559 #define _I2C_DATA 0x20
6560 #define _D 0x20
6561 #define _DATA_ADDRESS 0x20
6562 #define _NOT_ADDRESS 0x20
6563 #define _NOT_A 0x20
6564 #define _D_A 0x20
6565 #define _I2C_DAT 0x20
6566 #define _CKE 0x40
6567 #define _SMP 0x80
6569 //==============================================================================
6571 extern __at(0x0FC8) __sfr SSPADD;
6572 extern __at(0x0FC9) __sfr SSPBUF;
6574 //==============================================================================
6575 // T2CON Bits
6577 extern __at(0x0FCA) __sfr T2CON;
6579 typedef union
6581 struct
6583 unsigned T2CKPS0 : 1;
6584 unsigned T2CKPS1 : 1;
6585 unsigned TMR2ON : 1;
6586 unsigned TOUTPS0 : 1;
6587 unsigned TOUTPS1 : 1;
6588 unsigned TOUTPS2 : 1;
6589 unsigned TOUTPS3 : 1;
6590 unsigned : 1;
6593 struct
6595 unsigned T2CKPS : 2;
6596 unsigned : 6;
6599 struct
6601 unsigned : 3;
6602 unsigned TOUTPS : 4;
6603 unsigned : 1;
6605 } __T2CONbits_t;
6607 extern __at(0x0FCA) volatile __T2CONbits_t T2CONbits;
6609 #define _T2CKPS0 0x01
6610 #define _T2CKPS1 0x02
6611 #define _TMR2ON 0x04
6612 #define _TOUTPS0 0x08
6613 #define _TOUTPS1 0x10
6614 #define _TOUTPS2 0x20
6615 #define _TOUTPS3 0x40
6617 //==============================================================================
6619 extern __at(0x0FCB) __sfr PR2;
6620 extern __at(0x0FCC) __sfr TMR2;
6622 //==============================================================================
6623 // T1CON Bits
6625 extern __at(0x0FCD) __sfr T1CON;
6627 typedef union
6629 struct
6631 unsigned TMR1ON : 1;
6632 unsigned TMR1CS : 1;
6633 unsigned NOT_T1SYNC : 1;
6634 unsigned T1OSCEN : 1;
6635 unsigned T1CKPS0 : 1;
6636 unsigned T1CKPS1 : 1;
6637 unsigned : 1;
6638 unsigned RD16 : 1;
6641 struct
6643 unsigned : 1;
6644 unsigned : 1;
6645 unsigned T1INSYNC : 1;
6646 unsigned : 1;
6647 unsigned : 1;
6648 unsigned : 1;
6649 unsigned : 1;
6650 unsigned : 1;
6653 struct
6655 unsigned : 1;
6656 unsigned : 1;
6657 unsigned T1SYNC : 1;
6658 unsigned : 1;
6659 unsigned : 1;
6660 unsigned : 1;
6661 unsigned : 1;
6662 unsigned : 1;
6665 struct
6667 unsigned : 4;
6668 unsigned T1CKPS : 2;
6669 unsigned : 2;
6671 } __T1CONbits_t;
6673 extern __at(0x0FCD) volatile __T1CONbits_t T1CONbits;
6675 #define _TMR1ON 0x01
6676 #define _TMR1CS 0x02
6677 #define _NOT_T1SYNC 0x04
6678 #define _T1INSYNC 0x04
6679 #define _T1SYNC 0x04
6680 #define _T1OSCEN 0x08
6681 #define _T1CKPS0 0x10
6682 #define _T1CKPS1 0x20
6683 #define _RD16 0x80
6685 //==============================================================================
6687 extern __at(0x0FCE) __sfr TMR1;
6688 extern __at(0x0FCE) __sfr TMR1L;
6689 extern __at(0x0FCF) __sfr TMR1H;
6691 //==============================================================================
6692 // RCON Bits
6694 extern __at(0x0FD0) __sfr RCON;
6696 typedef union
6698 struct
6700 unsigned NOT_BOR : 1;
6701 unsigned NOT_POR : 1;
6702 unsigned NOT_PD : 1;
6703 unsigned NOT_TO : 1;
6704 unsigned NOT_RI : 1;
6705 unsigned : 1;
6706 unsigned : 1;
6707 unsigned IPEN : 1;
6710 struct
6712 unsigned BOR : 1;
6713 unsigned POR : 1;
6714 unsigned PD : 1;
6715 unsigned TO : 1;
6716 unsigned RI : 1;
6717 unsigned : 1;
6718 unsigned : 1;
6719 unsigned NOT_IPEN : 1;
6721 } __RCONbits_t;
6723 extern __at(0x0FD0) volatile __RCONbits_t RCONbits;
6725 #define _NOT_BOR 0x01
6726 #define _BOR 0x01
6727 #define _NOT_POR 0x02
6728 #define _POR 0x02
6729 #define _NOT_PD 0x04
6730 #define _PD 0x04
6731 #define _NOT_TO 0x08
6732 #define _TO 0x08
6733 #define _NOT_RI 0x10
6734 #define _RI 0x10
6735 #define _IPEN 0x80
6736 #define _NOT_IPEN 0x80
6738 //==============================================================================
6741 //==============================================================================
6742 // WDTCON Bits
6744 extern __at(0x0FD1) __sfr WDTCON;
6746 typedef union
6748 struct
6750 unsigned SWDTEN : 1;
6751 unsigned : 1;
6752 unsigned : 1;
6753 unsigned : 1;
6754 unsigned : 1;
6755 unsigned : 1;
6756 unsigned : 1;
6757 unsigned : 1;
6760 struct
6762 unsigned SWDTE : 1;
6763 unsigned : 1;
6764 unsigned : 1;
6765 unsigned : 1;
6766 unsigned : 1;
6767 unsigned : 1;
6768 unsigned : 1;
6769 unsigned : 1;
6771 } __WDTCONbits_t;
6773 extern __at(0x0FD1) volatile __WDTCONbits_t WDTCONbits;
6775 #define _SWDTEN 0x01
6776 #define _SWDTE 0x01
6778 //==============================================================================
6781 //==============================================================================
6782 // LVDCON Bits
6784 extern __at(0x0FD2) __sfr LVDCON;
6786 typedef union
6788 struct
6790 unsigned LVDL0 : 1;
6791 unsigned LVDL1 : 1;
6792 unsigned LVDL2 : 1;
6793 unsigned LVDL3 : 1;
6794 unsigned LVDEN : 1;
6795 unsigned IRVST : 1;
6796 unsigned : 1;
6797 unsigned : 1;
6800 struct
6802 unsigned : 1;
6803 unsigned : 1;
6804 unsigned : 1;
6805 unsigned : 1;
6806 unsigned : 1;
6807 unsigned IVRST : 1;
6808 unsigned : 1;
6809 unsigned : 1;
6812 struct
6814 unsigned LVDL : 4;
6815 unsigned : 4;
6817 } __LVDCONbits_t;
6819 extern __at(0x0FD2) volatile __LVDCONbits_t LVDCONbits;
6821 #define _LVDL0 0x01
6822 #define _LVDL1 0x02
6823 #define _LVDL2 0x04
6824 #define _LVDL3 0x08
6825 #define _LVDEN 0x10
6826 #define _IRVST 0x20
6827 #define _IVRST 0x20
6829 //==============================================================================
6832 //==============================================================================
6833 // OSCCON Bits
6835 extern __at(0x0FD3) __sfr OSCCON;
6837 typedef struct
6839 unsigned SCS : 1;
6840 unsigned : 1;
6841 unsigned : 1;
6842 unsigned : 1;
6843 unsigned : 1;
6844 unsigned : 1;
6845 unsigned : 1;
6846 unsigned : 1;
6847 } __OSCCONbits_t;
6849 extern __at(0x0FD3) volatile __OSCCONbits_t OSCCONbits;
6851 #define _SCS 0x01
6853 //==============================================================================
6856 //==============================================================================
6857 // T0CON Bits
6859 extern __at(0x0FD5) __sfr T0CON;
6861 typedef union
6863 struct
6865 unsigned T0PS0 : 1;
6866 unsigned T0PS1 : 1;
6867 unsigned T0PS2 : 1;
6868 unsigned PSA : 1;
6869 unsigned T0SE : 1;
6870 unsigned T0CS : 1;
6871 unsigned T08BIT : 1;
6872 unsigned TMR0ON : 1;
6875 struct
6877 unsigned T0PS : 3;
6878 unsigned : 5;
6880 } __T0CONbits_t;
6882 extern __at(0x0FD5) volatile __T0CONbits_t T0CONbits;
6884 #define _T0PS0 0x01
6885 #define _T0PS1 0x02
6886 #define _T0PS2 0x04
6887 #define _PSA 0x08
6888 #define _T0SE 0x10
6889 #define _T0CS 0x20
6890 #define _T08BIT 0x40
6891 #define _TMR0ON 0x80
6893 //==============================================================================
6895 extern __at(0x0FD6) __sfr TMR0;
6896 extern __at(0x0FD6) __sfr TMR0L;
6897 extern __at(0x0FD7) __sfr TMR0H;
6899 //==============================================================================
6900 // STATUS Bits
6902 extern __at(0x0FD8) __sfr STATUS;
6904 typedef struct
6906 unsigned C : 1;
6907 unsigned DC : 1;
6908 unsigned Z : 1;
6909 unsigned OV : 1;
6910 unsigned N : 1;
6911 unsigned : 1;
6912 unsigned : 1;
6913 unsigned : 1;
6914 } __STATUSbits_t;
6916 extern __at(0x0FD8) volatile __STATUSbits_t STATUSbits;
6918 #define _C 0x01
6919 #define _DC 0x02
6920 #define _Z 0x04
6921 #define _OV 0x08
6922 #define _N 0x10
6924 //==============================================================================
6926 extern __at(0x0FD9) __sfr FSR2L;
6927 extern __at(0x0FDA) __sfr FSR2H;
6928 extern __at(0x0FDB) __sfr PLUSW2;
6929 extern __at(0x0FDC) __sfr PREINC2;
6930 extern __at(0x0FDD) __sfr POSTDEC2;
6931 extern __at(0x0FDE) __sfr POSTINC2;
6932 extern __at(0x0FDF) __sfr INDF2;
6933 extern __at(0x0FE0) __sfr BSR;
6934 extern __at(0x0FE1) __sfr FSR1L;
6935 extern __at(0x0FE2) __sfr FSR1H;
6936 extern __at(0x0FE3) __sfr PLUSW1;
6937 extern __at(0x0FE4) __sfr PREINC1;
6938 extern __at(0x0FE5) __sfr POSTDEC1;
6939 extern __at(0x0FE6) __sfr POSTINC1;
6940 extern __at(0x0FE7) __sfr INDF1;
6941 extern __at(0x0FE8) __sfr WREG;
6942 extern __at(0x0FE9) __sfr FSR0L;
6943 extern __at(0x0FEA) __sfr FSR0H;
6944 extern __at(0x0FEB) __sfr PLUSW0;
6945 extern __at(0x0FEC) __sfr PREINC0;
6946 extern __at(0x0FED) __sfr POSTDEC0;
6947 extern __at(0x0FEE) __sfr POSTINC0;
6948 extern __at(0x0FEF) __sfr INDF0;
6950 //==============================================================================
6951 // INTCON3 Bits
6953 extern __at(0x0FF0) __sfr INTCON3;
6955 typedef union
6957 struct
6959 unsigned INT1IF : 1;
6960 unsigned INT2IF : 1;
6961 unsigned : 1;
6962 unsigned INT1IE : 1;
6963 unsigned INT2IE : 1;
6964 unsigned : 1;
6965 unsigned INT1IP : 1;
6966 unsigned INT2IP : 1;
6969 struct
6971 unsigned INT1F : 1;
6972 unsigned INT2F : 1;
6973 unsigned : 1;
6974 unsigned INT1E : 1;
6975 unsigned INT2E : 1;
6976 unsigned : 1;
6977 unsigned INT1P : 1;
6978 unsigned INT2P : 1;
6980 } __INTCON3bits_t;
6982 extern __at(0x0FF0) volatile __INTCON3bits_t INTCON3bits;
6984 #define _INT1IF 0x01
6985 #define _INT1F 0x01
6986 #define _INT2IF 0x02
6987 #define _INT2F 0x02
6988 #define _INT1IE 0x08
6989 #define _INT1E 0x08
6990 #define _INT2IE 0x10
6991 #define _INT2E 0x10
6992 #define _INT1IP 0x40
6993 #define _INT1P 0x40
6994 #define _INT2IP 0x80
6995 #define _INT2P 0x80
6997 //==============================================================================
7000 //==============================================================================
7001 // INTCON2 Bits
7003 extern __at(0x0FF1) __sfr INTCON2;
7005 typedef union
7007 struct
7009 unsigned RBIP : 1;
7010 unsigned : 1;
7011 unsigned TMR0IP : 1;
7012 unsigned : 1;
7013 unsigned INTEDG2 : 1;
7014 unsigned INTEDG1 : 1;
7015 unsigned INTEDG0 : 1;
7016 unsigned NOT_RBPU : 1;
7019 struct
7021 unsigned : 1;
7022 unsigned : 1;
7023 unsigned T0IP : 1;
7024 unsigned : 1;
7025 unsigned : 1;
7026 unsigned : 1;
7027 unsigned : 1;
7028 unsigned RBPU : 1;
7030 } __INTCON2bits_t;
7032 extern __at(0x0FF1) volatile __INTCON2bits_t INTCON2bits;
7034 #define _RBIP 0x01
7035 #define _TMR0IP 0x04
7036 #define _T0IP 0x04
7037 #define _INTEDG2 0x10
7038 #define _INTEDG1 0x20
7039 #define _INTEDG0 0x40
7040 #define _NOT_RBPU 0x80
7041 #define _RBPU 0x80
7043 //==============================================================================
7046 //==============================================================================
7047 // INTCON Bits
7049 extern __at(0x0FF2) __sfr INTCON;
7051 typedef union
7053 struct
7055 unsigned RBIF : 1;
7056 unsigned INT0IF : 1;
7057 unsigned TMR0IF : 1;
7058 unsigned RBIE : 1;
7059 unsigned INT0IE : 1;
7060 unsigned TMR0IE : 1;
7061 unsigned PEIE_GIEL : 1;
7062 unsigned GIE_GIEH : 1;
7065 struct
7067 unsigned : 1;
7068 unsigned INT0F : 1;
7069 unsigned T0IF : 1;
7070 unsigned : 1;
7071 unsigned INT0E : 1;
7072 unsigned T0IE : 1;
7073 unsigned PEIE : 1;
7074 unsigned GIE : 1;
7077 struct
7079 unsigned : 1;
7080 unsigned : 1;
7081 unsigned : 1;
7082 unsigned : 1;
7083 unsigned : 1;
7084 unsigned : 1;
7085 unsigned GIEL : 1;
7086 unsigned GIEH : 1;
7088 } __INTCONbits_t;
7090 extern __at(0x0FF2) volatile __INTCONbits_t INTCONbits;
7092 #define _RBIF 0x01
7093 #define _INT0IF 0x02
7094 #define _INT0F 0x02
7095 #define _TMR0IF 0x04
7096 #define _T0IF 0x04
7097 #define _RBIE 0x08
7098 #define _INT0IE 0x10
7099 #define _INT0E 0x10
7100 #define _TMR0IE 0x20
7101 #define _T0IE 0x20
7102 #define _PEIE_GIEL 0x40
7103 #define _PEIE 0x40
7104 #define _GIEL 0x40
7105 #define _GIE_GIEH 0x80
7106 #define _GIE 0x80
7107 #define _GIEH 0x80
7109 //==============================================================================
7112 //==============================================================================
7113 // INTCON1 Bits
7115 extern __at(0x0FF2) __sfr INTCON1;
7117 typedef union
7119 struct
7121 unsigned RBIF : 1;
7122 unsigned INT0IF : 1;
7123 unsigned TMR0IF : 1;
7124 unsigned RBIE : 1;
7125 unsigned INT0IE : 1;
7126 unsigned TMR0IE : 1;
7127 unsigned PEIE_GIEL : 1;
7128 unsigned GIE_GIEH : 1;
7131 struct
7133 unsigned : 1;
7134 unsigned INT0F : 1;
7135 unsigned T0IF : 1;
7136 unsigned : 1;
7137 unsigned INT0E : 1;
7138 unsigned T0IE : 1;
7139 unsigned PEIE : 1;
7140 unsigned GIE : 1;
7143 struct
7145 unsigned : 1;
7146 unsigned : 1;
7147 unsigned : 1;
7148 unsigned : 1;
7149 unsigned : 1;
7150 unsigned : 1;
7151 unsigned GIEL : 1;
7152 unsigned GIEH : 1;
7154 } __INTCON1bits_t;
7156 extern __at(0x0FF2) volatile __INTCON1bits_t INTCON1bits;
7158 #define _INTCON1_RBIF 0x01
7159 #define _INTCON1_INT0IF 0x02
7160 #define _INTCON1_INT0F 0x02
7161 #define _INTCON1_TMR0IF 0x04
7162 #define _INTCON1_T0IF 0x04
7163 #define _INTCON1_RBIE 0x08
7164 #define _INTCON1_INT0IE 0x10
7165 #define _INTCON1_INT0E 0x10
7166 #define _INTCON1_TMR0IE 0x20
7167 #define _INTCON1_T0IE 0x20
7168 #define _INTCON1_PEIE_GIEL 0x40
7169 #define _INTCON1_PEIE 0x40
7170 #define _INTCON1_GIEL 0x40
7171 #define _INTCON1_GIE_GIEH 0x80
7172 #define _INTCON1_GIE 0x80
7173 #define _INTCON1_GIEH 0x80
7175 //==============================================================================
7177 extern __at(0x0FF3) __sfr PROD;
7178 extern __at(0x0FF3) __sfr PRODL;
7179 extern __at(0x0FF4) __sfr PRODH;
7180 extern __at(0x0FF5) __sfr TABLAT;
7181 extern __at(0x0FF6) __sfr TBLPTR;
7182 extern __at(0x0FF6) __sfr TBLPTRL;
7183 extern __at(0x0FF7) __sfr TBLPTRH;
7184 extern __at(0x0FF8) __sfr TBLPTRU;
7185 extern __at(0x0FF9) __sfr PC;
7186 extern __at(0x0FF9) __sfr PCL;
7187 extern __at(0x0FFA) __sfr PCLATH;
7188 extern __at(0x0FFB) __sfr PCLATU;
7190 //==============================================================================
7191 // STKPTR Bits
7193 extern __at(0x0FFC) __sfr STKPTR;
7195 typedef union
7197 struct
7199 unsigned STKPTR0 : 1;
7200 unsigned STKPTR1 : 1;
7201 unsigned STKPTR2 : 1;
7202 unsigned STKPTR3 : 1;
7203 unsigned STKPTR4 : 1;
7204 unsigned : 1;
7205 unsigned STKUNF : 1;
7206 unsigned STKFUL : 1;
7209 struct
7211 unsigned SP0 : 1;
7212 unsigned SP1 : 1;
7213 unsigned SP2 : 1;
7214 unsigned SP3 : 1;
7215 unsigned SP4 : 1;
7216 unsigned : 1;
7217 unsigned : 1;
7218 unsigned STKOVF : 1;
7221 struct
7223 unsigned STKPTR : 5;
7224 unsigned : 3;
7227 struct
7229 unsigned SP : 5;
7230 unsigned : 3;
7232 } __STKPTRbits_t;
7234 extern __at(0x0FFC) volatile __STKPTRbits_t STKPTRbits;
7236 #define _STKPTR0 0x01
7237 #define _SP0 0x01
7238 #define _STKPTR1 0x02
7239 #define _SP1 0x02
7240 #define _STKPTR2 0x04
7241 #define _SP2 0x04
7242 #define _STKPTR3 0x08
7243 #define _SP3 0x08
7244 #define _STKPTR4 0x10
7245 #define _SP4 0x10
7246 #define _STKUNF 0x40
7247 #define _STKFUL 0x80
7248 #define _STKOVF 0x80
7250 //==============================================================================
7252 extern __at(0x0FFD) __sfr TOS;
7253 extern __at(0x0FFD) __sfr TOSL;
7254 extern __at(0x0FFE) __sfr TOSH;
7255 extern __at(0x0FFF) __sfr TOSU;
7257 //==============================================================================
7259 // Configuration Bits
7261 //==============================================================================
7263 #define __CONFIG1H 0x300001
7264 #define __CONFIG2L 0x300002
7265 #define __CONFIG2H 0x300003
7266 #define __CONFIG4L 0x300006
7267 #define __CONFIG5L 0x300008
7268 #define __CONFIG5H 0x300009
7269 #define __CONFIG6L 0x30000A
7270 #define __CONFIG6H 0x30000B
7271 #define __CONFIG7L 0x30000C
7272 #define __CONFIG7H 0x30000D
7274 //----------------------------- CONFIG1H Options -------------------------------
7276 #define _LP_OSC 0xF8 // LP oscillator.
7277 #define _LP_OSC_1H 0xF8 // LP oscillator.
7278 #define _XT_OSC 0xF9 // XT oscillator.
7279 #define _XT_OSC_1H 0xF9 // XT oscillator.
7280 #define _HS_OSC 0xFA // HS oscillator.
7281 #define _HS_OSC_1H 0xFA // HS oscillator.
7282 #define _RC_OSC 0xFB // RC oscillator.
7283 #define _RC_OSC_1H 0xFB // RC oscillator.
7284 #define _EC_OSC 0xFC // EC oscillator w/ OSC2 configured as divide-by-4 clock output.
7285 #define _EC_OSC_1H 0xFC // EC oscillator w/ OSC2 configured as divide-by-4 clock output.
7286 #define _ECIO_OSC 0xFD // EC oscillator w/ OSC2 configured as RA6.
7287 #define _ECIO_OSC_1H 0xFD // EC oscillator w/ OSC2 configured as RA6.
7288 #define _HSPLL_OSC 0xFE // HS oscillator with PLL enabled/Clock frequency = (4 x FOSC).
7289 #define _HSPLL_OSC_1H 0xFE // HS oscillator with PLL enabled/Clock frequency = (4 x FOSC).
7290 #define _RCIO_OSC 0xFF // RC oscillator w/ OSC2 configured as RA6.
7291 #define _RCIO_OSC_1H 0xFF // RC oscillator w/ OSC2 configured as RA6.
7292 #define _OSCS_ON_1H 0xDF // Oscillator system clock switch option is enabled (oscillator switching is enabled).
7293 #define _OSCS_OFF_1H 0xFF // Oscillator system clock switch option is disabled (main oscillator is source).
7295 //----------------------------- CONFIG2L Options -------------------------------
7297 #define _PWRT_ON_2L 0xFE // PWRT enabled.
7298 #define _PWRT_OFF_2L 0xFF // PWRT disabled.
7299 #define _BOR_OFF_2L 0xFD // Brown-out Reset disabled.
7300 #define _BOR_ON_2L 0xFF // Brown-out Reset enabled.
7301 #define _BORV_45_2L 0xF3 // VBOR set to 4.5V.
7302 #define _BORV_42_2L 0xF7 // VBOR set to 4.2V.
7303 #define _BORV_27_2L 0xFB // VBOR set to 2.7V.
7304 #define _BORV_25 0xFF // VBOR set to 2.5V.
7305 #define _BORV_25_2L 0xFF // VBOR set to 2.5V.
7307 //----------------------------- CONFIG2H Options -------------------------------
7309 #define _WDT_OFF_2H 0xFE // WDT disabled (control is placed on the SWDTEN bit).
7310 #define _WDT_ON_2H 0xFF // WDT enabled.
7311 #define _WDTPS_1_2H 0xF1 // 1:1.
7312 #define _WDTPS_2_2H 0xF3 // 1:2.
7313 #define _WDTPS_4_2H 0xF5 // 1:4.
7314 #define _WDTPS_8_2H 0xF7 // 1:8.
7315 #define _WDTPS_16_2H 0xF9 // 1:16.
7316 #define _WDTPS_32_2H 0xFB // 1:32.
7317 #define _WDTPS_64_2H 0xFD // 1:64.
7318 #define _WDTPS_128_2H 0xFF // 1:128.
7320 //----------------------------- CONFIG4L Options -------------------------------
7322 #define _STVR_OFF_4L 0xFE // Stack Full/Underflow will not cause Reset.
7323 #define _STVR_ON_4L 0xFF // Stack Full/Underflow will cause Reset.
7324 #define _LVP_OFF_4L 0xFB // Low-Voltage ICSP disabled.
7325 #define _LVP_ON_4L 0xFF // Low-Voltage ICSP enabled.
7326 #define _DEBUG_ON_4L 0x7F // Background Debugger enabled. RB6 and RB7 are dedicated to In-Circuit Debug.
7327 #define _DEBUG_OFF_4L 0xFF // Background Debugger disabled. RB6 and RB7 configured as general purpose I/O pins.
7329 //----------------------------- CONFIG5L Options -------------------------------
7331 #define _CP0_ON_5L 0xFE // Block 0 (000200-001FFFh) code protected.
7332 #define _CP0_OFF_5L 0xFF // Block 0 (000200-001FFFh) not code protected.
7333 #define _CP1_ON_5L 0xFD // Block 1 (002000-003FFFh) code protected.
7334 #define _CP1_OFF_5L 0xFF // Block 1 (002000-003FFFh) not code protected.
7335 #define _CP2_ON_5L 0xFB // Block 2 (004000-005FFFh) code protected.
7336 #define _CP2_OFF_5L 0xFF // Block 2 (004000-005FFFh) not code protected.
7337 #define _CP3_ON_5L 0xF7 // Block 3 (006000-007FFFh) code protected.
7338 #define _CP3_OFF_5L 0xFF // Block 3 (006000-007FFFh) not code protected.
7340 //----------------------------- CONFIG5H Options -------------------------------
7342 #define _CPB_ON_5H 0xBF // Boot Block (000000-0001FFh) code protected.
7343 #define _CPB_OFF_5H 0xFF // Boot Block (000000-0001FFh) not code protected.
7344 #define _CPD_ON_5H 0x7F // Data EEPROM code protected.
7345 #define _CPD_OFF_5H 0xFF // Data EEPROM not code protected.
7347 //----------------------------- CONFIG6L Options -------------------------------
7349 #define _WRT0_ON_6L 0xFE // Block 0 (000200-001FFFh) write protected.
7350 #define _WRT0_OFF_6L 0xFF // Block 0 (000200-001FFFh) not write protected.
7351 #define _WRT1_ON_6L 0xFD // Block 1 (002000-003FFFh) write protected.
7352 #define _WRT1_OFF_6L 0xFF // Block 1 (002000-003FFFh) not write protected.
7353 #define _WRT2_ON_6L 0xFB // Block 2 (004000-005FFFh) write protected.
7354 #define _WRT2_OFF_6L 0xFF // Block 2 (004000-005FFFh) not write protected.
7355 #define _WRT3_ON_6L 0xF7 // Block 3 (006000-007FFFh) write protected.
7356 #define _WRT3_OFF_6L 0xFF // Block 3 (006000-007FFFh) not write protected.
7358 //----------------------------- CONFIG6H Options -------------------------------
7360 #define _WRTC_ON_6H 0xDF // Configuration registers (300000-3000FFh) write protected.
7361 #define _WRTC_OFF_6H 0xFF // Configuration registers (300000-3000FFh) not write protected.
7362 #define _WRTB_ON_6H 0xBF // Boot Block (000000-0001FFh) write protected.
7363 #define _WRTB_OFF_6H 0xFF // Boot Block (000000-0001FFh) not write protected.
7364 #define _WRTD_ON_6H 0x7F // Data EEPROM write protected.
7365 #define _WRTD_OFF_6H 0xFF // Data EEPROM not write protected.
7367 //----------------------------- CONFIG7L Options -------------------------------
7369 #define _EBTR0_ON_7L 0xFE // Block 0 (000200-001FFFh) protected from Table Reads executed in other blocks.
7370 #define _EBTR0_OFF_7L 0xFF // Block 0 (000200-001FFFh) not protected from Table Reads executed in other blocks.
7371 #define _EBTR1_ON_7L 0xFD // Block 1 (002000-003FFFh) protected from Table Reads executed in other blocks.
7372 #define _EBTR1_OFF_7L 0xFF // Block 1 (002000-003FFFh) not protected from Table Reads executed in other blocks.
7373 #define _EBTR2_ON_7L 0xFB // Block 2 (004000-005FFFh) protected from Table Reads executed in other blocks.
7374 #define _EBTR2_OFF_7L 0xFF // Block 2 (004000-005FFFh) not protected from Table Reads executed in other blocks.
7375 #define _EBTR3_ON_7L 0xF7 // Block 3 (006000-007FFFh) protected from Table Reads executed in other blocks.
7376 #define _EBTR3_OFF_7L 0xFF // Block 3 (006000-007FFFh) not protected from Table Reads executed in other blocks.
7378 //----------------------------- CONFIG7H Options -------------------------------
7380 #define _EBTRB_ON_7H 0xBF // Boot Block (000000-0001FFh) protected from Table Reads executed in other blocks.
7381 #define _EBTRB_OFF_7H 0xFF // Boot Block (000000-0001FFh) not protected from Table Reads executed in other blocks.
7383 //==============================================================================
7385 #define __DEVID1 0x3FFFFE
7386 #define __DEVID2 0x3FFFFF
7388 #define __IDLOC0 0x200000
7389 #define __IDLOC1 0x200001
7390 #define __IDLOC2 0x200002
7391 #define __IDLOC3 0x200003
7392 #define __IDLOC4 0x200004
7393 #define __IDLOC5 0x200005
7394 #define __IDLOC6 0x200006
7395 #define __IDLOC7 0x200007
7397 #endif // #ifndef __PIC18LF458_H__