ADLINK PCI-7841/cPCI-7841 User Manual

Page 25

Advertising
background image

Function Reference

17

Members

mode:

0 means using 11-bit in CAN-ID field

1 means using 29-bit in CAN-ID field.

accCode:Acceptance Code for CAN controller.

accMask:Acceptance Mask for CAN controller.

baudrate:Baud rate setting for the CAN controller.

CanPortConfig(), CanGetPortStatus(), and PORT_STATUS struc-
ture

PORT_STATUS structure define

The PORT_STATUS structure defines the status register and
PORT_STRUCT of CAN port. It is used by the CanGetPortStatus()
functions.

typedef struct _tagPORT_STATUS
{
PORT_STRUCT port;
PORT_REG status;
}PORT_STATUS;
Members

port:

PORT_STRUCT data

status:

status is the status register

mapping of CAN controller.

typedef union _tagPORT_REG
{

struct PORTREG_BIT bit;

unsigned short reg;

}PORT_REG;
struct PORTREG_BIT
{
unsigned short RxBuffer: 1;
unsigned short DataOverrun: 1;
unsigned short TxBuffer: 1;

Value Baudrate

0

125 Kbps

1

250 Kbps

2

500 Kbps

3

1M bps

Advertising