aboutsummaryrefslogtreecommitdiff
path: root/stmhal/import.c
diff options
context:
space:
mode:
authorDamien George2014-03-13 10:17:51 +0000
committerDamien George2014-03-13 10:17:51 +0000
commit659c19c67c00b156cb6890f926d5cc012d129f24 (patch)
tree303a4e00c9612951c8ab3cfbe926121724173fd1 /stmhal/import.c
parent19438fd30a3184b656221a59062ea32453d0fd16 (diff)
parentf14b92b9e13c9cb9f54a1d740dbea1eeedeccb5b (diff)
Merge pull request #342 from dhylands/stmhal-repl
REPL working on UART6 with STMHAL
Diffstat (limited to 'stmhal/import.c')
-rw-r--r--stmhal/import.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/stmhal/import.c b/stmhal/import.c
new file mode 100644
index 000000000..f2fd3b3de
--- /dev/null
+++ b/stmhal/import.c
@@ -0,0 +1,24 @@
+#include <stdint.h>
+
+#include "misc.h"
+#include "mpconfig.h"
+#include "qstr.h"
+#include "lexer.h"
+#if 0
+#include "ff.h"
+#endif
+
+mp_import_stat_t mp_import_stat(const char *path) {
+#if 0
+ FILINFO fno;
+ FRESULT res = f_stat(path, &fno);
+ if (res == FR_OK) {
+ if ((fno.fattrib & AM_DIR) != 0) {
+ return MP_IMPORT_STAT_DIR;
+ } else {
+ return MP_IMPORT_STAT_FILE;
+ }
+ }
+#endif
+ return MP_IMPORT_STAT_NO_EXIST;
+}