pub struct CanFilter<BIT: BitMode, MODE: FilterMode> {
pub bank: usize,
pub id_value: u32,
pub id_mask: u32,
pub bit_mode: BIT,
pub mode: MODE,
}Expand description
See table 24-1 of the reference manual for more details on filtering and modes. Each filter is applied for only one bank and for one register on it bank
Fields§
§bank: usizeFilter bank number, 0-27
id_value: u32Values for STID:EXID:IDE:RTR:0 from msb to lsb to be matched with an incoming message’s values.
In IdList mode, value should be a 32-bit id or two 16-bit ids.
id_mask: u32Bit mask to be applied to incoming message before comparing it to a predefined value.
In IdList mode, this is used in the same way as id_value is.
bit_mode: BIT§mode: MODEImplementations§
Source§impl CanFilter<Bit32Mode, ListMode>
impl CanFilter<Bit32Mode, ListMode>
Sourcepub fn new_id_list() -> Self
pub fn new_id_list() -> Self
Create a filter to configure id list
Source§impl CanFilter<Bit32Mode, MaskMode>
impl CanFilter<Bit32Mode, MaskMode>
Sourcepub fn accept_all() -> Self
pub fn accept_all() -> Self
Creates a filter that accepts all frames
pub fn new_id_mask() -> Self
Trait Implementations§
Source§impl From<[(StandardId, FilterOptions); 4]> for CanFilter<Bit16Mode, ListMode>
impl From<[(StandardId, FilterOptions); 4]> for CanFilter<Bit16Mode, ListMode>
Source§fn from(value: [(StandardId, FilterOptions); 4]) -> Self
fn from(value: [(StandardId, FilterOptions); 4]) -> Self
Converts to this type from the input type.