Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FRESULT res1;
- UINT cnt1;
- uint8_t fsm_read_file(FIL * fil, uint16_t * buffer, uint16_t length) {
- res1 = f_read(fil, buffer, 16, &cnt1);
- for(uint16_t i = 0; i < length; i++) {
- buffer[i] = 0;
- }
- if(res1) {
- LOGE("Read sample file error", res1);
- return RET_ERROR;
- }
- if(cnt1 < 16) {
- return RET_FILE_FINISHED;
- }
- return RET_OK;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement