nrf/mpconfigport: Fix MICROPY_VFS IO build support.

This commit is contained in:
Andrew Leech 2022-03-01 15:17:16 +11:00 committed by Damien George
parent c5878dd1f9
commit 494e8ba722
1 changed files with 14 additions and 1 deletions

View File

@ -133,9 +133,22 @@
#define MICROPY_FATFS_MAX_SS (4096)
#endif
// TODO these should be generic, not bound to fatfs
#if MICROPY_VFS
// TODO these should be generic, not bound to a particular FS implementation
#if MICROPY_VFS_FAT
#define mp_type_fileio mp_type_vfs_fat_fileio
#define mp_type_textio mp_type_vfs_fat_textio
#elif MICROPY_VFS_LFS1
#define mp_type_fileio mp_type_vfs_lfs1_fileio
#define mp_type_textio mp_type_vfs_lfs1_textio
#elif MICROPY_VFS_LFS2
#define mp_type_fileio mp_type_vfs_lfs2_fileio
#define mp_type_textio mp_type_vfs_lfs2_textio
#endif
#else // !MICROPY_VFS_FAT
#define mp_type_fileio fatfs_type_fileio
#define mp_type_textio fatfs_type_textio
#endif
// Use port specific uos module rather than extmod variant.
#define MICROPY_PY_UOS (0)