mirror of
https://github.com/Seeed-Studio/Seeed_Arduino_CAN.git
synced 2026-07-28 04:06:45 +00:00
Clear up Arduino examples for all Arduino boards
This commit is contained in:
+13
-4
@@ -12,16 +12,25 @@
|
||||
#endif
|
||||
|
||||
|
||||
//#define CAN_2515
|
||||
#define CAN_2518FD
|
||||
#define CAN_2515
|
||||
// #define CAN_2518FD
|
||||
|
||||
// the cs pin of the version after v1.1 is default to D9
|
||||
// v0.9b and v1.0 is default D10
|
||||
|
||||
// Set SPI CS Pin according to your hardware
|
||||
// For Wio Terminal w/ MCP2518FD RPi Hat:
|
||||
// Channel 0 SPI_CS Pin: BCM 8
|
||||
// Channel 1 SPI_CS Pin: BCM 7
|
||||
// Interupt Pin: BCM25
|
||||
// *****************************************
|
||||
// For Arduino MCP2515 Hat:
|
||||
// SPI_CS Pin: D9
|
||||
|
||||
#ifdef CAN_2518FD
|
||||
#include "mcp2518fd_can.h"
|
||||
const int SPI_CS_PIN = BCM8;
|
||||
const int CAN_INT_PIN = BCM25;
|
||||
const int SPI_CS_PIN = 9;
|
||||
const int CAN_INT_PIN = 2;
|
||||
mcp2518fd CAN(SPI_CS_PIN); // Set CS pin
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user