STM32 SPI device — manages chip-select and delegates transfers to parent bus.
More...
|
| | StmSpiDevice (StmSpiBus *parent, const hf_spi_device_config_t &config) noexcept |
| |
| | ~StmSpiDevice () noexcept override |
| |
| bool | Initialize () noexcept override |
| | Initialize the SPI bus.
|
| |
| bool | Deinitialize () noexcept override |
| | Deinitialize the SPI bus.
|
| |
| hf_spi_err_t | Transfer (const hf_u8_t *tx_data, hf_u8_t *rx_data, hf_u16_t length, hf_u32_t timeout_ms=0) noexcept override |
| | Perform a full-duplex SPI transfer.
|
| |
| const void * | GetDeviceConfig () const noexcept override |
| | Get the device configuration for this SPI device.
|
| |
| const hf_spi_device_config_t & | GetConfig () const noexcept |
| | Get the device configuration.
|
| |
| virtual | ~BaseSpi () noexcept=default |
| | Virtual destructor ensures proper cleanup in derived classes.
|
| |
| | BaseSpi (const BaseSpi &)=delete |
| |
| BaseSpi & | operator= (const BaseSpi &)=delete |
| |
| | BaseSpi (BaseSpi &&)=delete |
| |
| BaseSpi & | operator= (BaseSpi &&)=delete |
| |
| bool | EnsureInitialized () noexcept |
| | Ensures that the SPI bus is initialized (lazy initialization).
|
| |
| bool | EnsureDeinitialized () noexcept |
| | Ensures that the SPI bus is deinitialized (lazy deinitialization).
|
| |
| bool | IsInitialized () const noexcept |
| | Checks if the bus is initialized.
|
| |
| virtual bool | Open () noexcept |
| | Legacy compatibility: Open and initialize the SPI bus.
|
| |
| virtual bool | Close () noexcept |
| | Legacy compatibility: Close and de-initialize the SPI bus.
|
| |
| virtual bool | Transfer (const hf_u8_t *tx_data, hf_u8_t *rx_data, hf_u16_t length) noexcept |
| | Legacy compatibility: Transfer with boolean return.
|
| |
| virtual hf_spi_err_t | Write (const hf_u8_t *data, hf_u16_t length, hf_u32_t timeout_ms=0) noexcept |
| | Write data to SPI bus.
|
| |
| virtual hf_spi_err_t | Read (hf_u8_t *data, hf_u16_t length, hf_u32_t timeout_ms=0) noexcept |
| | Read data from SPI bus.
|
| |
| virtual bool | Write (const hf_u8_t *data, hf_u16_t length) noexcept |
| | Legacy compatibility: Write with boolean return.
|
| |
| virtual bool | Read (hf_u8_t *data, hf_u16_t length) noexcept |
| | Legacy compatibility: Read with boolean return.
|
| |
| virtual bool | WriteByte (hf_u8_t data) noexcept |
| | Write single byte to SPI bus.
|
| |
| virtual bool | ReadByte (hf_u8_t &data) noexcept |
| | Read single byte from SPI bus.
|
| |
| virtual bool | TransferByte (hf_u8_t tx_data, hf_u8_t &rx_data) noexcept |
| | Write single byte and read response.
|
| |
| virtual hf_spi_err_t | ResetStatistics () noexcept |
| | Reset SPI operation statistics.
|
| |
| virtual hf_spi_err_t | ResetDiagnostics () noexcept |
| | Reset SPI diagnostic information.
|
| |
| virtual hf_spi_err_t | GetStatistics (hf_spi_statistics_t &statistics) const noexcept |
| | Get SPI operation statistics.
|
| |
| virtual hf_spi_err_t | GetDiagnostics (hf_spi_diagnostics_t &diagnostics) const noexcept |
| | Get SPI diagnostic information.
|
| |
STM32 SPI device — manages chip-select and delegates transfers to parent bus.
Each device has its own CS pin (managed via HAL_GPIO_WritePin). The actual SPI peripheral (SCK/MOSI/MISO) is shared via the parent bus.