![SeeedStudio CAN-BUS Shield V1.2 Скачать руководство пользователя страница 11](http://html.mh-extra.com/html/seeedstudio/can-bus-shield-v1-2/can-bus-shield-v1-2_manual_1232979011.webp)
•
len
represents the length of this frame.
•
data_buf
is the content of this message.
For example, In the ‘send’ example, we have:
unsigned
char
stmp[8] = {0, 1, 2, 3, 4, 5, 6, 7};
CAN.sendMsgBuf(0x00, 0, 8, stmp);
//send out the message 'stmp' to the bus and tell other devices
this is a standard frame from 0x00.
6. Receive Data
The following function is used to receive data on the ‘receive’ node:
CAN.readMsgBuf(
unsigned
char
len,
unsigned
char
buf);
In conditions that masks and filters have been set. This function can only get frames
that meet the requirements of masks and filters.
•
len
represents the data length.
•
buf
is where you store the data.
Generate a New BaudRate
We had provided many frequently-used baud rate, as below:
#define CAN_5KBPS 1
#define CAN_10KBPS 2
#define CAN_20KBPS 3
#define CAN_25KBPS 4
#define CAN_31K25BPS 5
#define CAN_33KBPS 6
#define CAN_40KBPS 7
#define CAN_50KBPS 8
#define CAN_80KBPS 9
#define CAN_83K3BPS 10
#define CAN_95KBPS 11
#define CAN_100KBPS 12