|
HardFOC Core
API reference
|
CRTP adapter connecting BaseSpi interface to ADS7952 SpiInterface. More...
#include <Ads7952Handler.h>
Public Member Functions | |
| Ads7952SpiAdapter (BaseSpi &spi_interface) noexcept | |
| Construct SPI adapter with BaseSpi interface. | |
| bool | 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 ADS7952 SpiInterface.
Bridges the HardFOC BaseSpi abstraction to the ADS7952 driver's CRTP SPI interface, enabling the driver to work with any SPI controller that inherits from BaseSpi (EspSpi, StmSpi, etc.).
Thread Safety: Thread-safe when the underlying BaseSpi is thread-safe.
|
explicitnoexcept |
Construct SPI adapter with BaseSpi interface.
| spi_interface | Reference to BaseSpi implementation (e.g., EspSpiDevice) |
|
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 |
Error::SpiError or false).
|
private |