HF-Core Platform 0.1.0-dev
Hardware-Agnostic Handler Layer & RTOS Utilities for HardFOC
Loading...
Searching...
No Matches
As5047uSpiAdapter Class Reference

CRTP adapter connecting BaseSpi interface to AS5047U SpiInterface. More...

#include <As5047uHandler.h>

Inheritance diagram for As5047uSpiAdapter:
[legend]
Collaboration diagram for As5047uSpiAdapter:
[legend]

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_
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ As5047uSpiAdapter()

As5047uSpiAdapter::As5047uSpiAdapter ( BaseSpi & spi_interface)
explicitnoexcept

Construct SPI adapter with BaseSpi interface.

Parameters
spi_interfaceReference to BaseSpi implementation

Member Function Documentation

◆ transfer()

void As5047uSpiAdapter::transfer ( const uint8_t * tx,
uint8_t * rx,
std::size_t len )
noexcept

Perform full-duplex SPI transfer (CRTP dispatch target)

Parameters
txTransmit buffer (can be nullptr to send zeros)
rxReceive buffer (can be nullptr to discard received data)
lenNumber of bytes to transfer

Member Data Documentation

◆ spi_interface_

BaseSpi& As5047uSpiAdapter::spi_interface_
private

The documentation for this class was generated from the following files: