summaryrefslogtreecommitdiff
path: root/ports/samd/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/samd/main.c')
-rw-r--r--ports/samd/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ports/samd/main.c b/ports/samd/main.c
index 1e30df13d..74eb5e328 100644
--- a/ports/samd/main.c
+++ b/ports/samd/main.c
@@ -81,12 +81,18 @@ void samd_main(void) {
soft_reset_exit:
mp_printf(MP_PYTHON_PRINTER, "MPY: soft reboot\n");
+ #if MICROPY_PY_MACHINE_ADC
adc_deinit_all();
+ #endif
pin_irq_deinit_all();
+ #if MICROPY_PY_MACHINE_PWM
pwm_deinit_all();
+ #endif
soft_timer_deinit();
gc_sweep_all();
+ #if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_SPI || MICROPY_PY_MACHINE_UART
sercom_deinit_all();
+ #endif
mp_deinit();
}
}