mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
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:
@@ -34,6 +34,8 @@
|
||||
#include "storage.h"
|
||||
#include "irq.h"
|
||||
|
||||
#if MICROPY_HW_ENABLE_STORAGE
|
||||
|
||||
#define FLASH_PART1_START_BLOCK (0x100)
|
||||
|
||||
#if defined(MICROPY_HW_BDEV2_IOCTL)
|
||||
@@ -284,3 +286,5 @@ void pyb_flash_init_vfs(fs_user_mount_t *vfs) {
|
||||
vfs->u.ioctl[0] = (mp_obj_t)&pyb_flash_ioctl_obj;
|
||||
vfs->u.ioctl[1] = (mp_obj_t)&pyb_flash_obj;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user