diff options
author | Damien George <damien.p.george@gmail.com> | 2016-02-10 16:32:57 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-02-10 23:40:10 +0000 |
commit | b33a7705966a743c5e4c0c3c3bb83e6d97b5e84d (patch) | |
tree | 2c62a5389a7f0189119b5fcbbb9b30f0ff5b9db5 /stmhal/storage.h | |
parent | 34023eb673d5356bb4eb6fc635d6d48eefb35135 (diff) | |
download | micropython-b33a7705966a743c5e4c0c3c3bb83e6d97b5e84d.tar.gz micropython-b33a7705966a743c5e4c0c3c3bb83e6d97b5e84d.zip |
extmod/fsusermount: Support mounting of multiple block devices.
This patch adds support to fsusermount for multiple block devices
(instead of just one). The maximum allowed is fixed at compile time by
the size of the fs_user_mount array accessed via MP_STATE_PORT, which
in turn is set by MICROPY_FATFS_VOLUMES.
With this patch, stmhal (which is still tightly coupled to fsusermount)
is also modified to support mounting multiple devices And the flash and
SD card are now just two block devices that are mounted at start up if
they exist (and they have special native code to make them more
efficient).
Diffstat (limited to 'stmhal/storage.h')
-rw-r--r-- | stmhal/storage.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/stmhal/storage.h b/stmhal/storage.h index 30aa483095..4d3de77eda 100644 --- a/stmhal/storage.h +++ b/stmhal/storage.h @@ -42,3 +42,6 @@ mp_uint_t storage_read_blocks(uint8_t *dest, uint32_t block_num, uint32_t num_bl mp_uint_t storage_write_blocks(const uint8_t *src, uint32_t block_num, uint32_t num_blocks); extern const struct _mp_obj_type_t pyb_flash_type; + +struct _fs_user_mount_t; +void pyb_flash_init_vfs(struct _fs_user_mount_t *vfs); |