mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-11-23 10:01:58 +03:00
more checks just in case??
This commit is contained in:
parent
2008247e65
commit
a0e39ddb67
@ -243,11 +243,15 @@ static void digital_signal_stop_timer() {
|
||||
LL_TIM_DisableUpdateEvent(TIM2);
|
||||
LL_TIM_DisableDMAReq_UPDATE(TIM2);
|
||||
|
||||
if(furi_hal_bus_is_enabled(FuriHalBusTIM2)) {
|
||||
furi_hal_bus_disable(FuriHalBusTIM2);
|
||||
}
|
||||
}
|
||||
|
||||
static void digital_signal_setup_timer() {
|
||||
if(!furi_hal_bus_is_enabled(FuriHalBusTIM2)) {
|
||||
furi_hal_bus_enable(FuriHalBusTIM2);
|
||||
}
|
||||
|
||||
LL_TIM_SetCounterMode(TIM2, LL_TIM_COUNTERMODE_UP);
|
||||
LL_TIM_SetClockDivision(TIM2, LL_TIM_CLOCKDIVISION_DIV1);
|
||||
|
Loading…
Reference in New Issue
Block a user