20#ifndef MCP2515_PARAMS_H
21#define MCP2515_PARAMS_H
36#ifndef MCP2515_PARAM_SPI
37#define MCP2515_PARAM_SPI SPI_DEV(0)
40#ifndef MCP2515_PARAM_SPI_MODE
41#define MCP2515_PARAM_SPI_MODE SPI_MODE_0
44#ifndef MCP2515_PARAM_SPI_CLK
45#define MCP2515_PARAM_SPI_CLK SPI_CLK_10MHZ
48#ifndef MCP2515_PARAM_CS
49#define MCP2515_PARAM_CS GPIO_PIN(1, 9)
52#ifndef MCP2515_PARAM_RST
53#define MCP2515_PARAM_RST GPIO_UNDEF
56#ifndef MCP2515_PARAM_INT
57#define MCP2515_PARAM_INT GPIO_PIN(1, 8)
60#ifndef MCP2515_PARAM_CLK
61#define MCP2515_PARAM_CLK (8000000ul)
65#define MCP2515_DEFAULT_CONFIG \
67 .spi = MCP2515_PARAM_SPI, \
68 .spi_mode = MCP2515_PARAM_SPI_MODE, \
69 .spi_clk =MCP2515_PARAM_SPI_CLK, \
70 .cs_pin = MCP2515_PARAM_CS, \
71 .rst_pin = MCP2515_PARAM_RST, \
72 .int_pin = MCP2515_PARAM_INT, \
73 .clk = MCP2515_PARAM_CLK, \
81 MCP2515_DEFAULT_CONFIG
89 .
name =
"can_mcp2515_0",
Definition of the implementation of the CAN controller driver.
static const candev_params_t candev_mcp2515_params[]
set candev parameters
MCP2515 configuration descriptor.
Parameters to initialize a candev.
const char * name
candev name to set
Definitions of CAN device interface.