summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Leech <andrew.leech@planetinnovation.com.au>2022-08-19 13:49:03 +1000
committerDamien George <damien@micropython.org>2023-02-16 12:04:29 +1100
commit75e7e7d034cff8e73070faa2d7b5df88d3367ae1 (patch)
tree83c0ccdf28ca73addc18ace70fef2b8a4c6f80d1
parent177ae2f346b840f6e10dffc41e9cd1e47c9c9c1b (diff)
stm32/boards/STM32F769DISC: Fix building with USE_QSPI_XIP=1.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/stm32/boards/STM32F769DISC/board_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/stm32/boards/STM32F769DISC/board_init.c b/ports/stm32/boards/STM32F769DISC/board_init.c
index 6bb3dfb1f..e89d187fe 100644
--- a/ports/stm32/boards/STM32F769DISC/board_init.c
+++ b/ports/stm32/boards/STM32F769DISC/board_init.c
@@ -3,13 +3,17 @@
// This configuration is needed for mboot to be able to write to the external QSPI flash
+#if MICROPY_HW_SPIFLASH_ENABLE_CACHE
STATIC mp_spiflash_cache_t spi_bdev_cache;
+#endif
const mp_spiflash_config_t spiflash_config = {
.bus_kind = MP_SPIFLASH_BUS_QSPI,
.bus.u_qspi.data = NULL,
.bus.u_qspi.proto = &qspi_proto,
+ #if MICROPY_HW_SPIFLASH_ENABLE_CACHE
.cache = &spi_bdev_cache,
+ #endif
};
spi_bdev_t spi_bdev;