|
HF-Core Platform 0.1.0-dev
Hardware-Agnostic Handler Layer & RTOS Utilities for HardFOC
|
CRTP adapter connecting BaseSpi interface to AS5047U SpiInterface. More...
#include <As5047uHandler.h>
Public Member Functions | |
| As5047uSpiAdapter (BaseSpi &spi_interface) noexcept | |
| Construct SPI adapter with BaseSpi interface. | |
| void | transfer (const uint8_t *tx, uint8_t *rx, std::size_t len) noexcept |
| Perform full-duplex SPI transfer (CRTP dispatch target) | |
Private Attributes | |
| BaseSpi & | spi_interface_ |
CRTP adapter connecting BaseSpi interface to AS5047U SpiInterface.
This adapter implements the as5047u::SpiInterface<As5047uSpiAdapter> CRTP interface using a HardFOC BaseSpi implementation, enabling the AS5047U driver to work with any SPI controller that inherits from BaseSpi.
Thread Safety: This adapter is thread-safe when the underlying BaseSpi implementation is thread-safe.
|
explicitnoexcept |
Construct SPI adapter with BaseSpi interface.
| spi_interface | Reference to BaseSpi implementation |
|
noexcept |
Perform full-duplex SPI transfer (CRTP dispatch target)
| tx | Transmit buffer (can be nullptr to send zeros) |
| rx | Receive buffer (can be nullptr to discard received data) |
| len | Number of bytes to transfer |
|
private |