HardFOC Vortex V1 HAL
Unified HAL API for the HardFOC Vortex motor-control platform (ESP32-C6, TMC9660)
Loading...
Searching...
No Matches
Namespaces | Functions
VortexBoardBindEsp32c6.h File Reference

ESP32-C6-only accessors of the Vortex board binding, for platform code above the HAL. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  vortex
 
namespace  vortex::bsp
 
namespace  vortex::bsp::esp32c6
 

Functions

EspCan * vortex::bsp::esp32c6::CanController () noexcept
 The TWAI controller CommChannelsManager opened, as its concrete EspCan.
 

Detailed Description

ESP32-C6-only accessors of the Vortex board binding, for platform code above the HAL.

The managers are MCU-free and hand out only Base* objects. Some platform code needs the concrete ESP32 object behind one of them: the CANopen device builds hf-core's hf::can::EspTwaiPort on the TWAI controller, and that port takes an EspCan&. This header is where such code gets it. Include it only from ESP32-C6 platform code (the product's CANopen bring-up), never from a manager or from MCU-neutral application logic.

auto& comms = Vortex::GetInstance().comms; // after EnsureInitialized()
if (twai != nullptr) {
hf::can::EspTwaiPort port(*twai, comms.GetCanBitRate());
}
Communication channels manager for the HardFOC Vortex V1 platform.
ESP32-C6-only accessors of the Vortex board binding, for platform code above the HAL.
static Vortex & GetInstance() noexcept
Get the singleton instance of Vortex API.
Definition Vortex.cpp:41
CommChannelsManager & comms
Communication channels (SPI, I²C, UART, CAN). After NVS.
Definition Vortex.h:343
EspCan * CanController() noexcept
The TWAI controller CommChannelsManager opened, as its concrete EspCan.
Definition VortexBoardBindEsp32c6.cpp:253

Ownership: the binding owns the object (static storage); it stays valid until CommChannelsManager is de-initialised (vortex::bsp::CanClose()). Thread safety: the call itself reads one pointer; the EspCan has its own locking.