|
HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
|
STM32 SPI bus — manages the HAL handle and device collection. More...
#include <StmSpi.h>
Public Member Functions | |
| StmSpiBus (const hf_spi_bus_config_t &config) noexcept | |
| StmSpiBus (SPI_HandleTypeDef *hal_handle, hf_u32_t timeout_ms=1000) noexcept | |
| Convenience: construct directly from HAL handle. | |
| ~StmSpiBus () noexcept | |
| bool | Initialize () noexcept |
| bool | IsInitialized () const noexcept |
| bool | Deinitialize () noexcept |
| int | CreateDevice (const hf_spi_device_config_t &device_config) noexcept |
| BaseSpi * | GetDevice (int device_index) noexcept |
| const BaseSpi * | GetDevice (int device_index) const noexcept |
| std::size_t | GetDeviceCount () const noexcept |
| bool | RemoveDevice (int device_index) noexcept |
| const hf_spi_bus_config_t & | GetConfig () const noexcept |
| SPI_HandleTypeDef * | GetHalHandle () const noexcept |
| Get the STM32 HAL SPI handle. | |
Private Attributes | |
| hf_spi_bus_config_t | config_ |
| bool | initialized_ {false} |
| std::vector< std::unique_ptr< StmSpiDevice > > | devices_ |
STM32 SPI bus — manages the HAL handle and device collection.
One bus instance per SPI peripheral (SPI1, SPI2, etc.).
|
explicitnoexcept |
|
explicitnoexcept |
Convenience: construct directly from HAL handle.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Get the STM32 HAL SPI handle.
|
noexcept |
|
noexcept |
|
noexcept |
|
private |
|
private |
|
private |