From 4284b3811f55faa8ed1a358396e168837990c07b Mon Sep 17 00:00:00 2001
From: Paul Sokolovsky <pfalcon@users.sourceforge.net>
Date: Thu, 31 Dec 2015 00:52:01 +0200
Subject: [PATCH] esp8266: Enable modmachine.

---
 esp8266/Makefile       | 1 +
 esp8266/mpconfigport.h | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/esp8266/Makefile b/esp8266/Makefile
index 7d3567e6d..27a35d7dd 100644
--- a/esp8266/Makefile
+++ b/esp8266/Makefile
@@ -63,6 +63,7 @@ SRC_C = \
 	modnetwork.c \
 	modutime.c \
 	moduos.c \
+	modmachine.c \
 	utils.c \
 	$(BUILD)/frozen.c \
 
diff --git a/esp8266/mpconfigport.h b/esp8266/mpconfigport.h
index cadff86fd..1f823c02e 100644
--- a/esp8266/mpconfigport.h
+++ b/esp8266/mpconfigport.h
@@ -43,6 +43,7 @@
 #define MICROPY_PY_UHASHLIB         (1)
 #define MICROPY_PY_UHASHLIB_SHA1    (1)
 #define MICROPY_PY_UJSON            (1)
+#define MICROPY_PY_MACHINE          (1)
 #define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
 #define MICROPY_CPYTHON_COMPAT      (1)
 #define MICROPY_LONGINT_IMPL        (MICROPY_LONGINT_IMPL_MPZ)
@@ -80,6 +81,7 @@ extern const struct _mp_obj_module_t esp_module;
 extern const struct _mp_obj_module_t network_module;
 extern const struct _mp_obj_module_t utime_module;
 extern const struct _mp_obj_module_t uos_module;
+extern const struct _mp_obj_module_t mp_module_machine;
 
 #define MICROPY_PORT_BUILTIN_MODULES \
     { MP_OBJ_NEW_QSTR(MP_QSTR_pyb), (mp_obj_t)&pyb_module }, \
@@ -87,6 +89,7 @@ extern const struct _mp_obj_module_t uos_module;
     { MP_OBJ_NEW_QSTR(MP_QSTR_network), (mp_obj_t)&network_module }, \
     { MP_OBJ_NEW_QSTR(MP_QSTR_utime), (mp_obj_t)&utime_module }, \
     { MP_OBJ_NEW_QSTR(MP_QSTR_uos), (mp_obj_t)&uos_module }, \
+    { MP_OBJ_NEW_QSTR(MP_QSTR_machine), (mp_obj_t)&mp_module_machine }, \
 
 #define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
     { MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&utime_module }, \
-- 
GitLab