From 1b63d26adcfc4c4d3037b38b6e15cad99c9527b9 Mon Sep 17 00:00:00 2001 From: Adam Ayd Date: Thu, 3 Jun 2021 22:49:02 -0400 Subject: [PATCH 1/3] Updated libary.json to current version --- library.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.json b/library.json index b7148b2..2357d7a 100644 --- a/library.json +++ b/library.json @@ -7,7 +7,7 @@ "type": "git", "url": "https://github.com/Seeed-Studio/Seeed_Arduino_CAN.git" }, - "version": "1.20", + "version": "2.3.0", "frameworks": "arduino", "platforms": "*" } From 1351334686f2414b3f26613858c54ab91bbe5002 Mon Sep 17 00:00:00 2001 From: Adam Ayd Date: Sat, 5 Jun 2021 00:17:25 -0400 Subject: [PATCH 2/3] Removed special character and updated keywords. --- library.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.json b/library.json index 2357d7a..64d69b0 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "CAN_BUS_Shield", - "keywords": "can, bus, MCP2518FD ,mcp2515, MCP-2515", + "keywords": "can, bus, mcp2518fd, mcp2515, mcp-2515", "description": "Seeed Arduino library to control CAN-BUS and CAN BUS FD.", "repository": { From 4080671c63e977526d2daa0bf376ca14f6021ed7 Mon Sep 17 00:00:00 2001 From: QuentinTorg Date: Sun, 6 Jun 2021 09:31:59 -0400 Subject: [PATCH 3/3] fix variable collision that broke compatibility with Arudino Uno Wifi R2 boards. May also affect Arduino Nano Every --- src/mcp2518fd_can.cpp | 16 ++++++++-------- src/mcp2518fd_can_dfs.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/mcp2518fd_can.cpp b/src/mcp2518fd_can.cpp index 66b6a4a..c19179c 100644 --- a/src/mcp2518fd_can.cpp +++ b/src/mcp2518fd_can.cpp @@ -1909,15 +1909,15 @@ byte mcp2518fd::init_Mask(byte num, byte ext, unsigned long ulData) { mcp2518fd_OperationModeSelect(CAN_CONFIGURATION_MODE); mcp2518fd_FilterToFifoLink((CAN_FILTER)num, APP_RX_FIFO, false); - + // Setup RX Mask mObj.word = 0; mObj.bF.MSID = ulData; mObj.bF.MIDE = ext; err = mcp2518fd_FilterMaskConfigure((CAN_FILTER)num, &mObj.bF); - + mcp2518fd_FilterToFifoLink((CAN_FILTER)num, APP_RX_FIFO, true); - + mcp2518fd_OperationModeSelect(mcpMode); return err; @@ -1932,7 +1932,7 @@ byte mcp2518fd::init_Filt(byte num, byte ext, unsigned long ulData) { err = mcp2518fd_OperationModeSelect(CAN_CONFIGURATION_MODE); mcp2518fd_FilterToFifoLink((CAN_FILTER)num, APP_RX_FIFO, false); - + // Setup RX Filter fObj.word = 0; if (!ext) { // standard identifier @@ -1942,9 +1942,9 @@ byte mcp2518fd::init_Filt(byte num, byte ext, unsigned long ulData) { } fObj.bF.EXIDE = !!ext; mcp2518fd_FilterObjectConfigure((CAN_FILTER)num, &fObj.bF); - + mcp2518fd_FilterToFifoLink((CAN_FILTER)num, APP_RX_FIFO, true); - + mcp2518fd_OperationModeSelect(mcpMode); return err; } @@ -2252,10 +2252,10 @@ byte mcp2518fd::mcpDigitalRead(const byte pin) { // Update data switch (pin) { case GPIO_PIN_0: - state = (GPIO_PIN_STATE)iocon.bF.GPIO0; + state = (GPIO_PIN_STATE)iocon.bF.GPIO0_; break; case GPIO_PIN_1: - state = (GPIO_PIN_STATE)iocon.bF.GPIO1; + state = (GPIO_PIN_STATE)iocon.bF.GPIO1_; break; default: return -1; diff --git a/src/mcp2518fd_can_dfs.h b/src/mcp2518fd_can_dfs.h index fbdd45a..1224927 100644 --- a/src/mcp2518fd_can_dfs.h +++ b/src/mcp2518fd_can_dfs.h @@ -1463,8 +1463,8 @@ typedef union _REG_IOCON { uint32_t LAT1 : 1; uint32_t unimplemented3 : 5; uint32_t HVDETSEL : 1; - uint32_t GPIO0 : 1; - uint32_t GPIO1 : 1; + uint32_t GPIO0_ : 1; + uint32_t GPIO1_ : 1; uint32_t unimplemented4 : 6; uint32_t PinMode0 : 1; uint32_t PinMode1 : 1;