ESP32-C6 implementation of the TLE92466ED HAL interface.
More...
#include <ESP32C6_HAL.hpp>
|
| | ESP32C6_HAL () |
| | Constructor with default SPI configuration.
|
| |
| | ESP32C6_HAL (const SPIConfig &config) |
| | Constructor with custom SPI configuration.
|
| |
| | ~ESP32C6_HAL () override |
| | Destructor - cleans up SPI resources.
|
| |
| auto | initialize () noexcept -> std::expected< void, HALError > |
| | Initialize the HAL (must be called before use)
|
| |
| auto | spiTransfer (std::span< const uint8_t > txData, std::span< uint8_t > rxData) noexcept -> std::expected< void, HALError > override |
| | Perform SPI transfer (32-bit frames for TLE92466ED)
|
| |
| void | delayMicroseconds (uint32_t us) noexcept override |
| | Microsecond delay implementation.
|
| |
| auto | getConfig () const noexcept -> const SPIConfig & |
| | Get the current SPI configuration.
|
| |
| auto | isInitialized () const noexcept -> bool |
| | Check if HAL is initialized.
|
| |
|
| auto | initializeSPI () noexcept -> std::expected< void, HALError > |
| | Initialize SPI bus.
|
| |
| auto | addSPIDevice () noexcept -> std::expected< void, HALError > |
| | Add SPI device to the bus.
|
| |
|
| static constexpr const char * | TAG = "ESP32C6_HAL" |
| | Logging tag.
|
| |
ESP32-C6 implementation of the TLE92466ED HAL interface.
This class provides the platform-specific implementation for ESP32-C6, handling SPI communication with proper timing and error handling.
◆ ESP32C6_HAL() [1/2]
| ESP32C6_HAL::ESP32C6_HAL |
( |
| ) |
|
|
inline |
Constructor with default SPI configuration.
◆ ESP32C6_HAL() [2/2]
| ESP32C6_HAL::ESP32C6_HAL |
( |
const SPIConfig & | config | ) |
|
|
explicit |
Constructor with custom SPI configuration.
- Parameters
-
| config | SPI configuration parameters |
◆ ~ESP32C6_HAL()
| ESP32C6_HAL::~ESP32C6_HAL |
( |
| ) |
|
|
override |
Destructor - cleans up SPI resources.
◆ addSPIDevice()
| auto ESP32C6_HAL::addSPIDevice |
( |
| ) |
-> std::expected<void, HALError> |
|
privatenoexcept |
Add SPI device to the bus.
- Returns
- std::expected<void, HALError> Success or error
◆ delayMicroseconds()
| void ESP32C6_HAL::delayMicroseconds |
( |
uint32_t | us | ) |
|
|
overridenoexcept |
Microsecond delay implementation.
- Parameters
-
◆ getConfig()
| auto ESP32C6_HAL::getConfig |
( |
| ) |
const -> const SPIConfig& |
|
inlinenoexcept |
Get the current SPI configuration.
- Returns
- Current SPI configuration
◆ initialize()
| auto ESP32C6_HAL::initialize |
( |
| ) |
-> std::expected<void, HALError> |
|
noexcept |
Initialize the HAL (must be called before use)
- Returns
- std::expected<void, HALError> Success or error
◆ initializeSPI()
| auto ESP32C6_HAL::initializeSPI |
( |
| ) |
-> std::expected<void, HALError> |
|
privatenoexcept |
Initialize SPI bus.
- Returns
- std::expected<void, HALError> Success or error
◆ isInitialized()
| auto ESP32C6_HAL::isInitialized |
( |
| ) |
const -> bool |
|
inlinenoexcept |
Check if HAL is initialized.
- Returns
- true if initialized, false otherwise
◆ spiTransfer()
| auto ESP32C6_HAL::spiTransfer |
( |
std::span< const uint8_t > | txData, |
|
|
std::span< uint8_t > | rxData ) -> std::expected<void, HALError> |
|
overridenoexcept |
Perform SPI transfer (32-bit frames for TLE92466ED)
- Parameters
-
| txData | Transmit data buffer |
| rxData | Receive data buffer
|
- Returns
- std::expected<void, HALError> Success or error
◆ config_
◆ initialized_
| bool ESP32C6_HAL::initialized_ = false |
|
private |
◆ spi_device_
| spi_device_handle_t ESP32C6_HAL::spi_device_ = nullptr |
|
private |
◆ TAG
| constexpr const char* ESP32C6_HAL::TAG = "ESP32C6_HAL" |
|
staticconstexprprivate |
The documentation for this class was generated from the following files: