From ecba384df24ec9831c1c49fc1230862b0d62cae9 Mon Sep 17 00:00:00 2001 From: garned Date: Sat, 4 Dec 2021 19:45:19 +0100 Subject: [PATCH 1/9] Update README.md --- README.md | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 5723c97..f4f68d8 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,12 @@ -# Arduino CAN +# Arduino CAN (ESP32 only) -[![Build Status](https://travis-ci.org/sandeepmistry/arduino-CAN.svg?branch=master)](https://travis-ci.org/sandeepmistry/arduino-CAN) -An Arduino library for sending and receiving data using CAN bus. -## Compatible Hardware +An Arduino ESP32 library for sending and receiving data using CAN bus. -* [Microchip MCP2515](http://www.microchip.com/wwwproducts/en/en010406) based boards/shields - * [Arduino MKR CAN shield](https://store.arduino.cc/arduino-mkr-can-shield) +## Compatible Hardware * [Espressif ESP32](http://espressif.com/en/products/hardware/esp32/overview)'s built-in [SJA1000](https://www.nxp.com/products/analog/interfaces/in-vehicle-network/can-transceiver-and-controllers/stand-alone-can-controller:SJA1000T) compatible CAN controller with an external 3.3V CAN transceiver -### Microchip MCP2515 wiring - -| Microchip MCP2515 | Arduino | -| :---------------: | :-----: | -| VCC | 5V | -| GND | GND | -| SCK | SCK | -| SO | MISO | -| SI | MOSI | -| CS | 10 | -| INT | 2 | - - -`CS` and `INT` pins can be changed by using `CAN.setPins(cs, irq)`. `INT` pin is optional, it is only needed for receive callback mode. If `INT` pin is used, it **must** be interrupt capable via [`attachInterrupt(...)`](https://www.arduino.cc/en/Reference/AttachInterrupt). - -**NOTE**: Logic level converters must be used for boards which operate at 3.3V. - ### Espressif ESP32 wiring Requires an external 3.3V CAN transceiver, such as a [TI SN65HVD230](http://www.ti.com/product/SN65HVD230). @@ -64,7 +44,6 @@ See [API.md](API.md). See [examples](examples) folder. -For OBD-II examples, checkout the [arduino-OBD2](https://github.com/sandeepmistry/arduino-OBD2) library's [examples](https://github.com/sandeepmistry/arduino-OBD2/examples). ## License From 0f747b5e45745a4396a6cec6d6a6cb2bbba36725 Mon Sep 17 00:00:00 2001 From: garned Date: Sat, 4 Dec 2021 19:47:23 +0100 Subject: [PATCH 2/9] Update CAN.h --- src/CAN.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/CAN.h b/src/CAN.h index d8edc06..809c48e 100644 --- a/src/CAN.h +++ b/src/CAN.h @@ -4,10 +4,6 @@ #ifndef CAN_H #define CAN_H -#ifdef ARDUINO_ARCH_ESP32 #include "ESP32SJA1000.h" -#else -#include "MCP2515.h" -#endif #endif From f588be1c2b6df98c4379b75c4b707b3ab37955f9 Mon Sep 17 00:00:00 2001 From: garned Date: Sat, 4 Dec 2021 19:48:47 +0100 Subject: [PATCH 3/9] Delete MCP2515.cpp --- src/MCP2515.cpp | 495 ------------------------------------------------ 1 file changed, 495 deletions(-) delete mode 100644 src/MCP2515.cpp diff --git a/src/MCP2515.cpp b/src/MCP2515.cpp deleted file mode 100644 index aa46051..0000000 --- a/src/MCP2515.cpp +++ /dev/null @@ -1,495 +0,0 @@ -// Copyright (c) Sandeep Mistry. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -#ifndef ARDUINO_ARCH_ESP32 - -#include "MCP2515.h" - -#define REG_BFPCTRL 0x0c -#define REG_TXRTSCTRL 0x0d - -#define REG_CANCTRL 0x0f - -#define REG_CNF3 0x28 -#define REG_CNF2 0x29 -#define REG_CNF1 0x2a - -#define REG_CANINTE 0x2b -#define REG_CANINTF 0x2c - -#define FLAG_RXnIE(n) (0x01 << n) -#define FLAG_RXnIF(n) (0x01 << n) -#define FLAG_TXnIF(n) (0x04 << n) - -#define REG_RXFnSIDH(n) (0x00 + (n * 4)) -#define REG_RXFnSIDL(n) (0x01 + (n * 4)) -#define REG_RXFnEID8(n) (0x02 + (n * 4)) -#define REG_RXFnEID0(n) (0x03 + (n * 4)) - -#define REG_RXMnSIDH(n) (0x20 + (n * 0x04)) -#define REG_RXMnSIDL(n) (0x21 + (n * 0x04)) -#define REG_RXMnEID8(n) (0x22 + (n * 0x04)) -#define REG_RXMnEID0(n) (0x23 + (n * 0x04)) - -#define REG_TXBnCTRL(n) (0x30 + (n * 0x10)) -#define REG_TXBnSIDH(n) (0x31 + (n * 0x10)) -#define REG_TXBnSIDL(n) (0x32 + (n * 0x10)) -#define REG_TXBnEID8(n) (0x33 + (n * 0x10)) -#define REG_TXBnEID0(n) (0x34 + (n * 0x10)) -#define REG_TXBnDLC(n) (0x35 + (n * 0x10)) -#define REG_TXBnD0(n) (0x36 + (n * 0x10)) - -#define REG_RXBnCTRL(n) (0x60 + (n * 0x10)) -#define REG_RXBnSIDH(n) (0x61 + (n * 0x10)) -#define REG_RXBnSIDL(n) (0x62 + (n * 0x10)) -#define REG_RXBnEID8(n) (0x63 + (n * 0x10)) -#define REG_RXBnEID0(n) (0x64 + (n * 0x10)) -#define REG_RXBnDLC(n) (0x65 + (n * 0x10)) -#define REG_RXBnD0(n) (0x66 + (n * 0x10)) - -#define FLAG_IDE 0x08 -#define FLAG_SRR 0x10 -#define FLAG_RTR 0x40 -#define FLAG_EXIDE 0x08 - -#define FLAG_RXM0 0x20 -#define FLAG_RXM1 0x40 - - -MCP2515Class::MCP2515Class() : - CANControllerClass(), - _spiSettings(10E6, MSBFIRST, SPI_MODE0), - _csPin(MCP2515_DEFAULT_CS_PIN), - _intPin(MCP2515_DEFAULT_INT_PIN), - _clockFrequency(MCP2515_DEFAULT_CLOCK_FREQUENCY) -{ -} - -MCP2515Class::~MCP2515Class() -{ -} - -int MCP2515Class::begin(long baudRate) -{ - CANControllerClass::begin(baudRate); - - pinMode(_csPin, OUTPUT); - - // start SPI - SPI.begin(); - - reset(); - - writeRegister(REG_CANCTRL, 0x80); - if (readRegister(REG_CANCTRL) != 0x80) { - return 0; - } - - const struct { - long clockFrequency; - long baudRate; - uint8_t cnf[3]; - } CNF_MAPPER[] = { - { (long)8E6, (long)1000E3, { 0x00, 0x80, 0x00 } }, - { (long)8E6, (long)500E3, { 0x00, 0x90, 0x02 } }, - { (long)8E6, (long)250E3, { 0x00, 0xb1, 0x05 } }, - { (long)8E6, (long)200E3, { 0x00, 0xb4, 0x06 } }, - { (long)8E6, (long)125E3, { 0x01, 0xb1, 0x05 } }, - { (long)8E6, (long)100E3, { 0x01, 0xb4, 0x06 } }, - { (long)8E6, (long)80E3, { 0x01, 0xbf, 0x07 } }, - { (long)8E6, (long)50E3, { 0x03, 0xb4, 0x06 } }, - { (long)8E6, (long)40E3, { 0x03, 0xbf, 0x07 } }, - { (long)8E6, (long)20E3, { 0x07, 0xbf, 0x07 } }, - { (long)8E6, (long)10E3, { 0x0f, 0xbf, 0x07 } }, - { (long)8E6, (long)5E3, { 0x1f, 0xbf, 0x07 } }, - - { (long)16E6, (long)1000E3, { 0x00, 0xd0, 0x82 } }, - { (long)16E6, (long)500E3, { 0x00, 0xf0, 0x86 } }, - { (long)16E6, (long)250E3, { 0x41, 0xf1, 0x85 } }, - { (long)16E6, (long)200E3, { 0x01, 0xfa, 0x87 } }, - { (long)16E6, (long)125E3, { 0x03, 0xf0, 0x86 } }, - { (long)16E6, (long)100E3, { 0x03, 0xfa, 0x87 } }, - { (long)16E6, (long)80E3, { 0x03, 0xff, 0x87 } }, - { (long)16E6, (long)50E3, { 0x07, 0xfa, 0x87 } }, - { (long)16E6, (long)40E3, { 0x07, 0xff, 0x87 } }, - { (long)16E6, (long)20E3, { 0x0f, 0xff, 0x87 } }, - { (long)16E6, (long)10E3, { 0x1f, 0xff, 0x87 } }, - { (long)16E6, (long)5E3, { 0x3f, 0xff, 0x87 } }, - }; - - const uint8_t* cnf = NULL; - - for (unsigned int i = 0; i < (sizeof(CNF_MAPPER) / sizeof(CNF_MAPPER[0])); i++) { - if (CNF_MAPPER[i].clockFrequency == _clockFrequency && CNF_MAPPER[i].baudRate == baudRate) { - cnf = CNF_MAPPER[i].cnf; - break; - } - } - - if (cnf == NULL) { - return 0; - } - - writeRegister(REG_CNF1, cnf[0]); - writeRegister(REG_CNF2, cnf[1]); - writeRegister(REG_CNF3, cnf[2]); - - writeRegister(REG_CANINTE, FLAG_RXnIE(1) | FLAG_RXnIE(0)); - writeRegister(REG_BFPCTRL, 0x00); - writeRegister(REG_TXRTSCTRL, 0x00); - writeRegister(REG_RXBnCTRL(0), FLAG_RXM1 | FLAG_RXM0); - writeRegister(REG_RXBnCTRL(1), FLAG_RXM1 | FLAG_RXM0); - - writeRegister(REG_CANCTRL, 0x00); - if (readRegister(REG_CANCTRL) != 0x00) { - return 0; - } - - return 1; -} - -void MCP2515Class::end() -{ - SPI.end(); - - CANControllerClass::end(); -} - -int MCP2515Class::endPacket() -{ - if (!CANControllerClass::endPacket()) { - return 0; - } - - int n = 0; - - if (_txExtended) { - writeRegister(REG_TXBnSIDH(n), _txId >> 21); - writeRegister(REG_TXBnSIDL(n), (((_txId >> 18) & 0x07) << 5) | FLAG_EXIDE | ((_txId >> 16) & 0x03)); - writeRegister(REG_TXBnEID8(n), (_txId >> 8) & 0xff); - writeRegister(REG_TXBnEID0(n), _txId & 0xff); - } else { - writeRegister(REG_TXBnSIDH(n), _txId >> 3); - writeRegister(REG_TXBnSIDL(n), _txId << 5); - writeRegister(REG_TXBnEID8(n), 0x00); - writeRegister(REG_TXBnEID0(n), 0x00); - } - - if (_txRtr) { - writeRegister(REG_TXBnDLC(n), 0x40 | _txLength); - } else { - writeRegister(REG_TXBnDLC(n), _txLength); - - for (int i = 0; i < _txLength; i++) { - writeRegister(REG_TXBnD0(n) + i, _txData[i]); - } - } - - writeRegister(REG_TXBnCTRL(n), 0x08); - - bool aborted = false; - - while (readRegister(REG_TXBnCTRL(n)) & 0x08) { - if (readRegister(REG_TXBnCTRL(n)) & 0x10) { - // abort - aborted = true; - - modifyRegister(REG_CANCTRL, 0x10, 0x10); - } - - yield(); - } - - if (aborted) { - // clear abort command - modifyRegister(REG_CANCTRL, 0x10, 0x00); - } - - modifyRegister(REG_CANINTF, FLAG_TXnIF(n), 0x00); - - return (readRegister(REG_TXBnCTRL(n)) & 0x70) ? 0 : 1; -} - -int MCP2515Class::parsePacket() -{ - int n; - - uint8_t intf = readRegister(REG_CANINTF); - - if (intf & FLAG_RXnIF(0)) { - n = 0; - } else if (intf & FLAG_RXnIF(1)) { - n = 1; - } else { - _rxId = -1; - _rxExtended = false; - _rxRtr = false; - _rxLength = 0; - return 0; - } - - _rxExtended = (readRegister(REG_RXBnSIDL(n)) & FLAG_IDE) ? true : false; - - uint32_t idA = ((readRegister(REG_RXBnSIDH(n)) << 3) & 0x07f8) | ((readRegister(REG_RXBnSIDL(n)) >> 5) & 0x07); - if (_rxExtended) { - uint32_t idB = (((uint32_t)(readRegister(REG_RXBnSIDL(n)) & 0x03) << 16) & 0x30000) | ((readRegister(REG_RXBnEID8(n)) << 8) & 0xff00) | readRegister(REG_RXBnEID0(n)); - - _rxId = (idA << 18) | idB; - _rxRtr = (readRegister(REG_RXBnDLC(n)) & FLAG_RTR) ? true : false; - } else { - _rxId = idA; - _rxRtr = (readRegister(REG_RXBnSIDL(n)) & FLAG_SRR) ? true : false; - } - _rxDlc = readRegister(REG_RXBnDLC(n)) & 0x0f; - _rxIndex = 0; - - if (_rxRtr) { - _rxLength = 0; - } else { - _rxLength = _rxDlc; - - for (int i = 0; i < _rxLength; i++) { - _rxData[i] = readRegister(REG_RXBnD0(n) + i); - } - } - - modifyRegister(REG_CANINTF, FLAG_RXnIF(n), 0x00); - - return _rxDlc; -} - -void MCP2515Class::onReceive(void(*callback)(int)) -{ - CANControllerClass::onReceive(callback); - - pinMode(_intPin, INPUT); - - if (callback) { - SPI.usingInterrupt(digitalPinToInterrupt(_intPin)); - attachInterrupt(digitalPinToInterrupt(_intPin), MCP2515Class::onInterrupt, LOW); - } else { - detachInterrupt(digitalPinToInterrupt(_intPin)); -#ifdef SPI_HAS_NOTUSINGINTERRUPT - SPI.notUsingInterrupt(digitalPinToInterrupt(_intPin)); -#endif - } -} - -int MCP2515Class::filter(int id, int mask) -{ - id &= 0x7ff; - mask &= 0x7ff; - - // config mode - writeRegister(REG_CANCTRL, 0x80); - if (readRegister(REG_CANCTRL) != 0x80) { - return 0; - } - - for (int n = 0; n < 2; n++) { - // standard only - writeRegister(REG_RXBnCTRL(n), FLAG_RXM0); - writeRegister(REG_RXBnCTRL(n), FLAG_RXM0); - - writeRegister(REG_RXMnSIDH(n), mask >> 3); - writeRegister(REG_RXMnSIDL(n), mask << 5); - writeRegister(REG_RXMnEID8(n), 0); - writeRegister(REG_RXMnEID0(n), 0); - } - - for (int n = 0; n < 6; n++) { - writeRegister(REG_RXFnSIDH(n), id >> 3); - writeRegister(REG_RXFnSIDL(n), id << 5); - writeRegister(REG_RXFnEID8(n), 0); - writeRegister(REG_RXFnEID0(n), 0); - } - - // normal mode - writeRegister(REG_CANCTRL, 0x00); - if (readRegister(REG_CANCTRL) != 0x00) { - return 0; - } - - return 1; -} - -int MCP2515Class::filterExtended(long id, long mask) -{ - id &= 0x1FFFFFFF; - mask &= 0x1FFFFFFF; - - // config mode - writeRegister(REG_CANCTRL, 0x80); - if (readRegister(REG_CANCTRL) != 0x80) { - return 0; - } - - for (int n = 0; n < 2; n++) { - // extended only - writeRegister(REG_RXBnCTRL(n), FLAG_RXM1); - writeRegister(REG_RXBnCTRL(n), FLAG_RXM1); - - writeRegister(REG_RXMnSIDH(n), mask >> 21); - writeRegister(REG_RXMnSIDL(n), (((mask >> 18) & 0x03) << 5) | FLAG_EXIDE | ((mask >> 16) & 0x03)); - writeRegister(REG_RXMnEID8(n), (mask >> 8) & 0xff); - writeRegister(REG_RXMnEID0(n), mask & 0xff); - } - - for (int n = 0; n < 6; n++) { - writeRegister(REG_RXFnSIDH(n), id >> 21); - writeRegister(REG_RXFnSIDL(n), (((id >> 18) & 0x03) << 5) | FLAG_EXIDE | ((id >> 16) & 0x03)); - writeRegister(REG_RXFnEID8(n), (id >> 8) & 0xff); - writeRegister(REG_RXFnEID0(n), id & 0xff); - } - - // normal mode - writeRegister(REG_CANCTRL, 0x00); - if (readRegister(REG_CANCTRL) != 0x00) { - return 0; - } - - return 1; -} - -int MCP2515Class::observe() -{ - writeRegister(REG_CANCTRL, 0x80); - if (readRegister(REG_CANCTRL) != 0x80) { - return 0; - } - - return 1; -} - -int MCP2515Class::loopback() -{ - writeRegister(REG_CANCTRL, 0x40); - if (readRegister(REG_CANCTRL) != 0x40) { - return 0; - } - - return 1; -} - -int MCP2515Class::sleep() -{ - writeRegister(REG_CANCTRL, 0x01); - if (readRegister(REG_CANCTRL) != 0x01) { - return 0; - } - - return 1; -} - -int MCP2515Class::wakeup() -{ - writeRegister(REG_CANCTRL, 0x00); - if (readRegister(REG_CANCTRL) != 0x00) { - return 0; - } - - return 1; -} - -void MCP2515Class::setPins(int cs, int irq) -{ - _csPin = cs; - _intPin = irq; -} - -void MCP2515Class::setSPIFrequency(uint32_t frequency) -{ - _spiSettings = SPISettings(frequency, MSBFIRST, SPI_MODE0); -} - -void MCP2515Class::setClockFrequency(long clockFrequency) -{ - _clockFrequency = clockFrequency; -} - -void MCP2515Class::dumpRegisters(Stream& out) -{ - for (int i = 0; i < 128; i++) { - byte b = readRegister(i); - - out.print("0x"); - if (i < 16) { - out.print('0'); - } - out.print(i, HEX); - out.print(": 0x"); - if (b < 16) { - out.print('0'); - } - out.println(b, HEX); - } -} - -void MCP2515Class::reset() -{ - SPI.beginTransaction(_spiSettings); - digitalWrite(_csPin, LOW); - SPI.transfer(0xc0); - digitalWrite(_csPin, HIGH); - SPI.endTransaction(); - - delayMicroseconds(10); -} - -void MCP2515Class::handleInterrupt() -{ - if (readRegister(REG_CANINTF) == 0) { - return; - } - - while (parsePacket()) { - _onReceive(available()); - } -} - -uint8_t MCP2515Class::readRegister(uint8_t address) -{ - uint8_t value; - - SPI.beginTransaction(_spiSettings); - digitalWrite(_csPin, LOW); - SPI.transfer(0x03); - SPI.transfer(address); - value = SPI.transfer(0x00); - digitalWrite(_csPin, HIGH); - SPI.endTransaction(); - - return value; -} - -void MCP2515Class::modifyRegister(uint8_t address, uint8_t mask, uint8_t value) -{ - SPI.beginTransaction(_spiSettings); - digitalWrite(_csPin, LOW); - SPI.transfer(0x05); - SPI.transfer(address); - SPI.transfer(mask); - SPI.transfer(value); - digitalWrite(_csPin, HIGH); - SPI.endTransaction(); -} - -void MCP2515Class::writeRegister(uint8_t address, uint8_t value) -{ - SPI.beginTransaction(_spiSettings); - digitalWrite(_csPin, LOW); - SPI.transfer(0x02); - SPI.transfer(address); - SPI.transfer(value); - digitalWrite(_csPin, HIGH); - SPI.endTransaction(); -} - -void MCP2515Class::onInterrupt() -{ - CAN.handleInterrupt(); -} - -MCP2515Class CAN; - -#endif From 2e3ddbaf87dfdb5c20ae486e5eadb124c7adac6a Mon Sep 17 00:00:00 2001 From: garned Date: Sat, 4 Dec 2021 19:48:57 +0100 Subject: [PATCH 4/9] Delete MCP2515.h --- src/MCP2515.h | 77 --------------------------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 src/MCP2515.h diff --git a/src/MCP2515.h b/src/MCP2515.h deleted file mode 100644 index 2f0444f..0000000 --- a/src/MCP2515.h +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Sandeep Mistry. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -#ifndef ARDUINO_ARCH_ESP32 - -#ifndef MCP2515_H -#define MCP2515_H - -#include - -#include "CANController.h" - -#define MCP2515_DEFAULT_CLOCK_FREQUENCY 16e6 - -#if defined(ARDUINO_ARCH_SAMD) && defined(PIN_SPI_MISO) && defined(PIN_SPI_MOSI) && defined(PIN_SPI_SCK) && (PIN_SPI_MISO == 10) && (PIN_SPI_MOSI == 8) && (PIN_SPI_SCK == 9) -// Arduino MKR board: MKR CAN shield CS is pin 3, INT is pin 7 -#define MCP2515_DEFAULT_CS_PIN 3 -#define MCP2515_DEFAULT_INT_PIN 7 -#else -#define MCP2515_DEFAULT_CS_PIN 10 -#define MCP2515_DEFAULT_INT_PIN 2 -#endif - -class MCP2515Class : public CANControllerClass { - -public: - MCP2515Class(); - virtual ~MCP2515Class(); - - virtual int begin(long baudRate); - virtual void end(); - - virtual int endPacket(); - - virtual int parsePacket(); - - virtual void onReceive(void(*callback)(int)); - - using CANControllerClass::filter; - virtual int filter(int id, int mask); - using CANControllerClass::filterExtended; - virtual int filterExtended(long id, long mask); - - virtual int observe(); - virtual int loopback(); - virtual int sleep(); - virtual int wakeup(); - - void setPins(int cs = MCP2515_DEFAULT_CS_PIN, int irq = MCP2515_DEFAULT_INT_PIN); - void setSPIFrequency(uint32_t frequency); - void setClockFrequency(long clockFrequency); - - void dumpRegisters(Stream& out); - -private: - void reset(); - - void handleInterrupt(); - - uint8_t readRegister(uint8_t address); - void modifyRegister(uint8_t address, uint8_t mask, uint8_t value); - void writeRegister(uint8_t address, uint8_t value); - - static void onInterrupt(); - -private: - SPISettings _spiSettings; - int _csPin; - int _intPin; - long _clockFrequency; -}; - -extern MCP2515Class CAN; - -#endif - -#endif From 93973466df5b604d7c48c679c8853f5b38c37733 Mon Sep 17 00:00:00 2001 From: garned Date: Sat, 4 Dec 2021 19:49:44 +0100 Subject: [PATCH 5/9] Update ESP32SJA1000.cpp --- src/ESP32SJA1000.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/ESP32SJA1000.cpp b/src/ESP32SJA1000.cpp index 3c56fba..225865b 100644 --- a/src/ESP32SJA1000.cpp +++ b/src/ESP32SJA1000.cpp @@ -1,8 +1,6 @@ // Copyright (c) Sandeep Mistry. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#ifdef ARDUINO_ARCH_ESP32 - #include "esp_intr.h" #include "soc/dport_reg.h" #include "driver/gpio.h" @@ -412,4 +410,3 @@ void ESP32SJA1000Class::onInterrupt(void* arg) ESP32SJA1000Class CAN; -#endif From 085b139b1e43f89b7e255e2c1076371da9249067 Mon Sep 17 00:00:00 2001 From: garned Date: Sat, 4 Dec 2021 19:50:08 +0100 Subject: [PATCH 6/9] Update ESP32SJA1000.h --- src/ESP32SJA1000.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ESP32SJA1000.h b/src/ESP32SJA1000.h index b83cddc..d469f22 100644 --- a/src/ESP32SJA1000.h +++ b/src/ESP32SJA1000.h @@ -1,8 +1,6 @@ // Copyright (c) Sandeep Mistry. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#ifdef ARDUINO_ARCH_ESP32 - #ifndef ESP32_SJA1000_H #define ESP32_SJA1000_H From 823f8773049d5900a5e913a06af64994057514cb Mon Sep 17 00:00:00 2001 From: garned Date: Sat, 4 Dec 2021 19:54:46 +0100 Subject: [PATCH 7/9] Update library.properties --- library.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library.properties b/library.properties index acf321f..0285c35 100644 --- a/library.properties +++ b/library.properties @@ -3,8 +3,8 @@ version=0.3.1 author=Sandeep Mistry maintainer=Sandeep Mistry sentence=An Arduino library for sending and receiving data using CAN bus. -paragraph=Supports Microchip MCP2515 based boards/shields and the Espressif ESP32's built-in SJA1000 compatible CAN controller. +paragraph=Supports Espressif ESP32's built-in SJA1000 compatible CAN controller. category=Communication -url=https://github.com/sandeepmistry/arduino-CAN +url=https://github.com/sandeepmistry/SER-arduino-CAN architectures=* includes=CAN.h From 9f32d553d2050c1f1829176e36428bcc93faeef4 Mon Sep 17 00:00:00 2001 From: garned Date: Sat, 4 Dec 2021 19:56:13 +0100 Subject: [PATCH 8/9] Update library.properties --- library.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library.properties b/library.properties index 0285c35..4a4e6cc 100644 --- a/library.properties +++ b/library.properties @@ -1,7 +1,7 @@ name=CAN version=0.3.1 -author=Sandeep Mistry -maintainer=Sandeep Mistry +author=Sandeep Mistry , T. Keel +maintainer=Sandeep Mistry , T. Keel sentence=An Arduino library for sending and receiving data using CAN bus. paragraph=Supports Espressif ESP32's built-in SJA1000 compatible CAN controller. category=Communication From f412f2d00f433fc64b75929128b85f9520dfb6c5 Mon Sep 17 00:00:00 2001 From: garned Date: Sat, 4 Dec 2021 20:19:36 +0100 Subject: [PATCH 9/9] Update ESP32SJA1000.h --- src/ESP32SJA1000.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ESP32SJA1000.h b/src/ESP32SJA1000.h index d469f22..7ef6f56 100644 --- a/src/ESP32SJA1000.h +++ b/src/ESP32SJA1000.h @@ -60,4 +60,3 @@ extern ESP32SJA1000Class CAN; #endif -#endif