stm32/main: Allow disabling MICROPY_PY_MACHINE.
Disabling this requires also disabling: MICROPY_PY_PYB and MICROPY_PY_STM. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -424,7 +424,9 @@ void stm32_main(uint32_t reset_mode) {
|
|||||||
#if MICROPY_HW_HAS_SWITCH
|
#if MICROPY_HW_HAS_SWITCH
|
||||||
switch_init0();
|
switch_init0();
|
||||||
#endif
|
#endif
|
||||||
|
#if MICROPY_PY_MACHINE
|
||||||
machine_init();
|
machine_init();
|
||||||
|
#endif
|
||||||
#if MICROPY_HW_ENABLE_RTC
|
#if MICROPY_HW_ENABLE_RTC
|
||||||
rtc_init_start(false);
|
rtc_init_start(false);
|
||||||
#endif
|
#endif
|
||||||
@@ -670,7 +672,9 @@ soft_reset_exit:
|
|||||||
#if MICROPY_HW_ENABLE_DAC
|
#if MICROPY_HW_ENABLE_DAC
|
||||||
dac_deinit_all();
|
dac_deinit_all();
|
||||||
#endif
|
#endif
|
||||||
|
#if MICROPY_PY_MACHINE
|
||||||
machine_deinit();
|
machine_deinit();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if MICROPY_PY_THREAD
|
#if MICROPY_PY_THREAD
|
||||||
pyb_thread_deinit();
|
pyb_thread_deinit();
|
||||||
|
|||||||
Reference in New Issue
Block a user