Skip to content
Permalink
Browse files

samples: can: Added project configuration for MCP2515

Project configuration to run the CAN sample with the MCP2515 attached
via SPI as the CAN controller.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
  • Loading branch information...
karstenkoenig authored and nashif committed Feb 18, 2019
1 parent 4f77610 commit bf52bfea90672dff60415313216327e9e9c42957
Showing with 24 additions and 0 deletions.
  1. +18 −0 samples/drivers/CAN/mcp2515-dts.overlay
  2. +6 −0 samples/drivers/CAN/prj.conf.mcp2515
@@ -0,0 +1,18 @@
/*
* Copyright (c) 2019 Karsten Koenig
*
* SPDX-License-Identifier: Apache-2.0
*/

&spi1 {
status = "ok";
mcp2515@0 {
compatible = "microchip,mcp2515";
spi-port-name = "SPI_1";
spi-max-frequency = <1000000>;
int-gpios = <&gpiob 4 GPIO_INT_ACTIVE_LOW>;
status = "ok";
label = "CAN_1";
reg = <0>;
};
};
@@ -0,0 +1,6 @@
# CAN + MCP2515 config
CONFIG_SPI=y
CONFIG_CAN=y
CONFIG_CAN_INIT_PRIORITY=80
CONFIG_CAN_1=y
CONFIG_CAN_MCP2515=y

0 comments on commit bf52bfe

Please sign in to comment.
You can’t perform that action at this time.