![background image](http://html1.mh-extra.com/html/icp-das-usa/mpac-7186exd-can/mpac-7186exd-can_user-manual_3728838022.webp)
I-7188XBD-CAN/μPAC-7186EXD-CAN user manual (ver.1.0.3, May/09/2014)
22
3.1.2 XC100Init / XC100Init_Listen
Description:
XC100Init():
Initialize the software buffer and XC100 hardware, which includes
CAN controller, L1 LED, L2 LED, L3 LED and then let CAN Bus into
operation mode.
XC100Init_Listen():
Initialize the software buffer and XC100 hardware, which includes
CAN controller, L1 LED, L2 LED, L3 LED and then let CAN Bus into
listen only mode. This function is supported by XC100 library v1.80 or
later.
Syntax:
int XC100Init( int TypeOf7188, char IntMode,
unsigned long CANBaud, char BT0,
char BT1, unsigned long AccCode,
unsigned long AccMask)
int XC100Init_Listen( int TypeOf7188, char IntMode,
unsigned long CANBaud, char BT0,
char BT1, unsigned long AccCode,
unsigned long AccMask)
Parameter:
TypeOf7188: define what kind of module you use.
value TypeOf7188
0
For I-7188XBD-CAN
1
For
μPAC-7186EXD-CAN
IntMode: Set the CAN controller interrupt mode. Each bit of IntMode
parameters indicates different function shown as follows.
Interrupt Type
Value of IntMode
Receive Interrupt Enable
0x01
Transmit Interrupt Enable
0x02
Error Warning Interrupt Enable
0x04
Data Overrun Interrupt Enable
0x08
Wake-up Interrupt Enable
0x10
Error Passive Interrupt Enable
0x20
Arbitration Lost Interrupt Enable
0x40
Bus Error Interrupt Enable
0x80