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

Method readBytes

src/fl/video/pixel_stream.cpp.hpp:220–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218}
219
220size_t PixelStream::readBytes(u8 *dst, size_t len) {
221 u16 bytesRead = 0;
222 if (mType == kStreaming) {
223 while (bytesRead < len && mHandle->available(len)) {
224 if (mHandle->read(dst + bytesRead, 1)) {
225 bytesRead++;
226 } else {
227 break;
228 }
229 }
230 } else {
231 while (bytesRead < len && mHandle->available()) {
232 if (mHandle->read(dst + bytesRead, 1)) {
233 bytesRead++;
234 } else {
235 break;
236 }
237 }
238 }
239 return bytesRead;
240}
241
242} // namespace video
243} // namespace fl

Callers

nothing calls this directly

Calls 2

availableMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected