ESP32 SPI transport implementation for AS5047U driver.
More...
#include <esp32_as5047u_bus.hpp>
ESP32 SPI transport implementation for AS5047U driver.
This class implements the as5047u::SpiInterface interface using ESP-IDF's SPI driver with CRTP pattern. It supports configurable SPI pins, frequency, and chip select.
◆ Esp32As5047uSpiBus()
| Esp32As5047uSpiBus::Esp32As5047uSpiBus |
( |
const SPIConfig & | config | ) |
|
|
inlineexplicit |
◆ ~Esp32As5047uSpiBus()
| Esp32As5047uSpiBus::~Esp32As5047uSpiBus |
( |
| ) |
|
|
inline |
Destructor - cleans up SPI resources.
◆ deinitialize()
| void Esp32As5047uSpiBus::deinitialize |
( |
| ) |
|
|
inline |
Deinitialize the SPI bus.
◆ getConfig()
| const SPIConfig & Esp32As5047uSpiBus::getConfig |
( |
| ) |
const |
|
inlinenoexcept |
Get the current SPI configuration.
- Returns
- Current SPI configuration
◆ initialize()
| bool Esp32As5047uSpiBus::initialize |
( |
| ) |
|
|
inline |
Initialize the SPI bus (must be called before use)
- Returns
- true if successful, false otherwise
◆ isInitialized()
| bool Esp32As5047uSpiBus::isInitialized |
( |
| ) |
const |
|
inlinenoexcept |
Check if SPI bus is initialized.
- Returns
- true if initialized, false otherwise
◆ transfer()
| void Esp32As5047uSpiBus::transfer |
( |
const uint8_t * | tx, |
|
|
uint8_t * | rx, |
|
|
std::size_t | len ) |
|
inline |
Perform a full-duplex SPI data transfer.
- Parameters
-
| tx | Pointer to data to transmit (len bytes). If nullptr, zeros are sent. |
| rx | Pointer to buffer for received data (len bytes). If nullptr, received data is ignored. |
| len | Number of bytes to transfer. |
The documentation for this class was generated from the following file: