FastLED 3.9.15
Loading...
Searching...
No Matches
write_result.h
Go to the documentation of this file.
1#pragma once
2
5
6#include "fl/stl/string.h"
7#include "fl/stl/noexcept.h"
8
9namespace fl {
10
14 bool ok;
16
18 explicit WriteResult(const char* err) : ok(false), error(err) {}
19 explicit WriteResult(const fl::string& err) : ok(false), error(err) {}
20
22 operator bool() const { return ok; }
23};
24
25} // namespace fl
Base definition for an LED controller.
Definition crgb.hpp:179
#define FL_NOEXCEPT
WriteResult(const char *err)
fl::string error
Error message (empty if ok == true)
WriteResult() FL_NOEXCEPT
WriteResult(const fl::string &err)
bool ok
True if write succeeded, false if error.