Oliver Fabel 1 год назад
Родитель
Сommit
f496a77c88
3 измененных файлов с 25 добавлено и 1 удалено
  1. 12 0
      mp_flipper_repl.c
  2. 12 0
      mp_flipper_repl.h
  3. 1 1
      mpconfigport.h

+ 12 - 0
mp_flipper_repl.c

@@ -0,0 +1,12 @@
+#include "py/repl.h"
+#include "py/mpprint.h"
+
+#include "mp_flipper_repl.h"
+
+inline bool mp_flipper_repl_continue_with_input(const char* input) {
+    return mp_repl_continue_with_input(input);
+}
+
+inline size_t mp_flipper_repl_autocomplete(const char* str, size_t len, const mp_print_t* print, char** compl_str) {
+    return mp_repl_autocomplete(str, len, print, compl_str);
+}

+ 12 - 0
mp_flipper_repl.h

@@ -0,0 +1,12 @@
+#pragma once
+
+#include <stddef.h>
+#include <stdbool.h>
+
+#include "py/mpprint.h"
+
+#include "mp_flipper_runtime.h"
+
+bool mp_flipper_repl_continue_with_input(const char* input);
+
+size_t mp_flipper_repl_autocomplete(const char* str, size_t len, const mp_print_t* print, char** compl_str);

+ 1 - 1
mpconfigport.h

@@ -67,7 +67,7 @@ typedef long mp_off_t;
 #define MICROPY_ENABLE_SOURCE_LINE (0)
 #define MICROPY_ENABLE_DOC_STRING (0)
 
-#define MICROPY_HELPER_REPL (0)
+#define MICROPY_HELPER_REPL (1)
 #define MICROPY_REPL_INFO (0)
 #define MICROPY_REPL_EMACS_KEYS (0)
 #define MICROPY_REPL_EMACS_WORDS_MOVE (0)