mcp2515_params.h File Reference

Parameters for the CAN driver implementation. More...

Detailed Description

Parameters for the CAN driver implementation.

Author
Vincent Dupont vince.nosp@m.nt@o.nosp@m.takey.nosp@m.s.co.nosp@m.m
Wouter Symons wosym.nosp@m.@air.nosp@m.sante.nosp@m.lmo..nosp@m.com

Definition in file mcp2515_params.h.

#include "can/device.h"
#include "candev_mcp2515.h"
#include "board.h"
+ Include dependency graph for mcp2515_params.h:

Go to the source code of this file.

Set default configuration parameters for the MCP2515

#define MCP2515_PARAM_SPI   SPI_DEV(0)
 
#define MCP2515_PARAM_SPI_MODE   SPI_MODE_0
 
#define MCP2515_PARAM_SPI_CLK   SPI_CLK_10MHZ
 
#define MCP2515_PARAM_CS   GPIO_PIN(1, 9)
 
#define MCP2515_PARAM_RST   GPIO_PIN(0, 0)
 
#define MCP2515_PARAM_INT   GPIO_PIN(1, 8)
 
#define MCP2515_PARAM_CLK   (8000000ul)
 External clock frequency.
 
#define MCP2515_DEFAULT_CONFIG
 
static const candev_mcp2515_conf_t candev_mcp2515_conf []
 @ More...
 
static const candev_params_t candev_mcp2515_params []
 set candev parameters More...
 

Macro Definition Documentation

◆ MCP2515_DEFAULT_CONFIG

#define MCP2515_DEFAULT_CONFIG
Value:
{ \
.spi = MCP2515_PARAM_SPI, \
.spi_mode = MCP2515_PARAM_SPI_MODE, \
.spi_clk =MCP2515_PARAM_SPI_CLK, \
.cs_pin = MCP2515_PARAM_CS, \
.rst_pin = MCP2515_PARAM_RST, \
.int_pin = MCP2515_PARAM_INT, \
}

Definition at line 66 of file mcp2515_params.h.

Variable Documentation

◆ candev_mcp2515_conf

Initial value:
= {
MCP2515_DEFAULT_CONFIG
}

@

Set default configuration

Definition at line 81 of file mcp2515_params.h.

◆ candev_mcp2515_params

const candev_params_t candev_mcp2515_params[]
static
Initial value:
= {
{
.name = "can_mcp2515_0",
},
}

set candev parameters

Definition at line 88 of file mcp2515_params.h.

MCP2515_PARAM_CLK
#define MCP2515_PARAM_CLK
External clock frequency.
Definition: mcp2515_params.h:62