We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2008247 commit a0e39ddCopy full SHA for a0e39dd
lib/digital_signal/digital_signal.c
@@ -243,11 +243,15 @@ static void digital_signal_stop_timer() {
243
LL_TIM_DisableUpdateEvent(TIM2);
244
LL_TIM_DisableDMAReq_UPDATE(TIM2);
245
246
- furi_hal_bus_disable(FuriHalBusTIM2);
+ if(furi_hal_bus_is_enabled(FuriHalBusTIM2)) {
247
+ furi_hal_bus_disable(FuriHalBusTIM2);
248
+ }
249
}
250
251
static void digital_signal_setup_timer() {
- furi_hal_bus_enable(FuriHalBusTIM2);
252
+ if(!furi_hal_bus_is_enabled(FuriHalBusTIM2)) {
253
+ furi_hal_bus_enable(FuriHalBusTIM2);
254
255
256
LL_TIM_SetCounterMode(TIM2, LL_TIM_COUNTERMODE_UP);
257
LL_TIM_SetClockDivision(TIM2, LL_TIM_CLOCKDIVISION_DIV1);
0 commit comments