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

◆ inputCallback()

fl::size fl::third_party::TJpgInstanceDecoder::inputCallback ( JDEC * jd,
fl::u8 * buff,
fl::size nbyte )
staticprivate

Definition at line 298 of file driver.cpp.hpp.

298 {
299 EmbeddedTJpgState* state = reinterpret_cast<EmbeddedTJpgState*>(jd->device);
300
301 if (!state || !state->array_data) {
302 return 0;
303 }
304
305 fl::size remaining = state->array_size - state->array_index;
306 fl::size to_read = (nbyte < remaining) ? nbyte : remaining;
307
308 if (buff) {
309 fl::memcpy(buff, state->array_data + state->array_index, to_read);
310 }
311
312 state->array_index += to_read;
313 return to_read;
314}
TestState state
void * memcpy(void *dest, const void *src, size_t n) FL_NOEXCEPT

References FL_NOEXCEPT, fl::memcpy(), and state.

Referenced by initializeDecoder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: