Go to the documentation of this file.
25 #ifndef CANDEV_MCP2515_H
26 #define CANDEV_MCP2515_H
44 #ifndef CANDEV_MCP2515_DEFAULT_BITRATE
45 #define CANDEV_MCP2515_DEFAULT_BITRATE 125000
51 #ifndef CANDEV_MCP2515_DEFAULT_SPT
52 #define CANDEV_MCP2515_DEFAULT_SPT 875
58 #define MCP2515_TX_MAILBOXES 3
80 #define MCP2515_RX_MAILBOXES 2
81 #define MCP2515_FILTERS_MB0 2
82 #define MCP2515_FILTERS_MB1 4
83 #define MCP2515_FILTERS (MCP2515_FILTERS_MB0 + MCP2515_FILTERS_MB1)
115 uint32_t
masks[MCP2515_RX_MAILBOXES];
struct candev_mcp2515_conf candev_mcp2515_conf_t
MCP2515 configuration descriptor.
Structure to hold driver state.
Low-level SPI peripheral driver interface definition.
gpio_t cs_pin
Slave select pin.
const candev_mcp2515_conf_t * conf
driver configuration
const struct can_frame * tx_mailbox[MCP2515_TX_MAILBOXES]
tx mailboxes local copy
gpio_t int_pin
Interrupt pin.
spi_mode_t
Available SPI modes, defining the configuration of clock polarity and clock phase.
uint32_t masks[MCP2515_RX_MAILBOXES]
masks list
spi_clk_t spi_clk
SPI clock speed.
candev_t candev
candev driver
spi_clk_t
Available SPI clock speeds.
Controller Area Network frame.
void candev_mcp2515_init(candev_mcp2515_t *dev, const candev_mcp2515_conf_t *conf)
Initialize a mcp2515 device by assigning a timing and an SPI configuration conf.
Definitions for low-level CAN driver interface.
struct can_frame rx_buf[MCP2515_RX_MAILBOXES]
rx mailboxes local copy
int wakeup_src
wakeup source
Mutex for thread synchronization.
MCP2515 configuration descriptor.
canid_t filter_ids[MCP2515_RX_MAILBOXES][MCP2515_FILTERS_MB1]
filters list
Low-level GPIO peripheral driver interface definitions.
spi_mode_t spi_mode
SPI mode.
MCP2515 device descriptor.
uint32_t clk
External clock frequency.
#define MCP2515_TX_MAILBOXES
Number of transmit mailboxes.
xtimer interface definitions
unsigned int spi_t
Default type for SPI devices.
uint32_t canid_t
Controller Area Network Identifier structure.