diff options
author | Damien George <damien.p.george@gmail.com> | 2018-06-07 14:15:10 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-06-14 16:52:56 +1000 |
commit | 335d26b27d238cca9b4447a46d187d4c6f573d3a (patch) | |
tree | cf256396ae54c93642f8f39146286056f626a7ba | |
parent | 86fe73beb99686ea15787f0603ad6f10a642054c (diff) |
stm32/boards/STM32L476DISC: Update SPI flash config for cache change.
-rw-r--r-- | ports/stm32/boards/STM32L476DISC/bdev.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ports/stm32/boards/STM32L476DISC/bdev.c b/ports/stm32/boards/STM32L476DISC/bdev.c index 6b353a2f9..01f06b8b1 100644 --- a/ports/stm32/boards/STM32L476DISC/bdev.c +++ b/ports/stm32/boards/STM32L476DISC/bdev.c @@ -2,7 +2,7 @@ // External SPI flash uses standard SPI interface -const mp_soft_spi_obj_t soft_spi_bus = { +STATIC const mp_soft_spi_obj_t soft_spi_bus = { .delay_half = MICROPY_HW_SOFTSPI_MIN_DELAY, .polarity = 0, .phase = 0, @@ -11,11 +11,14 @@ const mp_soft_spi_obj_t soft_spi_bus = { .miso = MICROPY_HW_SPIFLASH_MISO, }; +STATIC mp_spiflash_cache_t spi_bdev_cache; + const mp_spiflash_config_t spiflash_config = { .bus_kind = MP_SPIFLASH_BUS_SPI, .bus.u_spi.cs = MICROPY_HW_SPIFLASH_CS, .bus.u_spi.data = (void*)&soft_spi_bus, .bus.u_spi.proto = &mp_soft_spi_proto, + .cache = &spi_bdev_cache, }; spi_bdev_t spi_bdev; |