cc3200: Add implementations of mp_import_stat and builtin_open.

They disappeared when stmhal changed to use new MICROPY_VFS code.
This commit is contained in:
Damien George 2017-01-27 23:14:11 +11:00
parent 84c614e729
commit bfa948c0a5
2 changed files with 11 additions and 2 deletions

View File

@ -157,8 +157,6 @@ APP_LIB_SRC_C = $(addprefix lib/,\
APP_STM_SRC_C = $(addprefix stmhal/,\
bufhelper.c \
builtin_open.c \
import.c \
input.c \
irq.c \
pybstdio.c \

View File

@ -113,3 +113,14 @@ void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer,
*ppxIdleTaskStackBuffer = uxIdleTaskStack;
*pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
}
// the following is temporay, until cc3200 converts to oofatfs
#include "py/lexer.h"
#include "extmod/vfs_fat.h"
mp_import_stat_t mp_import_stat(const char *path) {
return fat_vfs_import_stat(NULL, path);
}
MP_DEFINE_CONST_FUN_OBJ_KW(mp_builtin_open_obj, 1, fatfs_builtin_open);