
struct CanMsg canAry[30];
/* …
Initialize the CAN packages in the canAry[30]
*/
result = sendCanMessages( canAry, 30 );
if( result != 0)
fprintf( stderr, “Send CAN package error!\n”);
5.
Syntax:
i32 getCanMessage( struct CanMsg *buffer, u8 count )
Description:
This function receives CAN packets from the CAN bus subsystem.
Parameters:
This function stores received CAN packages sequentially at an array of type ‘CanMsg’.
The number of packages to receive is indicated by the parameter ‘count’.
Return Value:
If this function receives the CAN packet successfully, it returns 0, any other returned
value stands for error.
Here is an example:
If the array ‘canAry[]’ of type ‘CanMsg’ has been declared and allocated. The code listed below will
receive 30 CAN packages from the CAN bus subsystem and stores the packages in the ‘canAry[]’.
unsigned int result = 0;
struct CanMsg canAry[30];
result = getCanMessage( canAry, 30 );
if( result != 0)
fprintf( stderr, “Fail to receive CAN packets!\n”);
6.
Syntax:
i32 getCanMask(struct CanMask *mask)
Description:
This function gets the current setting of the acceptance masks. Masks are used to
determine which bits in the ID field of the CAN packet are examined with the filters. There are two
acceptance masks (mask0 and mask1) and six acceptance filters (filter0 ~ filter5) in the CAN Bus
53
Содержание AR-B6005
Страница 1: ...1 AR B6005 Board User Manual ...
Страница 8: ...2 2 Locations of I O ports Jumper settings definition 8 ...
Страница 20: ...3 3 Superio Setup 20 ...
Страница 23: ...3 5 Boot setup Choice boot priority 23 ...
Страница 34: ...Driver Page This is the Driver Installation Page 34 ...
Страница 35: ...Click the icon all the drivers will be selected 35 ...
Страница 36: ...Click the icon all selected items will be cleared 36 ...
Страница 38: ...Please click Yes to restart the system 38 ...
Страница 43: ...Documents Page Double click on one of the items to open the manual 43 ...
Страница 46: ... When the screen shows this information press Enter to continue installing the operating system 46 ...