rename ExternalFS updateCache()

This commit is contained in:
hathach committed 2019-04-17 11:19:49 +07:00
1 parent 7ac9e4216f
commit 6cb638ca8f
4 files changed
+9 -20

No files matched your search

+1 -9
View File
@@ -377,7 +377,7 @@ void FatFS::_f_rewindDirectory (void* fhdl)
}
// for USB MSC to check and update fatfs sector cache
void FatFS::_usbmsc_write (uint32_t lba, void const* buffer, uint32_t bufsize)
void FatFS::updateCache (uint32_t lba, void const* buffer, uint32_t bufsize)
{
VERIFY(_fs,);
if ( (lba <= _fs->winsect) && (_fs->winsect < (lba + bufsize / FF_MAX_SS)) )
@@ -386,12 +386,4 @@ void FatFS::_usbmsc_write (uint32_t lba, void const* buffer, uint32_t bufsize)
}
}
extern "C"
{
void ExternalFS_usbmsc_write (uint32_t lba, void const* buffer, uint32_t bufsize)
{
ExternalFS._usbmsc_write(lba, buffer, bufsize);
}
}
#endif
+2 -6
View File
@@ -70,8 +70,8 @@ class FatFS: public BluefruitFS::FileSystemClass
virtual BluefruitFS::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);
// Should call when flash contents is changed out of the awareness of ExternalFS such as USB MSC write
void updateCache (uint32_t lba, void const* buffer, uint32_t bufsize);
private:
FATFS* _fs;
@@ -83,8 +83,4 @@ class FatFS: public BluefruitFS::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_ */