diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-03-03 14:08:27 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-03-03 14:08:27 +0200 |
commit | 3aa0f2eed35636fdc49a5ac053727ad2379232cd (patch) | |
tree | ecd8939f749a0f425c2e764d8d42e662f3c0f8ea /extmod/vfs_fat_lexer.c | |
parent | 453a2a3d7c61be155bca0ac93d1d0193dd4ad1bc (diff) | |
download | micropython-3aa0f2eed35636fdc49a5ac053727ad2379232cd.tar.gz micropython-3aa0f2eed35636fdc49a5ac053727ad2379232cd.zip |
extmod/vfs_fat_lexer: Make conditional on FatFs support enabled.
Diffstat (limited to 'extmod/vfs_fat_lexer.c')
-rw-r--r-- | extmod/vfs_fat_lexer.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/extmod/vfs_fat_lexer.c b/extmod/vfs_fat_lexer.c index c99ca9e264..f83bfb3fbf 100644 --- a/extmod/vfs_fat_lexer.c +++ b/extmod/vfs_fat_lexer.c @@ -24,7 +24,10 @@ * THE SOFTWARE. */ -#include <stdio.h> +#include "py/mpconfig.h" +// *_ADHOC part is for cc3200 port which doesn't use general uPy +// infrastructure and instead duplicates code. TODO: Resolve. +#if MICROPY_VFS_FAT || MICROPY_FSUSERMOUNT || MICROPY_FSUSERMOUNT_ADHOC #include "py/lexer.h" #include "lib/fatfs/ff.h" @@ -74,3 +77,5 @@ mp_lexer_t *fat_vfs_lexer_new_from_file(const char *filename) { fb->pos = 0; return mp_lexer_new(qstr_from_str(filename), fb, (mp_lexer_stream_next_byte_t)file_buf_next_byte, (mp_lexer_stream_close_t)file_buf_close); } + +#endif // MICROPY_VFS_FAT |