diff options
author | José Simões <jose.simoes@eclo.solutions> | 2019-03-07 16:30:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-07 16:30:13 +0000 |
commit | ab0b1c80d2683ea0e6ce9791e4c3eb327c318b42 (patch) | |
tree | 9a5fbdae72757d4980108f200918b5bcbe38d953 | |
parent | 34701463fcc4d7a0a5a226f9a464de8077cf8744 (diff) | |
download | ChibiOS-Contrib-ab0b1c80d2683ea0e6ce9791e4c3eb327c318b42.tar.gz ChibiOS-Contrib-ab0b1c80d2683ea0e6ce9791e4c3eb327c318b42.tar.bz2 ChibiOS-Contrib-ab0b1c80d2683ea0e6ce9791e4c3eb327c318b42.zip |
Add call to cache flush on disk write
- This is required for F7 targets (and others that feature memory cache).
- The call is provided empty for all the other series, so it's OK to use it as it is.
-rw-r--r-- | os/various/fatfs_bindings/fatfs_diskio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/os/various/fatfs_bindings/fatfs_diskio.c b/os/various/fatfs_bindings/fatfs_diskio.c index 1b3f0a8..39a8658 100644 --- a/os/various/fatfs_bindings/fatfs_diskio.c +++ b/os/various/fatfs_bindings/fatfs_diskio.c @@ -206,6 +206,9 @@ DRESULT disk_write ( UINT count /* Number of sectors to write (1..255) */ ) { + // invalidate cache on buffer + cacheBufferFlush(buff, count * MMCSD_BLOCK_SIZE); + switch (pdrv) { #if HAL_USE_MMC_SPI case MMC: |