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

◆ isContiguousBitset()

bool fl::can_match_detail::isContiguousBitset ( const PinBitset & b)
inline

Definition at line 121 of file can_match.cpp.hpp.

121 {
122 fl::u32 lo = 0u;
123 fl::u32 hi = 0u;
124 bool found_lo = false;
125 for (fl::u32 i = 0; i < kPinSetCapacity; ++i) {
126 if (b.test(i)) {
127 if (!found_lo) {
128 lo = i;
129 found_lo = true;
130 }
131 hi = i;
132 }
133 }
134 if (!found_lo) {
135 return true;
136 }
137 return b.count() == (hi - lo + 1u);
138}
static constexpr fl::u32 kPinSetCapacity
Maximum pin number representable in a PinSet's bitset.

References fl::FL_NO_EXCEPT, and fl::kPinSetCapacity.

Referenced by checkOneGroup().

+ Here is the caller graph for this function: