8000 nrf/mpconfigport: Fix MICROPY_VFS IO build support. · micropython/micropython@494e8ba · GitHub
[go: up one dir, main page]

Skip to content

Commit 494e8ba

Browse files
pi-anldpgeorge
authored andcommitted
nrf/mpconfigport: Fix MICROPY_VFS IO build support.
1 parent c5878dd commit 494e8ba

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

ports/nrf/mpconfigport.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,22 @@
133133
#define MICROPY_FATFS_MAX_SS (4096)
134134
#endif
135135

136-
// TODO these should be generic, not bound to fatfs
136+
#if MICROPY_VFS
137+
// TODO these should be generic, not bound to a particular FS implementation
138+
#if MICROPY_VFS_FAT
139+
#define mp_type_fileio mp_type_vfs_fat_fileio
140+
#define mp_type_textio mp_type_vfs_fat_textio
141+
#elif MICROPY_VFS_LFS1
142+
#define mp_type_fileio mp_type_vfs_lfs1_fileio
143+
#define mp_type_textio mp_type_vfs_lfs1_textio
144+
#elif MICROPY_VFS_LFS2
145+
#define mp_type_fileio mp_type_vfs_lfs2_fileio
146+
#define mp_type_textio mp_type_vfs_lfs2_textio
147+
#endif
148+
#else // !MICROPY_VFS_FAT
137149
#define mp_type_fileio fatfs_type_fileio
138150
#define mp_type_textio fatfs_type_textio
151+
#endif
139152

140153
// Use port specific uos module rather than extmod variant.
141154
#define MICROPY_PY_UOS (0)

0 commit comments

Comments
 (0)
0