
9.
Syntax:
i32 setCanFilter(struct CanFilter *varFilter)
Description:
This function sets the bit pattern to the filter. By indicating the ‘filterType’ field in the
‘varFilter’ variable, the bit pattern in the ‘filter’ field will be taken as an ‘Standard ID’ filter or
‘Extended ID’ filter.
struct CanFilter {
u8
filterId; // There are six filters so the filterId = 0 ~ 5
u8
filterType; // filterType = STD_ID or filterType = EXT_ID
u32
filter;
}
If a filter is configured as a ‘Standard ID’ filter, only bit18 ~ bit28 in the mask take effect when
filtering the CAN packet.
Parameters:
This function takes a pointer to a variable of type ‘CanFilter’ as the parameter. Users set
up the ‘filterId’. There are six filters so the ‘filterId’ could be 0 ~ 5. Filter0 and filter1 are associated
with mask0. Filter2 ~ filter5 are associated with mask1.
By setting up ‘filterType’, users indicate the type of the filter. Filter type could be ‘STD_ID’ or
‘EXT_ID’.
Depending on the filter type, the ‘filter’ field in the CanFilter variable could be 0x0 ~ 0x7FF (11 bits)
when filter type is ‘STD_ID’. If the filter type is ‘EXT_ID’, the ‘filter’ field in the CanFilter variable
could be 0x0 ~ 0x1FFFFFFF (29 bits).
For example:
struct CanFilter varFilter;
i32 result;
varFilter.filterId = 3;
varFilter.filterType = STD_ID;
varFilter.filter = 0x555;
56
Summary of Contents for AR-B6005
Page 1: ...1 AR B6005 Board User Manual ...
Page 8: ...2 2 Locations of I O ports Jumper settings definition 8 ...
Page 20: ...3 3 Superio Setup 20 ...
Page 23: ...3 5 Boot setup Choice boot priority 23 ...
Page 34: ...Driver Page This is the Driver Installation Page 34 ...
Page 35: ...Click the icon all the drivers will be selected 35 ...
Page 36: ...Click the icon all selected items will be cleared 36 ...
Page 38: ...Please click Yes to restart the system 38 ...
Page 43: ...Documents Page Double click on one of the items to open the manual 43 ...