circuitpython/ports/stm32/boards/ADAFRUIT_F405_EXPRESS/bdev.c

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
603 B
C
Raw Normal View History

#include "py/obj.h"
#include "storage.h"
#include "spi.h"
#if !MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE
STATIC const spi_proto_cfg_t spi_bus = {
.spi = &spi_obj[0], // SPI1
.baudrate = 25000000,
.polarity = 0,
.phase = 0,
.bits = 8,
.firstbit = SPI_FIRSTBIT_MSB,
};
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 *)&spi_bus,
.bus.u_spi.proto = &spi_proto,
.cache = &spi_bdev_cache,
};
spi_bdev_t spi_bdev;
#endif