mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #1639 from openmv/mp_deinit
ports/stm32: Call mp_deinit() before soft reboot.
This commit is contained in:
commit
5de80634d6
@ -624,12 +624,6 @@ soft_reset:
|
|||||||
usbdbg_wait_for_command(1000);
|
usbdbg_wait_for_command(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MICROPY_PY_LWIP
|
|
||||||
// Must call GC sweep here to close open sockets.
|
|
||||||
gc_sweep_all();
|
|
||||||
systick_disable_dispatch(SYSTICK_DISPATCH_LWIP);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// soft reset
|
// soft reset
|
||||||
storage_flush();
|
storage_flush();
|
||||||
|
|
||||||
@ -639,6 +633,9 @@ soft_reset:
|
|||||||
#if MICROPY_PY_BLUETOOTH
|
#if MICROPY_PY_BLUETOOTH
|
||||||
mp_bluetooth_deinit();
|
mp_bluetooth_deinit();
|
||||||
#endif
|
#endif
|
||||||
|
#if MICROPY_PY_LWIP
|
||||||
|
systick_disable_dispatch(SYSTICK_DISPATCH_LWIP);
|
||||||
|
#endif
|
||||||
mod_network_deinit();
|
mod_network_deinit();
|
||||||
timer_deinit();
|
timer_deinit();
|
||||||
i2c_deinit_all();
|
i2c_deinit_all();
|
||||||
@ -654,6 +651,10 @@ soft_reset:
|
|||||||
py_audio_deinit();
|
py_audio_deinit();
|
||||||
#endif
|
#endif
|
||||||
imlib_deinit_all();
|
imlib_deinit_all();
|
||||||
|
|
||||||
|
gc_sweep_all();
|
||||||
|
mp_deinit();
|
||||||
|
|
||||||
first_soft_reset = false;
|
first_soft_reset = false;
|
||||||
goto soft_reset;
|
goto soft_reset;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user