MCPcopy Create free account
hub / github.com/FastLED/FastLED / SPITransmitResult

Class SPITransmitResult

src/platforms/shared/spi_types.h:108–133  ·  view source on GitHub ↗

@brief Result structure for SPI transmit operations @details Contains success/error status, error message, and error code

Source from the content-addressed store, hash-verified

106/// @brief Result structure for SPI transmit operations
107/// @details Contains success/error status, error message, and error code
108struct 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

Callers 2

spi_types.cpp.hppFile · 0.85
successMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected