From f63a14e9eeab167b1c5f7800d5b53356660ec42d Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Mon, 4 Oct 2021 19:21:55 +0100 Subject: [PATCH] Change PWM_CH1_DIV_INT_LSB to PWM_CH0_DIV_INT_LSB (#560) For consistency with all the other PWM_...._LSB constants --- src/rp2_common/hardware_pwm/include/hardware/pwm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rp2_common/hardware_pwm/include/hardware/pwm.h b/src/rp2_common/hardware_pwm/include/hardware/pwm.h index 16fdb48..4f174b1 100644 --- a/src/rp2_common/hardware_pwm/include/hardware/pwm.h +++ b/src/rp2_common/hardware_pwm/include/hardware/pwm.h @@ -116,7 +116,7 @@ static inline void pwm_config_set_phase_correct(pwm_config *c, bool phase_correc * before passing them on to the PWM counter. */ static inline void pwm_config_set_clkdiv(pwm_config *c, float div) { - c->div = (uint32_t)(div * (float)(1u << PWM_CH1_DIV_INT_LSB)); + c->div = (uint32_t)(div * (float)(1u << PWM_CH0_DIV_INT_LSB)); } /** \brief Set PWM clock divider in a PWM configuration @@ -130,7 +130,7 @@ static inline void pwm_config_set_clkdiv(pwm_config *c, float div) { * before passing them on to the PWM counter. */ static inline void pwm_config_set_clkdiv_int(pwm_config *c, uint div) { - c->div = div << PWM_CH1_DIV_INT_LSB; + c->div = div << PWM_CH0_DIV_INT_LSB; } /** \brief Set PWM counting mode in a PWM configuration