static UINT JpgDecoderRead(JDEC* jd, /* Decoder object */BYTE* buff, /* Pointer to the read buffer (NULL:skip) */UINT nd /* Number of bytes to read/skip from input stream */)
{
UINT rb;
FIL *fil = (FIL*)jd->device; /* Input stream of this session */
if (buff) { /* Read nd bytes from the input strem */
f_read(fil, buff, nd, &rb);
return rb; /* Returns number of bytes could be read */