stm32/boards: Enable MICROPY_HW_SPIFLASH_ENABLE_CACHE on VCC_GND boards.
Because these boards use the SPI flash cache in their bdev.c configuration. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
71e3538a32
commit
cf849d84b9
2 changed files with 2 additions and 0 deletions
|
|
@ -132,6 +132,7 @@ void VCC_GND_F407VE_board_early_init(void);
|
||||||
|
|
||||||
extern const struct _mp_spiflash_config_t spiflash_config;
|
extern const struct _mp_spiflash_config_t spiflash_config;
|
||||||
extern struct _spi_bdev_t spi_bdev;
|
extern struct _spi_bdev_t spi_bdev;
|
||||||
|
#define MICROPY_HW_SPIFLASH_ENABLE_CACHE (1)
|
||||||
#define MICROPY_HW_BDEV_IOCTL(op, arg) ( \
|
#define MICROPY_HW_BDEV_IOCTL(op, arg) ( \
|
||||||
(op) == BDEV_IOCTL_NUM_BLOCKS ? (MICROPY_HW_SPIFLASH_SIZE_BITS / 8 / FLASH_BLOCK_SIZE) : \
|
(op) == BDEV_IOCTL_NUM_BLOCKS ? (MICROPY_HW_SPIFLASH_SIZE_BITS / 8 / FLASH_BLOCK_SIZE) : \
|
||||||
(op) == BDEV_IOCTL_INIT ? spi_bdev_ioctl(&spi_bdev, (op), (uint32_t)&spiflash_config) : \
|
(op) == BDEV_IOCTL_INIT ? spi_bdev_ioctl(&spi_bdev, (op), (uint32_t)&spiflash_config) : \
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,7 @@ void VCC_GND_F407ZG_board_early_init(void);
|
||||||
|
|
||||||
extern const struct _mp_spiflash_config_t spiflash_config;
|
extern const struct _mp_spiflash_config_t spiflash_config;
|
||||||
extern struct _spi_bdev_t spi_bdev;
|
extern struct _spi_bdev_t spi_bdev;
|
||||||
|
#define MICROPY_HW_SPIFLASH_ENABLE_CACHE (1)
|
||||||
#define MICROPY_HW_BDEV_IOCTL(op, arg) ( \
|
#define MICROPY_HW_BDEV_IOCTL(op, arg) ( \
|
||||||
(op) == BDEV_IOCTL_NUM_BLOCKS ? (MICROPY_HW_SPIFLASH_SIZE_BITS / 8 / FLASH_BLOCK_SIZE) : \
|
(op) == BDEV_IOCTL_NUM_BLOCKS ? (MICROPY_HW_SPIFLASH_SIZE_BITS / 8 / FLASH_BLOCK_SIZE) : \
|
||||||
(op) == BDEV_IOCTL_INIT ? spi_bdev_ioctl(&spi_bdev, (op), (uint32_t)&spiflash_config) : \
|
(op) == BDEV_IOCTL_INIT ? spi_bdev_ioctl(&spi_bdev, (op), (uint32_t)&spiflash_config) : \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue