summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lechner <david@pybricks.com>2021-06-28 12:03:01 -0500
committerDamien George <damien@micropython.org>2021-07-01 12:26:40 +1000
commit8182f34584d577da4ff8e26acbe677765cfbca23 (patch)
tree78171a0e91ecc9563a333650c2ca8b66fd3fbee4
parenta32a7421d668c355629f28275eb756068633c41a (diff)
stm32/main: Call mp_deinit() at end of main.
This adds a call to mp_deinit() in the main function of the STM32 port. This enables the use of MICROPY_PORT_DEINIT_FUNC on that port, as well as cleaning up the GIL if threading is enabled.
-rw-r--r--ports/stm32/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ports/stm32/main.c b/ports/stm32/main.c
index c8de2fd86..6df7374cc 100644
--- a/ports/stm32/main.c
+++ b/ports/stm32/main.c
@@ -662,6 +662,7 @@ soft_reset_exit:
MICROPY_BOARD_END_SOFT_RESET(&state);
gc_sweep_all();
+ mp_deinit();
goto soft_reset;
}