stm32: Allow to have no storage support if there are no block devices.

If no block devices are defined by a board then storage support will be
disabled.  This means there is no filesystem provided by either the
internal flash or external SPI flash.  But the VFS system can still be
enabled and filesystems provided on external devices like an SD card.
This commit is contained in:
Damien George
2018-05-28 10:57:27 +10:00
parent aa4a7a8732
commit f497723802
6 changed files with 31 additions and 1 deletions

View File

@@ -30,6 +30,8 @@
#include "led.h"
#include "storage.h"
#if MICROPY_HW_ENABLE_STORAGE
int32_t spi_bdev_ioctl(spi_bdev_t *bdev, uint32_t op, uint32_t arg) {
switch (op) {
case BDEV_IOCTL_INIT:
@@ -79,3 +81,5 @@ int spi_bdev_writeblocks(spi_bdev_t *bdev, const uint8_t *src, uint32_t block_nu
return ret;
}
#endif