这里转载的是别人现成的代码,进行了实际的编译和下载运行,罗列了实际运行中出现的问题,主要是证明代码的可靠性。
1、新建工程、选择好器件、选择编译环境,我当时选择的是C:Program Files (x86)Microchipmplabc18v3.47文件夹下的C18编译器。实际操作时,我当时误选了_mplink.exe,实际上选择的应该是mplink.exe文件。编译时出现错误,重新选择后,错误消除。
工程文件图示如下:
工程中,包括几个文件。源文件:main.c 、SysInit.c 头文件main.H、p18f45k80.h、SysInit.H
2、文件如下
源文件
main.c
#pragma config XINST = OFF // CONFIG1L
#pragma config FOSC = INTIO2, FCMEN = OFF, IESO = OFF ,PLLCFG = OFF // CONFIG1H
#pragma config BOREN = OFF, BORV = 0 // CONFIG2L
#pragma config WDTEN = OFF // CONFIG2H
/** I N C L U D E S **************************************************/
#include "main.h"
unsigned char CAN_RecFLAG=0;
unsigned char Flag50ms = 0;
// AD采样的数据变量
unsigned int VoltageEdlc[5];
unsigned int VoltageBat;
unsigned int Current1;
unsigned int Current2;
unsigned int Temperature1;
unsigned int Temperature2;
void InterruptHandler(void);
#pragma code high_vector=0x08
void high_interrupt (void)
{
_asm GOTO InterruptHandler _endasm
}
#pragma code
#pragma code low_vector=0x18
void low_interrupt (void)
{
_asm GOTO InterruptHandler _endasm
}
#pragma code
#pragma interruptlow InterruptHandler
#pragma interrupt InterruptHandler
void InterruptHandler(void)
{
static unsigned char Tick = 0;
static unsigned char ChannelNo = 0;
// 定时器0
if(INTCONbits.TMR0IF&&INTCONbits.TMR0IE) // timer0 = 10ms
{
INTCONbits.TMR0IF = 0;
TMR0H = 0x63;
TMR0L = 0xBF;
Tick++;
if(Tick ==200)
{
Flag50ms = 1; // 5s发送CAN消息到ECU
Tick = 0;
LATCbits.LATC5 = ~LATCbits.LATC5;
}
}
// CAN接收数据
if(PIR5bits.RXB0IF==1)
{
CAN_RecFLAG=1;
PIR5bits.RXB0IF=0; // 清接收中断标志
RXB0CONbits.RXFUL=0; // 清除标志,接收新报文
}
}
#pragma code
void main(void)
{
unsigned int EDLC_temp[4];
INTCON=0x00;
InitInterOSC();
InitPORT();
InitCan();
Timer0_Init();
// INTCON=0xc0; //使能中断 1100 0000
INTCONbits.GIE=1;
INTCONbits.PEIE=1;
// INTCONbits.GIEL=1;
// TXB0CONbits.TXREQ = 0;
while(1)
{
if(CAN_RecFLAG==1)
{
CAN_RecFLAG = 0;
TXB0D0=1; /* 写发送缓冲器数据区数据初值 */
TXB0D1=2;
TXB0D2=3;
TXB0D3=4;
TXB0D4=5;
TXB0D5=6;
TXB0D6=7;
TXB0D7=8;
TXB0CONbits.TXERR = 0;
TXB0CONbits.TXREQ=1; //请求发送,TXREQ=1
// while(TXB0CONbits.TXREQ){;}
while(!PIR5bits.TXB0IF){;}
Delay10KTCYx(1000);
Delay10KTCYx(1000);
}
}
}
SysInit.c
#include "main.h"
#include "p18f45k80.h"
void InitInterOSC(void)
{
// Set the internal oscillator to 64MHz
OSCCONbits.IRCF = 7; // 16 M
OSCTUNEbits.PLLEN = 0;
}
void InitPORT(void)
{
/*
RE2 RE1 RE0 RA5 RA3 RA2 RA1 RA0
AN7 AN6 AN5 AN4 AN3 AN2 AN1 AN0 : ANCON0
Current2 Current1 BatV C5 C4 C3 C2 C1
RB0 RB4 RB1
X X X X X AN10 AN9 AN8 : ANCON1
temp2 temp1
*/
ANCON0 = 0xff;
ANCON1 = 0x03; // 模拟/数字口选择
TRISA = 0b00101111; // RA方向寄存器
TRISB = 0b11111010; // RB方向寄存器
TRISC = 0b00000000; // RC方向寄存器
TRISD = 0b10010000; // RD方向寄存器
TRISE = 0b00001111; // RE方向寄存器
LATCbits.LATC1 = 0; // disable buck
LATCbits.LATC2 = 0; // disable boost
LATCbits.LATC4 = 1; // enable Aux power
}
// 使用16位定时器,使用内部时钟16Mhz,周期是4/16M = 0.25uS, TMR0H=TMR0L=0.定时时间2^16 = 65535/4uS=16.383mS
void Timer0_Init(void)
{
// RCONbits.IPEN=1; //打开中断高低优先级
INTCONbits.TMR0IE = 1; // 允许定时器0溢出中断
INTCONbits.TMR0IF = 0; // 清除中断标志
// INTCON2bits.TMR0IP = 0; // 设置定时器0中断为低优先级
T0CON = 0b00001000; // 定时器0设定为16位定时器,内部时钟触发,不使用分频器
// T0CON = 0b00000001; // 定时器0设定为16位定时器,内部时钟触发,使用分频器,1:4分频比
TMR0H = 0x63; // clear timer - always write upper byte first
TMR0L = 0xBF; // timer = 10ms
// INTCONbits.GIE=1;
// INTCONbits.PEIE=1;
// INTCONbits.GIEL=1;
T0CONbits.TMR0ON=1;
}
// need to set to 500kbps,standard frame
void InitCan(void)
{
TRISB=(TRISB|0x08)&0xFB; //设置CANRX/RB3为输入,CANTX/RB2为输出
CANCON = 0x80;
while(CANSTAT&0x80==0){;}
// 500Kbps@16M
BRGCON1 = 0x00; //0000 0100
BRGCON2 = 0xb8; //1011 1010
BRGCON3 = 0x05; //0000 0101
CIOCON=0X00;
ECANCON=0x00;
//设置发送邮箱0标识符号和发送的数据
TXB0CON=0x03; // TXB0发送优先级为最高优先级,TXPRI=11
TXB0SIDH=0b01010001; // 设置发送缓冲器0为标准标识符,ID = 0x28F
TXB0SIDL=0b11100000;
// TXB0SIDH=0x00; // 设置发送缓冲器0为标准标识符,ID = 0x28F
// TXB0SIDL=0x00;
TXB0DLC=0x08; // 设置数据长度为8个字节
TXB0D0=0X10; /* 写发送缓冲器数据区数据初值 */
TXB0D1=0X11;
TXB0D2=0X12;
TXB0D3=0X13;
TXB0D4=0X14;
TXB0D5=0X15;
TXB0D6=0X16;
TXB0D7=0X17;
//设置接收邮箱0的标识符和初始化数据
RXB0SIDH=0Xff; // 设置接收缓冲器0的标识符 ID = 0x26D
RXB0SIDL=0Xe0;
RXB0CON=0X20; // 仅仅接收标准标识符,FILHIT0=0表示RXB0采用filter0
RXB0DLC=0X08; // 设置接收缓冲器0的数据区长度
//初始化接收滤波器0,Id = 0x26D = 0b 010 0110 1101
RXF0SIDH=0b01001101;
RXF0SIDL=0b10100000;
//初始化接收屏蔽器0,所有11位都比较滤波
RXM0SIDH=0Xff;
RXM0SIDL=0Xe0;
//所有ID 都进来
// RXM0SIDH=0X00;
// RXM0SIDL=0X00;
Nop();
//使CAN进入某种工作模式
CANCON=0x00; //=0X40,进入自测试模式;=0x00,正常操作模式
while(CANSTAT&0XE0!=0){;}
//while(CANSTAT&0X40==0){;}
//初始化CAN的中断
PIR5=0X00; //清所有中断标志
PIE5=0X01; //使能接收缓冲器0的接收中断
// IPR5=0X01; //接收缓冲器0的接收中断为最高优先级
}
头文件
main.H
#ifndef _MAIN_H_
#define _MAIN_H_
#include
#include
#include "SysInit.h"
extern unsigned int VoltageEdlc[5];
extern unsigned int VoltageBat;
extern unsigned int Current1;
extern unsigned int Current2;
extern unsigned int Temperature1;
extern unsigned int Temperature2;
#endif
p18f45k80.h
/*-------------------------------------------------------------------------
* MPLAB-Cxx PIC18F45K80 processor header
*
* (c) Copyright 1999-2011 Microchip Technology, All rights reserved
*-------------------------------------------------------------------------*/
#ifndef __18F45K80_H
#define __18F45K80_H
extern volatile far unsigned char RXERRCNT;
extern volatile far union {
struct {
unsigned REC:8;
};
struct {
unsigned REC0:1;
unsigned REC1:1;
unsigned REC2:1;
unsigned REC3:1;
unsigned REC4:1;
unsigned REC5:1;
unsigned REC6:1;
unsigned REC7:1;
};
} RXERRCNTbits;
extern volatile far unsigned char TXERRCNT;
extern volatile far union {
struct {
unsigned TEC:8;
};
struct {
unsigned TEC0:1;
unsigned TEC1:1;
unsigned TEC2:1;
unsigned TEC3:1;
unsigned TEC4:1;
unsigned TEC5:1;
unsigned TEC6:1;
unsigned TEC7:1;
};
} TXERRCNTbits;
extern volatile far unsigned char BRGCON1;
extern volatile far union {
struct {
unsigned BRP:6;
unsigned SJW:2;
};
struct {
unsigned BRP0:1;
unsigned BRP1:1;
unsigned BRP2:1;
unsigned BRP3:1;
unsigned BRP4:1;
unsigned BRP5:1;
unsigned SJW0:1;
unsigned SJW1:1;
};
} BRGCON1bits;
extern volatile far unsigned char BRGCON2;
extern volatile far union {
struct {
unsigned PRSEG:3;
unsigned SEG1PH:3;
unsigned SAM:1;
unsigned SEG2PHTS:1;
};
struct {
unsigned PRSEG0:1;
unsigned PRSEG1:1;
unsigned PRSEG2:1;
unsigned SEG1PH0:1;
unsigned SEG1PH1:1;
unsigned SEG1PH2:1;
};
} BRGCON2bits;
extern volatile far unsigned char BRGCON3;
extern volatile far union {
struct {
unsigned SEG2PH:3;
unsigned :3;
unsigned WAKFIL:1;
unsigned WAKDIS:1;
};
struct {
unsigned SEG2PH0:1;
unsigned SEG2PH1:1;
unsigned SEG2PH2:1;
};
} BRGCON3bits;
extern volatile far unsigned char RXFCON0;
extern volatile far struct {
unsigned RXF0EN:1;
unsigned RXF1EN:1;
unsigned RXF2EN:1;
unsigned RXF3EN:1;
unsigned RXF4EN:1;
unsigned RXF5EN:1;
unsigned RXF6EN:1;
unsigned RXF7EN:1;
} RXFCON0bits;
extern volatile far unsigned char RXFCON1;
extern volatile far struct {
unsigned RXF8EN:1;
unsigned RXF9EN:1;
unsigned RXF10EN:1;
unsigned RXF11EN:1;
unsigned RXF12EN:1;
unsigned RXF13EN:1;
unsigned RXF14EN:1;
unsigned RXF15EN:1;
} RXFCON1bits;
extern volatile far unsigned char RXF6SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} RXF6SIDHbits;
extern volatile far unsigned char RXF6SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDEN:1;
unsigned :1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} RXF6SIDLbits;
extern volatile far unsigned char RXF6EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} RXF6EIDHbits;
extern volatile far unsigned char RXF6EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} RXF6EIDLbits;
extern volatile far unsigned char RXF7SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} RXF7SIDHbits;
extern volatile far unsigned char RXF7SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDEN:1;
unsigned :1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} RXF7SIDLbits;
extern volatile far unsigned char RXF7EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} RXF7EIDHbits;
extern volatile far unsigned char RXF7EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} RXF7EIDLbits;
extern volatile far unsigned char RXF8SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} RXF8SIDHbits;
extern volatile far unsigned char RXF8SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDEN:1;
unsigned :1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} RXF8SIDLbits;
extern volatile far unsigned char RXF8EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} RXF8EIDHbits;
extern volatile far unsigned char RXF8EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} RXF8EIDLbits;
extern volatile far unsigned char RXF9SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} RXF9SIDHbits;
extern volatile far unsigned char RXF9SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDEN:1;
unsigned :1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} RXF9SIDLbits;
extern volatile far unsigned char RXF9EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} RXF9EIDHbits;
extern volatile far unsigned char RXF9EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} RXF9EIDLbits;
extern volatile far unsigned char RXF10SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} RXF10SIDHbits;
extern volatile far unsigned char RXF10SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDEN:1;
unsigned :1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} RXF10SIDLbits;
extern volatile far unsigned char RXF10EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} RXF10EIDHbits;
extern volatile far unsigned char RXF10EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} RXF10EIDLbits;
extern volatile far unsigned char RXF11SIDH;
extern volatile far union {
struct {
unsigned RXFSID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} RXF11SIDHbits;
extern volatile far unsigned char RXF11SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDEN:1;
unsigned :1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} RXF11SIDLbits;
extern volatile far unsigned char RXF11EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} RXF11EIDHbits;
extern volatile far unsigned char RXF11EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} RXF11EIDLbits;
extern volatile far unsigned char RXF12SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} RXF12SIDHbits;
extern volatile far unsigned char RXF12SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDEN:1;
unsigned :1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} RXF12SIDLbits;
extern volatile far unsigned char RXF12EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} RXF12EIDHbits;
extern volatile far unsigned char RXF12EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} RXF12EIDLbits;
extern volatile far unsigned char RXF13SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} RXF13SIDHbits;
extern volatile far unsigned char RXF13SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDEN:1;
unsigned :1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} RXF13SIDLbits;
extern volatile far unsigned char RXF13EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} RXF13EIDHbits;
extern volatile far unsigned char RXF13EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} RXF13EIDLbits;
extern volatile far unsigned char RXF14SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} RXF14SIDHbits;
extern volatile far unsigned char RXF14SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDEN:1;
unsigned :1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} RXF14SIDLbits;
extern volatile far unsigned char RXF14EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} RXF14EIDHbits;
extern volatile far unsigned char RXF14EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} RXF14EIDLbits;
extern volatile far unsigned char RXF15SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} RXF15SIDHbits;
extern volatile far unsigned char RXF15SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDEN:1;
unsigned :1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} RXF15SIDLbits;
extern volatile far unsigned char RXF15EIDH;
extern volatile far union {
struct {
unsigned RXFEID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} RXF15EIDHbits;
extern volatile far unsigned char RXF15EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} RXF15EIDLbits;
extern volatile far unsigned char SDFLC;
extern volatile far union {
struct {
unsigned FLC:5;
};
struct {
unsigned FLC0:1;
unsigned FLC1:1;
unsigned FLC2:1;
unsigned FLC3:1;
unsigned FLC4:1;
};
} SDFLCbits;
extern volatile far unsigned char RXFBCON0;
extern volatile far union {
struct {
unsigned F0BP:4;
unsigned F1BP:4;
};
struct {
unsigned F0BP_0:1;
unsigned F0BP_1:1;
unsigned F0BP_2:1;
unsigned F0BP_3:1;
unsigned F1BP_0:1;
unsigned F1BP_1:1;
unsigned F1BP_2:1;
unsigned F1BP_3:1;
};
} RXFBCON0bits;
extern volatile far unsigned char RXFBCON1;
extern volatile far union {
struct {
unsigned F2BP:4;
unsigned F3BP:4;
};
struct {
unsigned F2BP_0:1;
unsigned F2BP_1:1;
unsigned F2BP_2:1;
unsigned F2BP_3:1;
unsigned F3BP_0:1;
unsigned F3BP_1:1;
unsigned F3BP_2:1;
unsigned F3BP_3:1;
};
} RXFBCON1bits;
extern volatile far unsigned char RXFBCON2;
extern volatile far union {
struct {
unsigned F4BP:4;
unsigned F5BP:4;
};
struct {
unsigned F4BP_0:1;
unsigned F4BP_1:1;
unsigned F4BP_2:1;
unsigned F4BP_3:1;
unsigned F5BP_0:1;
unsigned F5BP_1:1;
unsigned F5BP_2:1;
unsigned F5BP_3:1;
};
} RXFBCON2bits;
extern volatile far unsigned char RXFBCON3;
extern volatile far union {
struct {
unsigned F6BP:4;
unsigned F7BP:4;
};
struct {
unsigned F6BP_0:1;
unsigned F6BP_1:1;
unsigned F6BP_2:1;
unsigned F6BP_3:1;
unsigned F7BP_0:1;
unsigned F7BP_1:1;
unsigned F7BP_2:1;
unsigned F7BP_3:1;
};
} RXFBCON3bits;
extern volatile far unsigned char RXFBCON4;
extern volatile far union {
struct {
unsigned F8BP:4;
unsigned F9BP:4;
};
struct {
unsigned F8BP_0:1;
unsigned F8BP_1:1;
unsigned F8BP_2:1;
unsigned F8BP_3:1;
unsigned F9BP_0:1;
unsigned F9BP_1:1;
unsigned F9BP_2:1;
unsigned F9BP_3:1;
};
} RXFBCON4bits;
extern volatile far unsigned char RXFBCON5;
extern volatile far union {
struct {
unsigned F10BP:4;
unsigned F11BP:4;
};
struct {
unsigned F10BP_0:1;
unsigned F10BP_1:1;
unsigned F10BP_2:1;
unsigned F10BP_3:1;
unsigned F11BP_0:1;
unsigned F11BP_1:1;
unsigned F11BP_2:1;
unsigned F11BP_3:1;
};
} RXFBCON5bits;
extern volatile far unsigned char RXFBCON6;
extern volatile far union {
struct {
unsigned F12BP:4;
unsigned F13BP:4;
};
struct {
unsigned F12BP_0:1;
unsigned F12BP_1:1;
unsigned F12BP_2:1;
unsigned F12BP_3:1;
unsigned F13BP_0:1;
unsigned F13BP_1:1;
unsigned F13BP_2:1;
unsigned F13BP_3:1;
};
} RXFBCON6bits;
extern volatile far unsigned char RXFBCON7;
extern volatile far union {
struct {
unsigned F14BP:4;
unsigned F15BP:4;
};
struct {
unsigned F14BP_0:1;
unsigned F14BP_1:1;
unsigned F14BP_2:1;
unsigned F14BP_3:1;
unsigned F15BP_0:1;
unsigned F15BP_1:1;
unsigned F15BP_2:1;
unsigned F15BP_3:1;
};
} RXFBCON7bits;
extern volatile far unsigned char MSEL0;
extern volatile far union {
struct {
unsigned FIL0:2;
unsigned FIL1:2;
unsigned FIL2:2;
unsigned FIL3:2;
};
struct {
unsigned FIL0_0:1;
unsigned FIL0_1:1;
unsigned FIL1_0:1;
unsigned FIL1_1:1;
unsigned FIL2_0:1;
unsigned FIL2_1:1;
unsigned FIL3_0:1;
unsigned FIL3_1:1;
};
} MSEL0bits;
extern volatile far unsigned char MSEL1;
extern volatile far union {
struct {
unsigned FIL4:2;
unsigned FIL5:2;
unsigned FIL6:2;
unsigned FIL7:2;
};
struct {
unsigned FIL4_0:1;
unsigned FIL4_1:1;
unsigned FIL5_0:1;
unsigned FIL5_1:1;
unsigned FIL6_0:1;
unsigned FIL6_1:1;
unsigned FIL7_0:1;
unsigned FIL7_1:1;
};
} MSEL1bits;
extern volatile far unsigned char MSEL2;
extern volatile far union {
struct {
unsigned FIL8:2;
unsigned FIL9:2;
unsigned FIL10:2;
unsigned FIL11:2;
};
struct {
unsigned FIL8_0:1;
unsigned FIL8_1:1;
unsigned FIL9_0:1;
unsigned FIL9_1:1;
unsigned FIL10_0:1;
unsigned FIL10_1:1;
unsigned FIL11_0:1;
unsigned FIL11_1:1;
};
} MSEL2bits;
extern volatile far unsigned char MSEL3;
extern volatile far union {
struct {
unsigned FIL12:2;
unsigned FIL13:2;
unsigned FIL14:2;
unsigned FIL15:2;
};
struct {
unsigned FIL12_0:1;
unsigned FIL12_1:1;
unsigned FIL13_0:1;
unsigned FIL13_1:1;
unsigned FIL14_0:1;
unsigned FIL14_1:1;
unsigned FIL15_0:1;
unsigned FIL15_1:1;
};
} MSEL3bits;
extern volatile far unsigned char BSEL0;
extern volatile far struct {
unsigned :2;
unsigned B0TXEN:1;
unsigned B1TXEN:1;
unsigned B2TXEN:1;
unsigned B3TXEN:1;
unsigned B4TXEN:1;
unsigned B5TXEN:1;
} BSEL0bits;
extern volatile far unsigned char BIE0;
extern volatile far struct {
unsigned RXB0IE:1;
unsigned RXB1IE:1;
unsigned B0IE:1;
unsigned B1IE:1;
unsigned B2IE:1;
unsigned B3IE:1;
unsigned B4IE:1;
unsigned B5IE:1;
} BIE0bits;
extern volatile far unsigned char TXBIE;
extern volatile far struct {
unsigned :2;
unsigned TXB0IE:1;
unsigned TXB1IE:1;
unsigned TXB2IE:1;
} TXBIEbits;
extern volatile far unsigned char B0CON;
extern volatile far union {
struct {
unsigned FILHIT0_TXPRI0:1;
unsigned FILHIT1_TXPRI1:1;
unsigned FILHIT2_RTREN:1;
unsigned FILHIT3_TXREQ:1;
unsigned FILHIT4_TXERR:1;
unsigned RXRTRRO_TXLARB:1;
unsigned RXM1_TXABT:1;
unsigned RXFUL_TXBIF:1;
};
struct {
unsigned FILHIT0:1;
unsigned FILHIT1:1;
unsigned FILHIT2:1;
unsigned FILHIT3:1;
unsigned FILHIT4:1;
unsigned RXRTRRO:1;
unsigned RXM1:1;
unsigned RXFUL:1;
};
struct {
unsigned TXPRI0:1;
unsigned TXPRI1:1;
unsigned RTREN:1;
unsigned TXREQ:1;
unsigned TXERR:1;
unsigned TXLARB:1;
unsigned TXABT:1;
unsigned TXBIF:1;
};
} B0CONbits;
extern volatile far unsigned char B0SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} B0SIDHbits;
extern volatile far unsigned char B0SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDE:1;
unsigned SRR:1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} B0SIDLbits;
extern volatile far unsigned char B0EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} B0EIDHbits;
extern volatile far unsigned char B0EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} B0EIDLbits;
extern volatile far unsigned char B0DLC;
extern volatile far union {
struct {
unsigned DLC:4;
unsigned RB:2;
unsigned RXRTR_TXRTR:1;
};
struct {
unsigned DLC0:1;
unsigned DLC1:1;
unsigned DLC2:1;
unsigned DLC3:1;
unsigned RB0:1;
unsigned RB1:1;
unsigned RXRTR:1;
};
struct {
unsigned :6;
unsigned TXRTR:1;
};
} B0DLCbits;
extern volatile far unsigned char B0D0;
extern volatile far union {
struct {
unsigned B0D0:8;
};
struct {
unsigned B0D00:1;
unsigned B0D01:1;
unsigned B0D02:1;
unsigned B0D03:1;
unsigned B0D04:1;
unsigned B0D05:1;
unsigned B0D06:1;
unsigned B0D07:1;
};
} B0D0bits;
extern volatile far unsigned char B0D1;
extern volatile far union {
struct {
unsigned B0D1:8;
};
struct {
unsigned B0D10:1;
unsigned B0D11:1;
unsigned B0D12:1;
unsigned B0D13:1;
unsigned B0D14:1;
unsigned B0D15:1;
unsigned B0D16:1;
unsigned B0D17:1;
};
} B0D1bits;
extern volatile far unsigned char B0D2;
extern volatile far union {
struct {
unsigned B0D2:8;
};
struct {
unsigned B0D20:1;
unsigned B0D21:1;
unsigned B0D22:1;
unsigned B0D23:1;
unsigned B0D24:1;
unsigned B0D25:1;
unsigned B0D26:1;
unsigned B0D27:1;
};
} B0D2bits;
extern volatile far unsigned char B0D3;
extern volatile far union {
struct {
unsigned B0D3:8;
};
struct {
unsigned B0D30:1;
unsigned B0D31:1;
unsigned B0D32:1;
unsigned B0D33:1;
unsigned B0D34:1;
unsigned B0D35:1;
unsigned B0D36:1;
unsigned B0D37:1;
};
} B0D3bits;
extern volatile far unsigned char B0D4;
extern volatile far union {
struct {
unsigned B0D4:8;
};
struct {
unsigned B0D40:1;
unsigned B0D41:1;
unsigned B0D42:1;
unsigned B0D43:1;
unsigned B0D44:1;
unsigned B0D45:1;
unsigned B0D46:1;
unsigned B0D47:1;
};
} B0D4bits;
extern volatile far unsigned char B0D5;
extern volatile far union {
struct {
unsigned B0D5:8;
};
struct {
unsigned B0D50:1;
unsigned B0D51:1;
unsigned B0D52:1;
unsigned B0D53:1;
unsigned B0D54:1;
unsigned B0D55:1;
unsigned B0D56:1;
unsigned B0D57:1;
};
} B0D5bits;
extern volatile far unsigned char B0D6;
extern volatile far union {
struct {
unsigned B0D6:8;
};
struct {
unsigned B0D60:1;
unsigned B0D61:1;
unsigned B0D62:1;
unsigned B0D63:1;
unsigned B0D64:1;
unsigned B0D65:1;
unsigned B0D66:1;
unsigned B0D67:1;
};
} B0D6bits;
extern volatile far unsigned char B0D7;
extern volatile far union {
struct {
unsigned B0D7:8;
};
struct {
unsigned B0D70:1;
unsigned B0D71:1;
unsigned B0D72:1;
unsigned B0D73:1;
unsigned B0D74:1;
unsigned B0D75:1;
unsigned B0D76:1;
unsigned B0D77:1;
};
} B0D7bits;
extern volatile far unsigned char CANSTAT_RO9;
extern volatile far union {
struct {
unsigned EICODE0:1;
unsigned EICODE1_ICODE0:1;
unsigned EICODE2_ICODE1:1;
unsigned EICODE3_ICODE2:1;
unsigned EICODE4:1;
unsigned OPMODE:3;
};
struct {
unsigned :1;
unsigned EICODE1:1;
unsigned EICODE2:1;
unsigned EICODE3:1;
unsigned :1;
unsigned OPMODE0:1;
unsigned OPMODE1:1;
unsigned OPMODE2:1;
};
struct {
unsigned :1;
unsigned ICODE0:1;
unsigned ICODE1:1;
unsigned ICODE2:1;
};
} CANSTAT_RO9bits;
extern volatile far unsigned char CANCON_RO9;
extern volatile far union {
struct {
unsigned FP0:1;
unsigned WIN0_FP1:1;
unsigned WIN1_FP2:1;
unsigned WIN2_FP3:1;
unsigned ABAT:1;
unsigned REQOP:3;
};
struct {
unsigned :1;
unsigned WIN0:1;
unsigned WIN1:1;
unsigned WIN2:1;
};
struct {
unsigned :1;
unsigned FP1:1;
unsigned FP2:1;
unsigned FP3:1;
};
} CANCON_RO9bits;
extern volatile far unsigned char B1CON;
extern volatile far union {
struct {
unsigned FILHIT0_TXPRI0:1;
unsigned FILHIT1_TXPRI1:1;
unsigned FILHIT2_RTREN:1;
unsigned FILHIT3_TXREQ:1;
unsigned FILHIT4_TXERR:1;
unsigned RXRTRRO_TXLARB:1;
unsigned RXM1_TXABT:1;
unsigned RXFUL_TXBIF:1;
};
struct {
unsigned FILHIT0:1;
unsigned FILHIT1:1;
unsigned FILHIT2:1;
unsigned FILHIT3:1;
unsigned FILHIT4:1;
unsigned RXRTRRO:1;
unsigned RXM1:1;
unsigned RXFUL:1;
};
struct {
unsigned TXPRI0:1;
unsigned TXPRI1:1;
unsigned RTREN:1;
unsigned TXREQ:1;
unsigned TXERR:1;
unsigned TXLARB:1;
unsigned TXABT:1;
unsigned TXBIF:1;
};
} B1CONbits;
extern volatile far unsigned char B1SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} B1SIDHbits;
extern volatile far unsigned char B1SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDE:1;
unsigned SRR:1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} B1SIDLbits;
extern volatile far unsigned char B1EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} B1EIDHbits;
extern volatile far unsigned char B1EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} B1EIDLbits;
extern volatile far unsigned char B1DLC;
extern volatile far union {
struct {
unsigned DLC:4;
unsigned RB:2;
unsigned RXRTR_TXRTR:1;
};
struct {
unsigned DLC0:1;
unsigned DLC1:1;
unsigned DLC2:1;
unsigned DLC3:1;
unsigned RB0:1;
unsigned RB1:1;
unsigned RXRTR:1;
};
struct {
unsigned :6;
unsigned TXRTR:1;
};
} B1DLCbits;
extern volatile far unsigned char B1D0;
extern volatile far union {
struct {
unsigned B1D0:8;
};
struct {
unsigned B1D00:1;
unsigned B1D01:1;
unsigned B1D02:1;
unsigned B1D03:1;
unsigned B1D04:1;
unsigned B1D05:1;
unsigned B1D06:1;
unsigned B1D07:1;
};
} B1D0bits;
extern volatile far unsigned char B1D1;
extern volatile far union {
struct {
unsigned B1D1:8;
};
struct {
unsigned B1D10:1;
unsigned B1D11:1;
unsigned B1D12:1;
unsigned B1D13:1;
unsigned B1D14:1;
unsigned B1D15:1;
unsigned B1D16:1;
unsigned B1D17:1;
};
} B1D1bits;
extern volatile far unsigned char B1D2;
extern volatile far union {
struct {
unsigned B1D2:8;
};
struct {
unsigned B1D20:1;
unsigned B1D21:1;
unsigned B1D22:1;
unsigned B1D23:1;
unsigned B1D24:1;
unsigned B1D25:1;
unsigned B1D26:1;
unsigned B1D27:1;
};
} B1D2bits;
extern volatile far unsigned char B1D3;
extern volatile far union {
struct {
unsigned B1D3:8;
};
struct {
unsigned B1D30:1;
unsigned B1D31:1;
unsigned B1D32:1;
unsigned B1D33:1;
unsigned B1D34:1;
unsigned B1D35:1;
unsigned B1D36:1;
unsigned B1D37:1;
};
} B1D3bits;
extern volatile far unsigned char B1D4;
extern volatile far union {
struct {
unsigned B1D4:8;
};
struct {
unsigned B1D40:1;
unsigned B1D41:1;
unsigned B1D42:1;
unsigned B1D43:1;
unsigned B1D44:1;
unsigned B1D45:1;
unsigned B1D46:1;
unsigned B1D47:1;
};
} B1D4bits;
extern volatile far unsigned char B1D5;
extern volatile far union {
struct {
unsigned B1D5:8;
};
struct {
unsigned B1D50:1;
unsigned B1D51:1;
unsigned B1D52:1;
unsigned B1D53:1;
unsigned B1D54:1;
unsigned B1D55:1;
unsigned B1D56:1;
unsigned B1D57:1;
};
} B1D5bits;
extern volatile far unsigned char B1D6;
extern volatile far union {
struct {
unsigned B1D6:8;
};
struct {
unsigned B1D60:1;
unsigned B1D61:1;
unsigned B1D62:1;
unsigned B1D63:1;
unsigned B1D64:1;
unsigned B1D65:1;
unsigned B1D66:1;
unsigned B1D67:1;
};
} B1D6bits;
extern volatile far unsigned char B1D7;
extern volatile far union {
struct {
unsigned B1D7:8;
};
struct {
unsigned B1D70:1;
unsigned B1D71:1;
unsigned B1D72:1;
unsigned B1D73:1;
unsigned B1D74:1;
unsigned B1D75:1;
unsigned B1D76:1;
unsigned B1D77:1;
};
} B1D7bits;
extern volatile far unsigned char CANSTAT_RO8;
extern volatile far union {
struct {
unsigned EICODE0:1;
unsigned EICODE1_ICODE0:1;
unsigned EICODE2_ICODE1:1;
unsigned EICODE3_ICODE2:1;
unsigned EICODE4:1;
unsigned OPMODE:3;
};
struct {
unsigned :1;
unsigned EICODE1:1;
unsigned EICODE2:1;
unsigned EICODE3:1;
unsigned :1;
unsigned OPMODE0:1;
unsigned OPMODE1:1;
unsigned OPMODE2:1;
};
struct {
unsigned :1;
unsigned ICODE0:1;
unsigned ICODE1:1;
unsigned ICODE2:1;
};
} CANSTAT_RO8bits;
extern volatile far unsigned char CANCON_RO8;
extern volatile far union {
struct {
unsigned FP0:1;
unsigned WIN0_FP1:1;
unsigned WIN1_FP2:1;
unsigned WIN2_FP3:1;
unsigned ABAT:1;
unsigned REQOP:3;
};
struct {
unsigned :1;
unsigned WIN0:1;
unsigned WIN1:1;
unsigned WIN2:1;
};
struct {
unsigned :1;
unsigned FP1:1;
unsigned FP2:1;
unsigned FP3:1;
};
} CANCON_RO8bits;
extern volatile far unsigned char B2CON;
extern volatile far union {
struct {
unsigned FILHIT0_TXPRI0:1;
unsigned FILHIT1_TXPRI1:1;
unsigned FILHIT2_RTREN:1;
unsigned FILHIT3_TXREQ:1;
unsigned FILHIT4_TXERR:1;
unsigned RXRTRRO_TXLARB:1;
unsigned RXM1_TXABT:1;
unsigned RXFUL_TXBIF:1;
};
struct {
unsigned FILHIT0:1;
unsigned FILHIT1:1;
unsigned FILHIT2:1;
unsigned FILHIT3:1;
unsigned FILHIT4:1;
unsigned RXRTRRO:1;
unsigned RXM1:1;
unsigned RXFUL:1;
};
struct {
unsigned TXPRI0:1;
unsigned TXPRI1:1;
unsigned RTREN:1;
unsigned TXREQ:1;
unsigned TXERR:1;
unsigned TXLARB:1;
unsigned TXABT:1;
unsigned TXBIF:1;
};
} B2CONbits;
extern volatile far unsigned char B2SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} B2SIDHbits;
extern volatile far unsigned char B2SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDE:1;
unsigned SRR:1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} B2SIDLbits;
extern volatile far unsigned char B2EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} B2EIDHbits;
extern volatile far unsigned char B2EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} B2EIDLbits;
extern volatile far unsigned char B2DLC;
extern volatile far union {
struct {
unsigned DLC:4;
unsigned RB:2;
unsigned RXRTR_TXRTR:1;
};
struct {
unsigned DLC0:1;
unsigned DLC1:1;
unsigned DLC2:1;
unsigned DLC3:1;
unsigned RB0:1;
unsigned RB1:1;
unsigned RXRTR:1;
};
struct {
unsigned :6;
unsigned TXRTR:1;
};
} B2DLCbits;
extern volatile far unsigned char B2D0;
extern volatile far union {
struct {
unsigned B2D0:8;
};
struct {
unsigned B2D00:1;
unsigned B2D01:1;
unsigned B2D02:1;
unsigned B2D03:1;
unsigned B2D04:1;
unsigned B2D05:1;
unsigned B2D06:1;
unsigned B2D07:1;
};
} B2D0bits;
extern volatile far unsigned char B2D1;
extern volatile far union {
struct {
unsigned B2D1:8;
};
struct {
unsigned B2D10:1;
unsigned B2D11:1;
unsigned B2D12:1;
unsigned B2D13:1;
unsigned B2D14:1;
unsigned B2D15:1;
unsigned B2D16:1;
unsigned B2D17:1;
};
} B2D1bits;
extern volatile far unsigned char B2D2;
extern volatile far union {
struct {
unsigned B2D2:8;
};
struct {
unsigned B2D20:1;
unsigned B2D21:1;
unsigned B2D22:1;
unsigned B2D23:1;
unsigned B2D24:1;
unsigned B2D25:1;
unsigned B2D26:1;
unsigned B2D27:1;
};
} B2D2bits;
extern volatile far unsigned char B2D3;
extern volatile far union {
struct {
unsigned B2D3:8;
};
struct {
unsigned B2D30:1;
unsigned B2D31:1;
unsigned B2D32:1;
unsigned B2D33:1;
unsigned B2D34:1;
unsigned B2D35:1;
unsigned B2D36:1;
unsigned B2D37:1;
};
} B2D3bits;
extern volatile far unsigned char B2D4;
extern volatile far union {
struct {
unsigned B2D4:8;
};
struct {
unsigned B2D40:1;
unsigned B2D41:1;
unsigned B2D42:1;
unsigned B2D43:1;
unsigned B2D44:1;
unsigned B2D45:1;
unsigned B2D46:1;
unsigned B2D47:1;
};
} B2D4bits;
extern volatile far unsigned char B2D5;
extern volatile far union {
struct {
unsigned B2D5:8;
};
struct {
unsigned B2D50:1;
unsigned B2D51:1;
unsigned B2D52:1;
unsigned B2D53:1;
unsigned B2D54:1;
unsigned B2D55:1;
unsigned B2D56:1;
unsigned B2D57:1;
};
} B2D5bits;
extern volatile far unsigned char B2D6;
extern volatile far union {
struct {
unsigned B2D6:8;
};
struct {
unsigned B2D60:1;
unsigned B2D61:1;
unsigned B2D62:1;
unsigned B2D63:1;
unsigned B2D64:1;
unsigned B2D65:1;
unsigned B2D66:1;
unsigned B2D67:1;
};
} B2D6bits;
extern volatile far unsigned char B2D7;
extern volatile far union {
struct {
unsigned B2D7:8;
};
struct {
unsigned B2D70:1;
unsigned B2D71:1;
unsigned B2D72:1;
unsigned B2D73:1;
unsigned B2D74:1;
unsigned B2D75:1;
unsigned B2D76:1;
unsigned B2D77:1;
};
} B2D7bits;
extern volatile far unsigned char CANSTAT_RO7;
extern volatile far union {
struct {
unsigned EICODE0:1;
unsigned EICODE1_ICODE0:1;
unsigned EICODE2_ICODE1:1;
unsigned EICODE3_ICODE2:1;
unsigned EICODE4:1;
unsigned OPMODE:3;
};
struct {
unsigned :1;
unsigned EICODE1:1;
unsigned EICODE2:1;
unsigned EICODE3:1;
unsigned :1;
unsigned OPMODE0:1;
unsigned OPMODE1:1;
unsigned OPMODE2:1;
};
struct {
unsigned :1;
unsigned ICODE0:1;
unsigned ICODE1:1;
unsigned ICODE2:1;
};
} CANSTAT_RO7bits;
extern volatile far unsigned char CANCON_RO7;
extern volatile far union {
struct {
unsigned FP0:1;
unsigned WIN0_FP1:1;
unsigned WIN1_FP2:1;
unsigned WIN2_FP3:1;
unsigned ABAT:1;
unsigned REQOP:3;
};
struct {
unsigned :1;
unsigned WIN0:1;
unsigned WIN1:1;
unsigned WIN2:1;
};
struct {
unsigned :1;
unsigned FP1:1;
unsigned FP2:1;
unsigned FP3:1;
};
} CANCON_RO7bits;
extern volatile far unsigned char B3CON;
extern volatile far union {
struct {
unsigned FILHIT0_TXPRI0:1;
unsigned FILHIT1_TXPRI1:1;
unsigned FILHIT2_RTREN:1;
unsigned FILHIT3_TXREQ:1;
unsigned FILHIT4_TXERR:1;
unsigned RXRTRRO_TXLARB:1;
unsigned RXM1_TXABT:1;
unsigned RXFUL_TXBIF:1;
};
struct {
unsigned FILHIT0:1;
unsigned FILHIT1:1;
unsigned FILHIT2:1;
unsigned FILHIT3:1;
unsigned FILHIT4:1;
unsigned RXRTRRO:1;
unsigned RXM1:1;
unsigned RXFUL:1;
};
struct {
unsigned TXPRI0:1;
unsigned TXPRI1:1;
unsigned RTREN:1;
unsigned TXREQ:1;
unsigned TXERR:1;
unsigned TXLARB:1;
unsigned TXABT:1;
unsigned TXBIF:1;
};
} B3CONbits;
extern volatile far unsigned char B3SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} B3SIDHbits;
extern volatile far unsigned char B3SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDE:1;
unsigned SRR:1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} B3SIDLbits;
extern volatile far unsigned char B3EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} B3EIDHbits;
extern volatile far unsigned char B3EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} B3EIDLbits;
extern volatile far unsigned char B3DLC;
extern volatile far union {
struct {
unsigned DLC:4;
unsigned RB:2;
unsigned RXRTR_TXRTR:1;
};
struct {
unsigned DLC0:1;
unsigned DLC1:1;
unsigned DLC2:1;
unsigned DLC3:1;
unsigned RB0:1;
unsigned RB1:1;
unsigned RXRTR:1;
};
struct {
unsigned :6;
unsigned TXRTR:1;
};
} B3DLCbits;
extern volatile far unsigned char B3D0;
extern volatile far union {
struct {
unsigned B3D0:8;
};
struct {
unsigned B3D00:1;
unsigned B3D01:1;
unsigned B3D02:1;
unsigned B3D03:1;
unsigned B3D04:1;
unsigned B3D05:1;
unsigned B3D06:1;
unsigned B3D07:1;
};
} B3D0bits;
extern volatile far unsigned char B3D1;
extern volatile far union {
struct {
unsigned B3D1:8;
};
struct {
unsigned B3D10:1;
unsigned B3D11:1;
unsigned B3D12:1;
unsigned B3D13:1;
unsigned B3D14:1;
unsigned B3D15:1;
unsigned B3D16:1;
unsigned B3D17:1;
};
} B3D1bits;
extern volatile far unsigned char B3D2;
extern volatile far union {
struct {
unsigned B3D2:8;
};
struct {
unsigned B3D20:1;
unsigned B3D21:1;
unsigned B3D22:1;
unsigned B3D23:1;
unsigned B3D24:1;
unsigned B3D25:1;
unsigned B3D26:1;
unsigned B3D27:1;
};
} B3D2bits;
extern volatile far unsigned char B3D3;
extern volatile far union {
struct {
unsigned B3D3:8;
};
struct {
unsigned B3D30:1;
unsigned B3D31:1;
unsigned B3D32:1;
unsigned B3D33:1;
unsigned B3D34:1;
unsigned B3D35:1;
unsigned B3D36:1;
unsigned B3D37:1;
};
} B3D3bits;
extern volatile far unsigned char B3D4;
extern volatile far union {
struct {
unsigned B3D4:8;
};
struct {
unsigned B3D40:1;
unsigned B3D41:1;
unsigned B3D42:1;
unsigned B3D43:1;
unsigned B3D44:1;
unsigned B3D45:1;
unsigned B3D46:1;
unsigned B3D47:1;
};
} B3D4bits;
extern volatile far unsigned char B3D5;
extern volatile far union {
struct {
unsigned B3D5:8;
};
struct {
unsigned B3D50:1;
unsigned B3D51:1;
unsigned B3D52:1;
unsigned B3D53:1;
unsigned B3D54:1;
unsigned B3D55:1;
unsigned B3D56:1;
unsigned B3D57:1;
};
} B3D5bits;
extern volatile far unsigned char B3D6;
extern volatile far union {
struct {
unsigned B3D6:8;
};
struct {
unsigned B3D60:1;
unsigned B3D61:1;
unsigned B3D62:1;
unsigned B3D63:1;
unsigned B3D64:1;
unsigned B3D65:1;
unsigned B3D66:1;
unsigned B3D67:1;
};
} B3D6bits;
extern volatile far unsigned char B3D7;
extern volatile far union {
struct {
unsigned B3D7:8;
};
struct {
unsigned B3D70:1;
unsigned B3D71:1;
unsigned B3D72:1;
unsigned B3D73:1;
unsigned B3D74:1;
unsigned B3D75:1;
unsigned B3D76:1;
unsigned B3D77:1;
};
} B3D7bits;
extern volatile far unsigned char CANSTAT_RO6;
extern volatile far union {
struct {
unsigned EICODE0:1;
unsigned EICODE1_ICODE0:1;
unsigned EICODE2_ICODE1:1;
unsigned EICODE3_ICODE2:1;
unsigned EICODE4:1;
unsigned OPMODE:3;
};
struct {
unsigned :1;
unsigned EICODE1:1;
unsigned EICODE2:1;
unsigned EICODE3:1;
unsigned :1;
unsigned OPMODE0:1;
unsigned OPMODE1:1;
unsigned OPMODE2:1;
};
struct {
unsigned :1;
unsigned ICODE0:1;
unsigned ICODE1:1;
unsigned ICODE2:1;
};
} CANSTAT_RO6bits;
extern volatile far unsigned char CANCON_RO6;
extern volatile far union {
struct {
unsigned FP0:1;
unsigned WIN0_FP1:1;
unsigned WIN1_FP2:1;
unsigned WIN2_FP3:1;
unsigned ABAT:1;
unsigned REQOP:3;
};
struct {
unsigned :1;
unsigned WIN0:1;
unsigned WIN1:1;
unsigned WIN2:1;
};
struct {
unsigned :1;
unsigned FP1:1;
unsigned FP2:1;
unsigned FP3:1;
};
} CANCON_RO6bits;
extern volatile far unsigned char B4CON;
extern volatile far union {
struct {
unsigned FILHIT0_TXPRI0:1;
unsigned FILHIT1_TXPRI1:1;
unsigned FILHIT2_RTREN:1;
unsigned FILHIT3_TXREQ:1;
unsigned FILHIT4_TXERR:1;
unsigned RXRTRRO_TXLARB:1;
unsigned RXM1_TXABT:1;
unsigned RXFUL_TXBIF:1;
};
struct {
unsigned FILHIT0:1;
unsigned FILHIT1:1;
unsigned FILHIT2:1;
unsigned FILHIT3:1;
unsigned FILHIT4:1;
unsigned RXRTRRO:1;
unsigned RXM1:1;
unsigned RXFUL:1;
};
struct {
unsigned TXPRI0:1;
unsigned TXPRI1:1;
unsigned RTREN:1;
unsigned TXREQ:1;
unsigned TXERR:1;
unsigned TXLARB:1;
unsigned TXABT:1;
unsigned TXBIF:1;
};
} B4CONbits;
extern volatile far unsigned char B4SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} B4SIDHbits;
extern volatile far unsigned char B4SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDE:1;
unsigned SRR:1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} B4SIDLbits;
extern volatile far unsigned char B4EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} B4EIDHbits;
extern volatile far unsigned char B4EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} B4EIDLbits;
extern volatile far unsigned char B4DLC;
extern volatile far union {
struct {
unsigned DLC:4;
unsigned RB:2;
unsigned RXRTR_TXRTR:1;
};
struct {
unsigned DLC0:1;
unsigned DLC1:1;
unsigned DLC2:1;
unsigned DLC3:1;
unsigned RB0:1;
unsigned RB1:1;
unsigned RXRTR:1;
};
struct {
unsigned :6;
unsigned TXRTR:1;
};
} B4DLCbits;
extern volatile far unsigned char B4D0;
extern volatile far union {
struct {
unsigned B4D0:8;
};
struct {
unsigned B4D00:1;
unsigned B4D01:1;
unsigned B4D02:1;
unsigned B4D03:1;
unsigned B4D04:1;
unsigned B4D05:1;
unsigned B4D06:1;
unsigned B4D07:1;
};
} B4D0bits;
extern volatile far unsigned char B4D1;
extern volatile far union {
struct {
unsigned B4D1:8;
};
struct {
unsigned B4D10:1;
unsigned B4D11:1;
unsigned B4D12:1;
unsigned B4D13:1;
unsigned B4D14:1;
unsigned B4D15:1;
unsigned B4D16:1;
unsigned B4D17:1;
};
} B4D1bits;
extern volatile far unsigned char B4D2;
extern volatile far union {
struct {
unsigned B4D2:8;
};
struct {
unsigned B4D20:1;
unsigned B4D21:1;
unsigned B4D22:1;
unsigned B4D23:1;
unsigned B4D24:1;
unsigned B4D25:1;
unsigned B4D26:1;
unsigned B4D27:1;
};
} B4D2bits;
extern volatile far unsigned char B4D3;
extern volatile far union {
struct {
unsigned B4D3:8;
};
struct {
unsigned B4D30:1;
unsigned B4D31:1;
unsigned B4D32:1;
unsigned B4D33:1;
unsigned B4D34:1;
unsigned B4D35:1;
unsigned B4D36:1;
unsigned B4D37:1;
};
} B4D3bits;
extern volatile far unsigned char B4D4;
extern volatile far union {
struct {
unsigned B4D4:8;
};
struct {
unsigned B4D40:1;
unsigned B4D41:1;
unsigned B4D42:1;
unsigned B4D43:1;
unsigned B4D44:1;
unsigned B4D45:1;
unsigned B4D46:1;
unsigned B4D47:1;
};
} B4D4bits;
extern volatile far unsigned char B4D5;
extern volatile far union {
struct {
unsigned B4D5:8;
};
struct {
unsigned B4D50:1;
unsigned B4D51:1;
unsigned B4D52:1;
unsigned B4D53:1;
unsigned B4D54:1;
unsigned B4D55:1;
unsigned B4D56:1;
unsigned B4D57:1;
};
} B4D5bits;
extern volatile far unsigned char B4D6;
extern volatile far union {
struct {
unsigned B4D6:8;
};
struct {
unsigned B4D60:1;
unsigned B4D61:1;
unsigned B4D62:1;
unsigned B4D63:1;
unsigned B4D64:1;
unsigned B4D65:1;
unsigned B4D66:1;
unsigned B4D67:1;
};
} B4D6bits;
extern volatile far unsigned char B4D7;
extern volatile far union {
struct {
unsigned B4D7:8;
};
struct {
unsigned B4D70:1;
unsigned B4D71:1;
unsigned B4D72:1;
unsigned B4D73:1;
unsigned B4D74:1;
unsigned B4D75:1;
unsigned B4D76:1;
unsigned B4D77:1;
};
} B4D7bits;
extern volatile far unsigned char CANSTAT_RO5;
extern volatile far union {
struct {
unsigned EICODE0:1;
unsigned EICODE1_ICODE0:1;
unsigned EICODE2_ICODE1:1;
unsigned EICODE3_ICODE2:1;
unsigned EICODE4:1;
unsigned OPMODE:3;
};
struct {
unsigned :1;
unsigned EICODE1:1;
unsigned EICODE2:1;
unsigned EICODE3:1;
unsigned :1;
unsigned OPMODE0:1;
unsigned OPMODE1:1;
unsigned OPMODE2:1;
};
struct {
unsigned :1;
unsigned ICODE0:1;
unsigned ICODE1:1;
unsigned ICODE2:1;
};
} CANSTAT_RO5bits;
extern volatile far unsigned char CANCON_RO5;
extern volatile far union {
struct {
unsigned FP0:1;
unsigned WIN0_FP1:1;
unsigned WIN1_FP2:1;
unsigned WIN2_FP3:1;
unsigned ABAT:1;
unsigned REQOP:3;
};
struct {
unsigned :1;
unsigned WIN0:1;
unsigned WIN1:1;
unsigned WIN2:1;
};
struct {
unsigned :1;
unsigned FP1:1;
unsigned FP2:1;
unsigned FP3:1;
};
} CANCON_RO5bits;
extern volatile far unsigned char B5CON;
extern volatile far union {
struct {
unsigned FILHIT0_TXPRI0:1;
unsigned FILHIT1_TXPRI1:1;
unsigned FILHIT2_RTREN:1;
unsigned FILHIT3_TXREQ:1;
unsigned FILHIT4_TXERR:1;
unsigned RXRTRRO_TXLARB:1;
unsigned RXM1_TXABT:1;
unsigned RXFUL_TXBIF:1;
};
struct {
unsigned FILHIT0:1;
unsigned FILHIT1:1;
unsigned FILHIT2:1;
unsigned FILHIT3:1;
unsigned FILHIT4:1;
unsigned RXRTRRO:1;
unsigned RXM1:1;
unsigned RXFUL:1;
};
struct {
unsigned TXPRI0:1;
unsigned TXPRI1:1;
unsigned RTREN:1;
unsigned TXREQ:1;
unsigned TXERR:1;
unsigned TXLARB:1;
unsigned TXABT:1;
unsigned TXBIF:1;
};
} B5CONbits;
extern volatile far unsigned char B5SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} B5SIDHbits;
extern volatile far unsigned char B5SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDE:1;
unsigned SRR:1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} B5SIDLbits;
extern volatile far unsigned char B5EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} B5EIDHbits;
extern volatile far unsigned char B5EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} B5EIDLbits;
extern volatile far unsigned char B5DLC;
extern volatile far union {
struct {
unsigned DLC:4;
unsigned RB:2;
unsigned RXRTR_TXRTR:1;
};
struct {
unsigned DLC0:1;
unsigned DLC1:1;
unsigned DLC2:1;
unsigned DLC3:1;
unsigned RB0:1;
unsigned RB1:1;
unsigned RXRTR:1;
};
struct {
unsigned :6;
unsigned TXRTR:1;
};
} B5DLCbits;
extern volatile far unsigned char B5D0;
extern volatile far union {
struct {
unsigned B5D0:8;
};
struct {
unsigned B5D00:1;
unsigned B5D01:1;
unsigned B5D02:1;
unsigned B5D03:1;
unsigned B5D04:1;
unsigned B5D05:1;
unsigned B5D06:1;
unsigned B5D07:1;
};
} B5D0bits;
extern volatile far unsigned char B5D1;
extern volatile far union {
struct {
unsigned B5D1:8;
};
struct {
unsigned B5D10:1;
unsigned B5D11:1;
unsigned B5D12:1;
unsigned B5D13:1;
unsigned B5D14:1;
unsigned B5D15:1;
unsigned B5D16:1;
unsigned B5D17:1;
};
} B5D1bits;
extern volatile far unsigned char B5D2;
extern volatile far union {
struct {
unsigned B5D2:8;
};
struct {
unsigned B5D20:1;
unsigned B5D21:1;
unsigned B5D22:1;
unsigned B5D23:1;
unsigned B5D24:1;
unsigned B5D25:1;
unsigned B5D26:1;
unsigned B5D27:1;
};
} B5D2bits;
extern volatile far unsigned char B5D3;
extern volatile far union {
struct {
unsigned B5D3:8;
};
struct {
unsigned B5D30:1;
unsigned B5D31:1;
unsigned B5D32:1;
unsigned B5D33:1;
unsigned B5D34:1;
unsigned B5D35:1;
unsigned B5D36:1;
unsigned B5D37:1;
};
} B5D3bits;
extern volatile far unsigned char B5D4;
extern volatile far union {
struct {
unsigned B5D4:8;
};
struct {
unsigned B5D40:1;
unsigned B5D41:1;
unsigned B5D42:1;
unsigned B5D43:1;
unsigned B5D44:1;
unsigned B5D45:1;
unsigned B5D46:1;
unsigned B5D47:1;
};
} B5D4bits;
extern volatile far unsigned char B5D5;
extern volatile far union {
struct {
unsigned B5D5:8;
};
struct {
unsigned B5D50:1;
unsigned B5D51:1;
unsigned B5D52:1;
unsigned B5D53:1;
unsigned B5D54:1;
unsigned B5D55:1;
unsigned B5D56:1;
unsigned B5D57:1;
};
} B5D5bits;
extern volatile far unsigned char B5D6;
extern volatile far union {
struct {
unsigned B5D6:8;
};
struct {
unsigned B5D60:1;
unsigned B5D61:1;
unsigned B5D62:1;
unsigned B5D63:1;
unsigned B5D64:1;
unsigned B5D65:1;
unsigned B5D66:1;
unsigned B5D67:1;
};
} B5D6bits;
extern volatile far unsigned char B5D7;
extern volatile far union {
struct {
unsigned B5D7:8;
};
struct {
unsigned B5D70:1;
unsigned B5D71:1;
unsigned B5D72:1;
unsigned B5D73:1;
unsigned B5D74:1;
unsigned B5D75:1;
unsigned B5D76:1;
unsigned B5D77:1;
};
} B5D7bits;
extern volatile far unsigned char CANSTAT_RO4;
extern volatile far union {
struct {
unsigned EICODE0:1;
unsigned EICODE1_ICODE0:1;
unsigned EICODE2_ICODE1:1;
unsigned EICODE3_ICODE2:1;
unsigned EICODE4:1;
unsigned OPMODE:3;
};
struct {
unsigned :1;
unsigned EICODE1:1;
unsigned EICODE2:1;
unsigned EICODE3:1;
unsigned :1;
unsigned OPMODE0:1;
unsigned OPMODE1:1;
unsigned OPMODE2:1;
};
struct {
unsigned :1;
unsigned ICODE0:1;
unsigned ICODE1:1;
unsigned ICODE2:1;
};
} CANSTAT_RO4bits;
extern volatile far unsigned char CANCON_RO4;
extern volatile far union {
struct {
unsigned FP0:1;
unsigned WIN0_FP1:1;
unsigned WIN1_FP2:1;
unsigned WIN2_FP3:1;
unsigned ABAT:1;
unsigned REQOP:3;
};
struct {
unsigned :1;
unsigned WIN0:1;
unsigned WIN1:1;
unsigned WIN2:1;
};
struct {
unsigned :1;
unsigned FP1:1;
unsigned FP2:1;
unsigned FP3:1;
};
} CANCON_RO4bits;
extern volatile far unsigned char RXF0SIDH;
extern volatile far union {
struct {
unsigned SID:8;
};
struct {
unsigned SID3:1;
unsigned SID4:1;
unsigned SID5:1;
unsigned SID6:1;
unsigned SID7:1;
unsigned SID8:1;
unsigned SID9:1;
unsigned SID10:1;
};
} RXF0SIDHbits;
extern volatile far unsigned char RXF0SIDL;
extern volatile far union {
struct {
unsigned EID:2;
unsigned :1;
unsigned EXIDEN:1;
unsigned :1;
unsigned SID:3;
};
struct {
unsigned EID16:1;
unsigned EID17:1;
unsigned :3;
unsigned SID0:1;
unsigned SID1:1;
unsigned SID2:1;
};
} RXF0SIDLbits;
extern volatile far unsigned char RXF0EIDH;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID8:1;
unsigned EID9:1;
unsigned EID10:1;
unsigned EID11:1;
unsigned EID12:1;
unsigned EID13:1;
unsigned EID14:1;
unsigned EID15:1;
};
} RXF0EIDHbits;
extern volatile far unsigned char RXF0EIDL;
extern volatile far union {
struct {
unsigned EID:8;
};
struct {
unsigned EID0:1;
unsigned EID1:1;
unsigned EID2:1;
unsigned EID3:1;
unsigned EID4:1;
unsigned EID5:1;
unsigned EID6:1;
unsigned EID7:1;
};
} RXF0EIDLbits;
extern volatile far unsigned char RXF1SIDH;
extern