![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
1 /*-----------------------------------------------------------------------*/ 2 /* Forward data to the stream directly (available on only tiny cfg) */ 3 /*-----------------------------------------------------------------------*/ 4 5 FRESULT f_forward ( 6 FIL *fp, /* Pointer to the file object */ 7 UINT (*func)(const BYTE*,UINT), /* Pointer to the streaming function */ 8 UINT btr, /* Number of bytes to forward */ 9 UINT *bf /* Pointer to number of bytes forwarded */ 10 ) 11 { 12 FRESULT res; 13 DWORD remain, clst, sect; 14 UINT rcnt; 15 BYTE csect; 16 17 18 *bf = 0; /* Initialize byte counter */ 19 20 res = validate(fp->fs, fp->id); /* Check validity of the object */ 21 if (res != FR_OK) LEAVE_FF(fp->