Debian Codegraph @

ports/stm32/boards/VCC_GND_F407VE/bdev.c

raw
1 #include "storage.h"
2
3 #if !MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE
4
5 // External SPI flash uses standard SPI interface
6
7 static const mp_soft_spi_obj_t soft_spi_bus = {
8 .delay_half = MICROPY_HW_SOFTSPI_MIN_DELAY,
9 .polarity = 0,
10 .phase = 0,
11 .sck = MICROPY_HW_SPIFLASH_SCK,
12 .mosi = MICROPY_HW_SPIFLASH_MOSI,
13 .miso = MICROPY_HW_SPIFLASH_MISO,
14 };
15
16 static mp_spiflash_cache_t spi_bdev_cache;
17
18 const mp_spiflash_config_t spiflash_config = {
19 .bus_kind = MP_SPIFLASH_BUS_SPI,
20 .bus.u_spi.cs = MICROPY_HW_SPIFLASH_CS,
21 .bus.u_spi.data = (void *)&soft_spi_bus,
22 .bus.u_spi.proto = &mp_soft_spi_proto,
23 .cache = &spi_bdev_cache,
24 };
25
26 spi_bdev_t spi_bdev;
27
28 #endif