|
idfxx 1.0.0
Modern C++23 components for ESP-IDF
|
SPI transaction descriptor for full-control transactions. More...
Public Attributes | |
| idfxx::flags< trans_flags > | flags = {} |
| Per-transaction flags. | |
| uint16_t | cmd = 0 |
| Command data (length set by device config or variable_cmd). | |
| uint64_t | addr = 0 |
| Address data (length set by device config or variable_addr). | |
| std::span< const uint8_t > | tx_buffer = {} |
| Transmit buffer, or empty for no MOSI phase. | |
| std::span< uint8_t > | rx_buffer = {} |
| Receive buffer, or empty for no MISO phase. | |
| size_t | length = 0 |
| Total data length in bits. | |
| size_t | rx_length = 0 |
| Receive length in bits (0 = same as length). | |
| freq::hertz | override_freq {0} |
| Override clock speed for this transaction (0 = no override). | |
| uint8_t | command_bits = 0 |
| Command length for variable_cmd flag. | |
| uint8_t | address_bits = 0 |
| Address length for variable_addr flag. | |
| uint8_t | dummy_bits = 0 |
| Dummy length for variable_dummy flag. | |
SPI transaction descriptor for full-control transactions.
All length fields are in bits.
A transaction is a value type: it can be freely copied, moved, and stored in containers (e.g. std::vector). When passed to the async queue API, the transaction value itself may be dropped or reused once queue_trans() returns — only the buffers referenced by tx_buffer / rx_buffer must remain valid until the returned future signals completion.
Definition at line 175 of file master.hpp.
| uint64_t idfxx::spi::transaction::addr = 0 |
Address data (length set by device config or variable_addr).
Definition at line 178 of file master.hpp.
| uint8_t idfxx::spi::transaction::address_bits = 0 |
Address length for variable_addr flag.
Definition at line 185 of file master.hpp.
| uint16_t idfxx::spi::transaction::cmd = 0 |
Command data (length set by device config or variable_cmd).
Definition at line 177 of file master.hpp.
| uint8_t idfxx::spi::transaction::command_bits = 0 |
Command length for variable_cmd flag.
Definition at line 184 of file master.hpp.
| uint8_t idfxx::spi::transaction::dummy_bits = 0 |
Dummy length for variable_dummy flag.
Definition at line 186 of file master.hpp.
| idfxx::flags<trans_flags> idfxx::spi::transaction::flags = {} |
Per-transaction flags.
Definition at line 176 of file master.hpp.
| size_t idfxx::spi::transaction::length = 0 |
Total data length in bits.
Definition at line 181 of file master.hpp.
| freq::hertz idfxx::spi::transaction::override_freq {0} |
Override clock speed for this transaction (0 = no override).
Definition at line 183 of file master.hpp.
| std::span<uint8_t> idfxx::spi::transaction::rx_buffer = {} |
Receive buffer, or empty for no MISO phase.
Definition at line 180 of file master.hpp.
| size_t idfxx::spi::transaction::rx_length = 0 |
Receive length in bits (0 = same as length).
Definition at line 182 of file master.hpp.
Transmit buffer, or empty for no MOSI phase.
Definition at line 179 of file master.hpp.