add fatfs update when there is usbmsc write

This commit is contained in:
hathach committed 2018-10-25 20:56:58 +07:00
1 parent ee5a2e490a
commit 09bf2f47b8
5 files changed
+32 -17

No files matched your search

+7
View File
@@ -69,6 +69,9 @@ class FatFS: public BluefuritLib::FileSystemClass
virtual BluefuritLib::File _f_openNextFile (void* fhdl, char const* cwd, uint8_t mode);
virtual void _f_rewindDirectory (void* fhdl);
// called when Flash contents is changed out of the awareness of ExternalFS such as USB MSC write
void _usbmsc_write (uint32_t lba, void const* buffer, uint32_t bufsize);
private:
FATFS* _fs;
bool _begun;
@@ -79,4 +82,8 @@ class FatFS: public BluefuritLib::FileSystemClass
extern FatFS ExternalFS;
// C to CPP call bridge for update fatfs cached sector
extern "C" void ExternalFS_usbmsc_write (uint32_t lba, void const* buffer, uint32_t bufsize);
#endif /* EXTERNALFS_H_ */