beautypg.com

Acrosser AR-B104D User Manual

Page 27

background image

AR-B104D Software Programming Guide

23

2.5 CAN-bus

2.5.1 CanSendMessages

Description

Send messages via CAN-bus interface.

Syntax

XXX_CanSendMessages (i16 CardNum, canmsg_t* Buffer, u8 Count)

Argument

CardNum: The card number of AR-B104D. Range from 1~4.

Buffer: The memory buffer which stores the messages to send.

Count: The number of messages to send in the buffer.

2.5.2 CanGetMessages

Description

Get messages via CAN-bus interface.

Syntax

XXX_CanGetMessages (i16 CardNum, canmsg_t* Buffer, u8 Count)

Argument

CardNum: The card number of AR-B104D. Range from 1~4.

Buffer: The memory buffer which stores the received messages.

Count: The number of messages to store in the buffer.

2.5.3 CanConfig

Description

Set the baud rate of CAN-bus interface.

Syntax

XXX_CanConfig (i16 CardNum, i32 Baud)

Argument

CardNum: The card number of AR-B104D. Range from 1~4.

Baud: The baud rate to set. The CAN-bus interface on AR-B104D

supports 10, 20, 50, 100, 125, 250, 500, 800, 1000 as the input and the

unit is kbps. The maximum acceptable baud rate is therefore 1Mbps.