@brief Request structure for SPI transmit operations @details Contains the DMA buffer and transmission mode @warning This structure is consumed by transmit(). After calling spi.transmit(&request), the buffer's shared_ptr will be null and the span will be empty.
| 85 | /// @warning This structure is consumed by transmit(). After calling spi.transmit(&request), |
| 86 | /// the buffer's shared_ptr will be null and the span will be empty. |
| 87 | struct SPITransmitRequest { |
| 88 | DMABuffer buffer; |
| 89 | TransmitMode mode; |
| 90 | |
| 91 | /// @brief Default constructor |
| 92 | SPITransmitRequest() FL_NOEXCEPT; |
| 93 | |
| 94 | /// @brief Construct with buffer and mode |
| 95 | SPITransmitRequest(const DMABuffer& buf, TransmitMode m = TransmitMode::ASYNC) FL_NOEXCEPT; |
| 96 | |
| 97 | /// @brief Move the buffer out of this request (consumes the buffer) |
| 98 | /// @details This is called internally by transmit() to take ownership |
| 99 | /// @return The buffer with ownership transferred |
| 100 | DMABuffer take_buffer() FL_NOEXCEPT; |
| 101 | |
| 102 | /// @brief Check if the request still has a valid buffer |
| 103 | bool has_buffer() const FL_NOEXCEPT; |
| 104 | }; |
| 105 | |
| 106 | /// @brief Result structure for SPI transmit operations |
| 107 | /// @details Contains success/error status, error message, and error code |