| 16 | } |
| 17 | |
| 18 | span<u8> |
| 19 | RectangularDrawBuffer::getLedsBufferBytesForPin(u8 pin, bool clear_first) { |
| 20 | auto it = mPinToLedSegment.find(pin); |
| 21 | if (it == mPinToLedSegment.end()) { |
| 22 | FASTLED_ASSERT(false, "Pin not found in RectangularDrawBuffer"); |
| 23 | return fl::span<u8>(); |
| 24 | } |
| 25 | fl::span<u8> slice = it->second; |
| 26 | if (clear_first) { |
| 27 | fl::memset(slice.data(), 0, slice.size() * sizeof(slice[0])); |
| 28 | } |
| 29 | return slice; |
| 30 | } |
| 31 | |
| 32 | bool RectangularDrawBuffer::onQueuingStart() { |
| 33 | if (mQueueState == QUEUEING) { |
no test coverage detected