FastLED 3.9.15
Loading...
Searching...
No Matches

◆ readBytes()

size_t fl::video::PixelStream::readBytes ( u8 * dst,
size_t len )

Definition at line 220 of file pixel_stream.cpp.hpp.

220 {
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}
fl::filebuf_ptr mHandle

References available(), kStreaming, mHandle, and mType.

+ Here is the call graph for this function: