Skip to content

Commit 0b749e5

Browse files
committed
refactor: rename timer channel function
Signed-off-by: Frederic Pillon <[email protected]>
1 parent ffa9142 commit 0b749e5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cores/arduino/stm32/timer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ uint8_t getTimerClkSrc(TIM_TypeDef *tim);
284284
IRQn_Type getTimerUpIrq(TIM_TypeDef *tim);
285285
IRQn_Type getTimerCCIrq(TIM_TypeDef *tim);
286286

287-
uint32_t get_pwm_channel(PinName pin);
287+
uint32_t getTimerChannel(PinName pin);
288288

289289
#endif /* HAL_TIM_MODULE_ENABLED && !HAL_TIM_MODULE_ONLY */
290290

libraries/SrcWrapper/src/HardwareTimer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ void HardwareTimer::setMode(uint32_t channel, TimerModes_t mode, PinName pin)
740740
_ChannelMode[channel - 1] = mode;
741741

742742
if (pin != NC) {
743-
if ((int)get_pwm_channel(pin) == timChannel) {
743+
if ((int)getTimerChannel(pin) == timChannel) {
744744
/* Configure PWM GPIO pins */
745745
pinmap_pinout(pin, PinMap_TIM);
746746
#if defined(STM32F1xx)

libraries/SrcWrapper/src/stm32/timer.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ uint8_t getTimerClkSrc(TIM_TypeDef *tim)
720720
* @param pin: PinName
721721
* @retval HAL channel. return 0 if pin has no timer
722722
*/
723-
uint32_t get_pwm_channel(PinName pin)
723+
uint32_t getTimerChannel(PinName pin)
724724
{
725725
uint32_t function = pinmap_function(pin, PinMap_TIM);
726726
uint32_t channel = 0;

0 commit comments

Comments
 (0)