3 api list and descriptions, 1 can bus, 3 api list and descriptions 6.3.1 can bus – Acrosser AR-B6051 User Manual
Page 46

6.3 API List and Descriptions
6.3.1 CAN Bus
1. Syntax:
i32 getCanFwVer(PicInfo *ver)
Descriptions: This function gets the version information of the CAN Bus firmware.
Parameters: The definition of struct ‘PicInfo’ is:
struct PicInfo {
u8 info[12];
}
This API returns the version information and store the information in the memory which is pointed at
by the pointer ‘ver’.
Return Value: If this function gets the version information successfully, it returns 0, any other
returned value stands for error.
2. Syntax:
i32 getCanBaudRate(u8 *baud)
Descriptions: This function gets the current setting of the Baud Rate of the CAN Bus. This function
gets an ‘unsigned char’ to represent the Baud Rate. Here is the
table for the Baud Rate:
Unsigned Char Baud Rate
1
10K
2
20K
3
50K
4
100K
5
125K
6
250K
7
500K
8
800K
9
1000K
46