fileops.h 508 B

12345678910111213141516171819202122
  1. // insert cool lenghty disclaimer here
  2. // fileops.h
  3. #ifndef FILEOPS_H
  4. #define FILEOPS_H
  5. #include "ff.h"
  6. BYTE file_buf[512];
  7. FATFS fatfs;
  8. FIL file_handle;
  9. FRESULT file_res;
  10. uint8_t file_lfn[256];
  11. void file_init(void);
  12. void file_open(uint8_t* filename, BYTE flags);
  13. void file_open_by_filinfo(FILINFO* fno);
  14. void file_close(void);
  15. UINT file_read(void);
  16. UINT file_write(void);
  17. UINT file_readblock(void* buf, uint32_t addr, uint16_t size);
  18. UINT file_writeblock(void* buf, uint32_t addr, uint16_t size);
  19. #endif