How thomasbarth/esp32-can-driver works
This repository is a small ESP32 CAN driver. Its principal workflow is that application code configures the driver and submits CAN frames; the driver programs the ESP32 CAN controller to transmit them, and its interrupt handler reads received frames into a configured FreeRTOS queue. The README also documents menuconfig options for baud rate, pins, node ID, and test-frame settings, though those configuration mechanisms are not shown in the sampled runtime code. The map is limited to the driver’s actual runtime modules and documented capabilities.
Main entry points: CAN.c CAN runtime · CAN.h Frame API · CAN_config.h Driver configuration · can_regdef.h Controller registers
Components 8
CAN driver
- Frame API
components/can/include/CAN.h - CAN runtime
components/can/CAN.c - Driver configuration
components/can/include/CAN_config.h - Controller registers
components/can/include/can_regdef.h
Other components
- Application
- RX queue
- ESP32 CAN controller
- CAN bus
Connections 9
- Application → Frame API: uses API
- Frame API → Driver configuration: includes
components/can/include/CAN.h - CAN runtime → Driver configuration: reads settings
components/can/CAN.c - CAN runtime → Controller registers: uses definitions
components/can/CAN.c - CAN runtime → ESP32 CAN controller: configures and accesses
components/can/CAN.c - ESP32 CAN controller → CAN runtime: interrupts
components/can/CAN.c - CAN runtime → RX queue: enqueues frames
components/can/CAN.c - CAN bus → ESP32 CAN controller: provides CAN frames
- ESP32 CAN controller → CAN bus: transmits frames