Fix crash when pwmio deinit

This commit is contained in:
silabs-ChatNguyen 2023-11-13 11:57:16 +07:00
parent 166a98fa34
commit 55ecc64bf1
1 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,8 @@ void pwmout_reset(void) {
mcu_tim_pin_obj_t *l_tim = &mcu_tim_list[tim_index];
if (l_tim->pin != NULL) {
sl_pwm_deinit(&pwm_handle[tim_index]);
common_hal_reset_pin(l_tim->pin);
l_tim->pin = NULL;
}
}