HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
Loading...
Searching...
No Matches
EspTypes_CAN.h
Go to the documentation of this file.
1
15#pragma once
16
17#include "BaseCan.h" // For hf_can_err_t and hf_can_message_t
18#include "EspTypes_Base.h"
19#include "HardwareTypes.h"
20#include "McuSelect.h" // Central MCU platform selection (includes all ESP-IDF)
21
22//==============================================================================
23// ESSENTIAL CAN TYPES (ESP32)
24//==============================================================================
25
26//==============================================================================
27// ESSENTIAL CAN ENUMS (ESP32 SPECIFIC)
28//==============================================================================
29
33enum class hf_can_controller_id_t : uint8_t {
36};
37
41enum class hf_can_mode_t : uint8_t {
45};
46
50enum class hf_can_operation_type_t : uint8_t {
51 HF_CAN_OP_SEND = 0,
54 HF_CAN_OP_ALERT = 3,
55 HF_CAN_OP_INIT = 4,
57 HF_CAN_OP_RESET = 6,
59};
60
61//==============================================================================
62// ESSENTIAL CAN CONFIGURATION STRUCTURES (MINIMAL)
63//==============================================================================
64
76
80using hf_can_alert_callback_t = void (*)(uint32_t alerts, void* user_data);
81
82//==============================================================================
83// END OF ESPCAN TYPES - MINIMAL AND ESSENTIAL ONLY
84//==============================================================================
Abstract base class for CAN bus implementations in the HardFOC system.
ESP32 base type definitions for hardware abstraction.
hf_can_operation_type_t
CAN operation types for statistics tracking.
Definition EspTypes_CAN.h:50
@ HF_CAN_OP_ALERT
Alert operation.
@ HF_CAN_OP_RESET
Reset operation.
@ HF_CAN_OP_DEINIT
Deinitialization operation.
@ HF_CAN_OP_INIT
Initialization operation.
@ HF_CAN_OP_FILTER
Filter operation.
@ HF_CAN_OP_RECEIVE
Receive operation.
@ HF_CAN_OP_SEND
Send operation.
@ HF_CAN_OP_RECOVER
Bus recovery operation.
void(*)(uint32_t alerts, void *user_data) hf_can_alert_callback_t
CAN alert callback function type.
Definition EspTypes_CAN.h:80
hf_can_controller_id_t
CAN controller ID for ESP32 family.
Definition EspTypes_CAN.h:33
@ HF_CAN_CONTROLLER_0
Primary CAN controller.
@ HF_CAN_CONTROLLER_1
Secondary CAN controller (ESP32 only)
hf_can_mode_t
CAN operating mode mapping from ESP-IDF TWAI modes.
Definition EspTypes_CAN.h:41
@ HF_CAN_MODE_LISTEN_ONLY
Listen-only mode (bus monitor)
@ HF_CAN_MODE_NO_ACK
No acknowledgment mode (self-test)
@ HF_CAN_MODE_NORMAL
Normal operating mode.
Platform-agnostic hardware type definitions for the HardFOC system.
Centralized MCU platform selection and configuration header.
CAN filter configuration structure.
Definition EspTypes_CAN.h:68
uint32_t acceptance_mask
Acceptance mask.
Definition EspTypes_CAN.h:70
uint32_t acceptance_code
Acceptance code.
Definition EspTypes_CAN.h:69
bool single_filter
Use single filter mode.
Definition EspTypes_CAN.h:71
hf_can_filter_config_t() noexcept
Definition EspTypes_CAN.h:73