Skip to content

Commit 2f02302

Browse files
committed
esp8266: Support importing modules from filesystem.
1 parent 1937953 commit 2f02302

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

esp8266/main.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,15 @@ void user_init(void) {
7373
system_init_done_cb(init_done);
7474
}
7575

76+
mp_lexer_t *fat_vfs_lexer_new_from_file(const char *filename);
77+
mp_import_stat_t fat_vfs_import_stat(const char *path);
78+
7679
mp_lexer_t *mp_lexer_new_from_file(const char *filename) {
77-
return NULL;
80+
return fat_vfs_lexer_new_from_file(filename);
7881
}
7982

8083
mp_import_stat_t mp_import_stat(const char *path) {
81-
return MP_IMPORT_STAT_NO_EXIST;
84+
return fat_vfs_import_stat(path);
8285
}
8386

8487
mp_obj_t mp_builtin_open(uint n_args, const mp_obj_t *args, mp_map_t *kwargs) {

0 commit comments

Comments
 (0)