|
Internal Interface Wrap
API reference
|
ESP32 CAN (TWAI) implementation for the HardFOC system - ESP-IDF v5.5 Compatible. More...
#include "McuSelect.h"#include "esp_twai.h"#include "esp_twai_onchip.h"#include "freertos/FreeRTOS.h"#include "freertos/semphr.h"#include "BaseCan.h"#include "HfSpscRing.h"#include "PlatformMutex.h"#include "utils/EspTypes_CAN.h"#include <atomic>#include <memory>Go to the source code of this file.
Classes | |
| struct | hf_esp_can_config_t |
| ESP32 TWAI node configuration structure for ESP-IDF v5.5. More... | |
| struct | hf_esp_can_timing_config_t |
| Advanced bit timing configuration for fine-tuning. More... | |
| struct | hf_esp_can_filter_config_t |
| CAN message filter configuration for hardware filtering. More... | |
| struct | hf_esp_can_error_info_t |
| Comprehensive error information structure for error callbacks. More... | |
| struct | hf_esp_can_state_info_t |
| Bus state information for state change callbacks. More... | |
| struct | hf_esp_can_tx_info_t |
| Transmission completion information. More... | |
| class | EspCan |
| ESP32 CAN (TWAI) implementation using ESP-IDF v5.5+ node-based API. More... | |
| struct | EspCan::TxSlot |
Typedefs | |
| using | hf_esp_can_receive_callback_t = void(*)(const hf_can_message_t &message, void *user_data) |
| User callback function types with user data support. | |
| using | hf_esp_can_error_callback_t = void(*)(const hf_esp_can_error_info_t &error_info, void *user_data) |
| using | hf_esp_can_state_callback_t = void(*)(const hf_esp_can_state_info_t &state_info, void *user_data) |
| using | hf_esp_can_tx_callback_t = void(*)(const hf_esp_can_tx_info_t &tx_info, void *user_data) |
Enumerations | |
| enum class | hf_esp_can_rx_mode_t : uint8_t { AUTO = 0 , QUEUE_ALWAYS = 1 } |
| Where EspCan delivers received frames. More... | |
ESP32 CAN (TWAI) implementation for the HardFOC system - ESP-IDF v5.5 Compatible.
This file contains the ESP32 CAN (TWAI) implementation that extends the BaseCan abstract class. It provides a clean, minimal, and robust CAN interface using the modern ESP-IDF v5.5+ handle-based TWAI node API with comprehensive testing support for ESP32 with external SN65 transceiver.
Key Features:
| using hf_esp_can_error_callback_t = void (*)(const hf_esp_can_error_info_t& error_info, void* user_data) |
| using hf_esp_can_receive_callback_t = void (*)(const hf_can_message_t& message, void* user_data) |
User callback function types with user data support.
| using hf_esp_can_state_callback_t = void (*)(const hf_esp_can_state_info_t& state_info, void* user_data) |
|
strong |
Where EspCan delivers received frames.
Received frames are taken from the controller in the TWAI RX interrupt. Receive callbacks run in that ISR context.