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.
This commit is contained in:
José Simões 2019-03-07 16:30:13 +00:00 committed by GitHub
parent 34701463fc
commit ab0b1c80d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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: