FastLED 3.10.6
Loading...
Searching...
No Matches

◆ acceptsAll()

bool fl::PinSet::acceptsAll ( const PinBitset & request) const

True iff every set bit in request is also accepted here.

For AnyOutputPin: trivially true. For Allowlist: bitset inclusion check. Definition in capabilities.cpp.hpp.

Definition at line 37 of file capabilities.cpp.hpp.

37 {
38 if (kind == PinSetKind::None) {
39 return request.none();
40 }
42 return true;
43 }
44 // Allowlist: every requested bit must be in `pins`.
45 for (fl::u32 i = 0; i < kPinSetCapacity; ++i) {
46 if (request.test(i) && !pins.test(i)) {
47 return false;
48 }
49 }
50 return true;
51}
static constexpr fl::u32 kPinSetCapacity
Maximum pin number representable in a PinSet's bitset.
PinSetKind kind
PinBitset pins
only meaningful when kind == Allowlist

References fl::AnyOutputPin, fl::FL_NO_EXCEPT, kind, fl::kPinSetCapacity, fl::None, and pins.