@brief Result structure for SPI transmit operations @details Contains success/error status, error message, and error code
| 106 | /// @brief Result structure for SPI transmit operations |
| 107 | /// @details Contains success/error status, error message, and error code |
| 108 | struct SPITransmitResult { |
| 109 | bool is_ok; |
| 110 | fl::string error_message; |
| 111 | SPIError error_code; |
| 112 | |
| 113 | /// @brief Default constructor (successful transmission) |
| 114 | SPITransmitResult() FL_NOEXCEPT; |
| 115 | |
| 116 | /// @brief Construct successful result |
| 117 | static SPITransmitResult success() FL_NOEXCEPT; |
| 118 | |
| 119 | /// @brief Construct error result with code and message |
| 120 | static SPITransmitResult error(SPIError err, const fl::string& msg) FL_NOEXCEPT; |
| 121 | |
| 122 | /// @brief Construct error result with code only |
| 123 | static SPITransmitResult error(SPIError err) FL_NOEXCEPT; |
| 124 | |
| 125 | /// @brief Check if transmission succeeded |
| 126 | bool ok() const FL_NOEXCEPT; |
| 127 | |
| 128 | /// @brief Get error code (only meaningful if ok() returns false) |
| 129 | SPIError error() const FL_NOEXCEPT; |
| 130 | |
| 131 | /// @brief Get error message (only meaningful if ok() returns false) |
| 132 | const fl::string& message() const FL_NOEXCEPT; |
| 133 | }; |
| 134 | |
| 135 | } // namespace fl |
no outgoing calls
no test coverage detected