25#ifndef CANDEV_MCP2515_H
26#define CANDEV_MCP2515_H
43#ifndef CANDEV_MCP2515_DEFAULT_BITRATE
44#define CANDEV_MCP2515_DEFAULT_BITRATE 500000
50#ifndef CANDEV_MCP2515_DEFAULT_SPT
51#define CANDEV_MCP2515_DEFAULT_SPT 875
57#define MCP2515_TX_MAILBOXES 3
79#define MCP2515_RX_MAILBOXES 2
80#define MCP2515_FILTERS_MB0 2
81#define MCP2515_FILTERS_MB1 4
82#define MCP2515_FILTERS (MCP2515_FILTERS_MB0 + MCP2515_FILTERS_MB1)
114 uint32_t
masks[MCP2515_RX_MAILBOXES];
Definitions for low-level CAN driver interface.
Low-level GPIO peripheral driver interface definitions.
#define MCP2515_TX_MAILBOXES
Number of transmit mailboxes.
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.
struct candev_mcp2515_conf candev_mcp2515_conf_t
MCP2515 configuration descriptor.
uint32_t canid_t
Controller Area Network Identifier structure.
spi_mode_t
Support SPI modes.
Mutex for thread synchronization.
Low-level SPI peripheral driver interface definition.
Controller Area Network frame.
MCP2515 configuration descriptor.
gpio_t cs_pin
Slave select pin.
uint32_t clk
External clock frequency.
spi_clk_t spi_clk
SPI clock speed.
gpio_t int_pin
Interrupt pin.
spi_mode_t spi_mode
SPI mode.
MCP2515 device descriptor.
struct can_frame rx_buf[MCP2515_RX_MAILBOXES]
rx mailboxes local copy
canid_t filter_ids[MCP2515_RX_MAILBOXES][MCP2515_FILTERS_MB1]
filters list
candev_t candev
candev driver
int wakeup_src
wakeup source
const candev_mcp2515_conf_t * conf
driver configuration
const struct can_frame * tx_mailbox[MCP2515_TX_MAILBOXES]
tx mailboxes local copy
uint32_t masks[MCP2515_RX_MAILBOXES]
masks list
Structure to hold driver state.