summaryrefslogtreecommitdiff
path: root/stmhal/lexerfatfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/lexerfatfs.c')
-rw-r--r--stmhal/lexerfatfs.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/stmhal/lexerfatfs.c b/stmhal/lexerfatfs.c
index 1910587d8..0d1bfe3e2 100644
--- a/stmhal/lexerfatfs.c
+++ b/stmhal/lexerfatfs.c
@@ -1,17 +1,13 @@
#include <stdint.h>
#include <stdio.h>
-#if 0
-#include "ff.h"
-#endif
-
#include "misc.h"
#include "mpconfig.h"
#include "qstr.h"
#include "lexer.h"
#include "lexerfatfs.h"
+#include "ff.h"
-#if 0
typedef struct _mp_lexer_file_buf_t {
FIL fp;
char buf[20];
@@ -40,10 +36,8 @@ static void file_buf_close(mp_lexer_file_buf_t *fb) {
f_close(&fb->fp);
m_del_obj(mp_lexer_file_buf_t, fb);
}
-#endif
mp_lexer_t *mp_lexer_new_from_file(const char *filename) {
-#if 0
mp_lexer_file_buf_t *fb = m_new_obj(mp_lexer_file_buf_t);
FRESULT res = f_open(&fb->fp, filename, FA_READ);
if (res != FR_OK) {
@@ -55,7 +49,4 @@ mp_lexer_t *mp_lexer_new_from_file(const char *filename) {
fb->len = n;
fb->pos = 0;
return mp_lexer_new(qstr_from_str(filename), fb, (mp_lexer_stream_next_char_t)file_buf_next_char, (mp_lexer_stream_close_t)file_buf_close);
-#else
- return NULL;
-#endif
}