Skip to content

Commit 3aa0f2e

Browse files
committed
extmod/vfs_fat_lexer: Make conditional on FatFs support enabled.
1 parent 453a2a3 commit 3aa0f2e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

extmod/vfs_fat_lexer.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#include <stdio.h>
27+
#include "py/mpconfig.h"
28+
// *_ADHOC part is for cc3200 port which doesn't use general uPy
29+
// infrastructure and instead duplicates code. TODO: Resolve.
30+
#if MICROPY_VFS_FAT || MICROPY_FSUSERMOUNT || MICROPY_FSUSERMOUNT_ADHOC
2831

2932
#include "py/lexer.h"
3033
#include "lib/fatfs/ff.h"
@@ -74,3 +77,5 @@ mp_lexer_t *fat_vfs_lexer_new_from_file(const char *filename) {
7477
fb->pos = 0;
7578
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);
7679
}
80+
81+
#endif // MICROPY_VFS_FAT

0 commit comments

Comments
 (0)