From 528bf56657bb9e28422cc7feaff1f0ee1b63837a Mon Sep 17 00:00:00 2001 From: Alexandre Bourdiol Date: Tue, 23 Nov 2021 16:55:31 +0100 Subject: [PATCH] HardwareTimer: Fix compilation warning introduced by #1550 Fixes #1557 Signed-off-by: Alexandre Bourdiol --- cores/arduino/HardwareTimer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cores/arduino/HardwareTimer.cpp b/cores/arduino/HardwareTimer.cpp index 83c1fbe8e0..2284515741 100644 --- a/cores/arduino/HardwareTimer.cpp +++ b/cores/arduino/HardwareTimer.cpp @@ -1179,7 +1179,6 @@ bool HardwareTimer::isRunning() */ bool HardwareTimer::isRunningChannel(uint32_t channel) { - int timAssociatedInputChannel; int LLChannel = getLLChannel(channel); int interrupt = getIT(channel); bool ret; @@ -1195,7 +1194,7 @@ bool HardwareTimer::isRunningChannel(uint32_t channel) // channel is running if: timer is running, and either output channel is // enabled or interrupt is set ret = LL_TIM_CC_IsEnabledChannel(_timerObj.handle.Instance, LLChannel) - || (__HAL_TIM_GET_IT_SOURCE(&(_timerObj.handle), interrupt) == SET); + || (__HAL_TIM_GET_IT_SOURCE(&(_timerObj.handle), (uint32_t)interrupt) == SET); return (isRunning() && ret); }