summaryrefslogtreecommitdiff
path: root/ports/esp32/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/esp32/main.c')
-rw-r--r--ports/esp32/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ports/esp32/main.c b/ports/esp32/main.c
index e7d7626a6..0d876eb5f 100644
--- a/ports/esp32/main.c
+++ b/ports/esp32/main.c
@@ -67,6 +67,10 @@
#include "extmod/modbluetooth.h"
#endif
+#if MICROPY_ESPNOW
+#include "modespnow.h"
+#endif
+
// MicroPython runs as a task under FreeRTOS
#define MP_TASK_PRIORITY (ESP_TASK_PRIO_MIN + 1)
#define MP_TASK_STACK_SIZE (16 * 1024)
@@ -190,6 +194,11 @@ soft_reset_exit:
mp_bluetooth_deinit();
#endif
+ #if MICROPY_ESPNOW
+ espnow_deinit(mp_const_none);
+ MP_STATE_PORT(espnow_singleton) = NULL;
+ #endif
+
machine_timer_deinit_all();
#if MICROPY_PY_THREAD