piMCP2515
A library for controlling an MCP2515 on the Raspberry Pi and Raspberry Pi Pico
Loading...
Searching...
No Matches
Filter Functions

These functions handle filter functionality. More...

Functions

int mcp2515_filter (pi_mcp2515_t *pi_mcp2515, const mcp2515_rxf_t filter, const uint32_t id, const bool extended_id)
 Set one of the filters specified by its register.
int mcp2515_filter_mask (pi_mcp2515_t *pi_mcp2515, const mcp2515_rxm_t filter_mask, const uint32_t id_mask, const bool extended_id)
 Set the filter mask. The MCP2515 must be in config mode to use this (see mcp2515_reqop/mcp2515_reqop_get).
int mcp2515_filter_enable (pi_mcp2515_t *pi_mcp2515, const bool enable)
int mcp2515_filter_enable_rxb (pi_mcp2515_t *pi_mcp2515, const mcp2515_rxb_t index, const bool enable)

Detailed Description

These functions handle filter functionality.

Function Documentation

◆ mcp2515_filter()

int mcp2515_filter ( pi_mcp2515_t * pi_mcp2515,
const mcp2515_rxf_t filter,
const uint32_t id,
const bool extended_id )

Set one of the filters specified by its register.

The MCP2515 must be in config mode to use this (see mcp2515_reqop and mcp2515_reqop_get).

Parameters
pi_mcp2515the piMCP2515 handle.
filterthe filter to configure.
id
extended_id
Returns
zero if success, otherwise non-zero.

◆ mcp2515_filter_mask()

int mcp2515_filter_mask ( pi_mcp2515_t * pi_mcp2515,
const mcp2515_rxm_t filter_mask,
const uint32_t id_mask,
const bool extended_id )

Set the filter mask. The MCP2515 must be in config mode to use this (see mcp2515_reqop/mcp2515_reqop_get).

Parameters
pi_mcp2515the piMCP2515 handle.
filter_maskthe filter mask register to use.
id_maskthe ID mask to use.
extended_idif the ID is extended.
Returns
zero if success, otherwise non-zero.