summaryrefslogtreecommitdiff
path: root/drivers/memory/spiflash.h
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2025-03-19 15:47:35 +1100
committerDamien George <damien@micropython.org>2025-03-25 12:58:43 +1100
commitc61e85910879d5db120d00f7790ed36f4dcda44d (patch)
tree1235e998114ab7f3e9ada871a20c8d26a2d565e2 /drivers/memory/spiflash.h
parent274c8c419c97bdb54fa14de37a38b08dcefd1493 (diff)
drivers: Add MP_QSPI_IOCTL_MEMORY_MODIFIED to indicate flash changed.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'drivers/memory/spiflash.h')
-rw-r--r--drivers/memory/spiflash.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/memory/spiflash.h b/drivers/memory/spiflash.h
index 5ccf7d44c..edd7d4933 100644
--- a/drivers/memory/spiflash.h
+++ b/drivers/memory/spiflash.h
@@ -81,6 +81,8 @@ int mp_spiflash_write(mp_spiflash_t *self, uint32_t addr, size_t len, const uint
#if MICROPY_HW_SPIFLASH_ENABLE_CACHE
// These functions use the cache (which must already be configured)
+// Note: don't use these functions in combination with memory-mapped
+// flash, because MP_QSPI_IOCTL_MEMORY_MODIFIED is not called.
int mp_spiflash_cache_flush(mp_spiflash_t *self);
int mp_spiflash_cached_read(mp_spiflash_t *self, uint32_t addr, size_t len, uint8_t *dest);
int mp_spiflash_cached_write(mp_spiflash_t *self, uint32_t addr, size_t len, const uint8_t *src);