|
idfxx 1.0.0
Modern C++23 components for ESP-IDF
|
A SPI master bus. More...
Public Member Functions | |
| master_bus (enum host_device host, enum dma_chan dma_chan, struct bus_config config) | |
| Constructs a new SPI master bus. | |
| ~master_bus () | |
| master_bus (const master_bus &)=delete | |
| master_bus & | operator= (const master_bus &)=delete |
| master_bus (master_bus &&other) noexcept | |
| Move constructor. | |
| master_bus & | operator= (master_bus &&other) noexcept |
| Move assignment. | |
| enum host_device | host () const |
| Returns the host device ID the bus is using. | |
Static Public Member Functions | |
| static result< master_bus > | make (enum host_device host, enum dma_chan dma_chan, struct bus_config config) |
| Creates a new SPI master bus. | |
A SPI master bus.
Represents a SPI bus operating in master mode. This type is non-copyable and move-only. The destructor is a no-op on a moved-from object.
Definition at line 158 of file master.hpp.
|
explicit |
Constructs a new SPI master bus.
| host | SPI host device (e.g., SPI2_HOST). |
| dma_chan | DMA channel, or idfxx::spi::dma_chan::disabled. |
| config | Bus configuration. |
| std::system_error | on failure. |
| idfxx::spi::master_bus::~master_bus | ( | ) |
|
delete |
|
noexcept |
Move constructor.
Transfers bus ownership.
|
inline |
Returns the host device ID the bus is using.
Definition at line 198 of file master.hpp.
|
static |
Creates a new SPI master bus.
| host | SPI host device (e.g., SPI2_HOST). |
| dma_chan | DMA channel, or idfxx::spi::dma_chan::disabled. |
| config | Bus configuration. |
|
delete |
|
noexcept |
Move assignment.
Transfers bus ownership.