summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2018-11-07 14:12:22 -0500
committerDan Halbert <halbert@halwitz.org>2018-11-07 14:12:22 -0500
commit64d457dad9bb3843ee468136022996ecb91a98df (patch)
treec3bfee81668dbd842039c178222fda9df77a9b76 /main.c
parent4bc24c4f6084e414f0fb00299aae7d7cfdb76aba (diff)
parent283e07254e9eb50e52d6f07b7ac177feeef02d83 (diff)
bring bleio PR up to date
Diffstat (limited to 'main.c')
-rwxr-xr-xmain.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/main.c b/main.c
index 1e07b2d07..c1379c571 100755
--- a/main.c
+++ b/main.c
@@ -54,6 +54,10 @@
#include "supervisor/shared/stack.h"
#include "supervisor/serial.h"
+#ifdef MICROPY_PY_NETWORK
+#include "shared-module/network/__init__.h"
+#endif
+
void do_str(const char *src, mp_parse_input_kind_t input_kind) {
mp_lexer_t *lex = mp_lexer_new_from_str_len(MP_QSTR__lt_stdin_gt_, src, strlen(src), 0);
if (lex == NULL) {
@@ -108,10 +112,16 @@ void start_mp(supervisor_allocation* heap) {
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_FROZEN_FAKE_DIR_QSTR));
mp_obj_list_init(mp_sys_argv, 0);
+
+ #if MICROPY_PY_NETWORK
+ network_module_init();
+ #endif
}
void stop_mp(void) {
-
+ #if MICROPY_PY_NETWORK
+ network_module_deinit();
+ #endif
}
#define STRING_LIST(...) {__VA_ARGS__, ""}