circuitpython/ports/stm32/boards/STM32F769DISC/board_init.c
Andrew Leech 75e7e7d034 stm32/boards/STM32F769DISC: Fix building with USE_QSPI_XIP=1.
Signed-off-by: Damien George <damien@micropython.org>
2023-02-16 12:04:29 +11:00

27 lines
637 B
C

#include "storage.h"
#include "qspi.h"
// 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;
// This init function is needed to memory map the QSPI flash early in the boot process
void board_early_init(void) {
qspi_init();
qspi_memory_map();
}