056e0b6293
Can be used, for example, to configure external SPI flash using a hardware SPI interface (code to be put in a board's bdev.c file): STATIC const spi_proto_cfg_t hard_spi_bus = { .spi = &spi_obj[5], .baudrate = 10000000, .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 = pin_A0, .bus.u_spi.data = (void*)&hard_spi_bus, .bus.u_spi.proto = &spi_proto, .cache = &spi_bdev_cache, }; spi_bdev_t spi_bdev; |
||
---|---|---|
.. | ||
bare-arm | ||
cc3200 | ||
esp32 | ||
esp8266 | ||
minimal | ||
nrf | ||
pic16bit | ||
qemu-arm | ||
stm32 | ||
teensy | ||
unix | ||
windows | ||
zephyr |