I am trying to use a Dial with an Isolated CAN bus unit connected to port a, to read CAN Messages.
I'm using Arduino IDE 2.3.5 but I'm getting these compile errors.
In file included from C:\Users\DavidYoder\AppData\Local\Arduino15\packages\m5stack\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_reg.h:20,
from c:\Users\DavidYoder\Documents\Arduino\Sketchbook\libraries\ESP32CAN\src\CAN.c:38:
c:\Users\DavidYoder\Documents\Arduino\Sketchbook\libraries\ESP32CAN\src\CAN.c: In function 'CAN_init':
c:\Users\DavidYoder\Documents\Arduino\Sketchbook\libraries\ESP32CAN\src\CAN.c:173:33: error: 'DPORT_PERIP_CLK_EN_REG' undeclared (first use in this function); did you mean 'SYSTEM_PERIP_CLK_EN1_REG'?
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\DavidYoder\AppData\Local\Arduino15\packages\m5stack\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:77:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'
77 | #define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t )(addr))) = (uint32_t)(val)
| ^~~~
C:\Users\DavidYoder\AppData\Local\Arduino15\packages\m5stack\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:90:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
90 | #define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))
| ^~~~~~~~~~~~~~~~~~~~
c:\Users\DavidYoder\Documents\Arduino\Sketchbook\libraries\ESP32CAN\src\CAN.c:173:9: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~~~~~~~~
c:\Users\DavidYoder\Documents\Arduino\Sketchbook\libraries\ESP32CAN\src\CAN.c:173:33: note: each undeclared identifier is reported only once for each function it appears in
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\DavidYoder\AppData\Local\Arduino15\packages\m5stack\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:77:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'
77 | #define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t )(addr))) = (uint32_t)(val)
| ^~~~
C:\Users\DavidYoder\AppData\Local\Arduino15\packages\m5stack\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:90:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
90 | #define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))
| ^~~~~~~~~~~~~~~~~~~~
c:\Users\DavidYoder\Documents\Arduino\Sketchbook\libraries\ESP32CAN\src\CAN.c:173:9: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~~~~~~~~
c:\Users\DavidYoder\Documents\Arduino\Sketchbook\libraries\ESP32CAN\src\CAN.c:173:57: error: 'DPORT_CAN_CLK_EN' undeclared (first use in this function)
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~
C:\Users\DavidYoder\AppData\Local\Arduino15\packages\m5stack\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:77:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
77 | #define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t )(addr))) = (uint32_t)(val)
| ^~~
C:\Users\DavidYoder\AppData\Local\Arduino15\packages\m5stack\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:90:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
90 | #define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))
| ^~~~~~~~~~~~~~~~~~~~
c:\Users\DavidYoder\Documents\Arduino\Sketchbook\libraries\ESP32CAN\src\CAN.c:173:9: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~~~~~~~~
c:\Users\DavidYoder\Documents\Arduino\Sketchbook\libraries\ESP32CAN\src\CAN.c:174:35: error: 'DPORT_PERIP_RST_EN_REG' undeclared (first use in this function); did you mean 'SYSTEM_PERIP_RST_EN0_REG'?
174 | DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
| ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\DavidYoder\AppData\Local\Arduino15\packages\m5stack\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:77:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'
77 | #define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t )(addr))) = (uint32_t)(val)
| ^~~~
C:\Users\DavidYoder\AppData\Local\Arduino15\packages\m5stack\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:87:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
87 | #define DPORT_CLEAR_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)&(~(mask))))
| ^~~~~~~~~~~~~~~~~~~~
c:\Users\DavidYoder\Documents\Arduino\Sketchbook\libraries\ESP32CAN\src\CAN.c:174:9: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
174 | DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
c:\Users\DavidYoder\Documents\Arduino\Sketchbook\libraries\ESP32CAN\src\CAN.c:174:59: error: 'DPORT_CAN_RST' undeclared (first use in this function)
174 | DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
| ^~~~~~~~~~~~~
C:\Users\DavidYoder\AppData\Local\Arduino15\packages\m5stack\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:77:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
77 | #define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t *)(addr))) = (uint32_t)(val)
| ^~~
C:\Users\DavidYoder\AppData\Local\Arduino15\packages\m5stack\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:87:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
87 | #define DPORT_CLEAR_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)&(~(mask))))
| ^~~~~~~~~~~~~~~~~~~~
c:\Users\DavidYoder\Documents\Arduino\Sketchbook\libraries\ESP32CAN\src\CAN.c:174:9: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
174 | DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
c:\Users\DavidYoder\Documents\Arduino\Sketchbook\libraries\ESP32CAN\src\CAN.c:179:44: error: 'CAN_TX_IDX' undeclared (first use in this function)
179 | gpio_matrix_out(CAN_cfg.tx_pin_id, CAN_TX_IDX, 0, 0);
| ^~~~~~~~~~
c:\Users\DavidYoder\Documents\Arduino\Sketchbook\libraries\ESP32CAN\src\CAN.c:184:43: error: 'CAN_RX_IDX' undeclared (first use in this function)
184 | gpio_matrix_in(CAN_cfg.rx_pin_id, CAN_RX_IDX, 0);
| ^~~~~~~~~~
c:\Users\DavidYoder\Documents\Arduino\Sketchbook\libraries\ESP32CAN\src\CAN.c:254:24: error: 'ETS_CAN_INTR_SOURCE' undeclared (first use in this function)
254 | esp_intr_alloc(ETS_CAN_INTR_SOURCE, 0, CAN_isr, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~
exit status 1
Compilation error: exit status 1