Change PWM_CH1_DIV_INT_LSB to PWM_CH0_DIV_INT_LSB (#560)

For consistency with all the other PWM_...._LSB constants
This commit is contained in:
Andrew Scheller 2021-10-04 19:21:55 +01:00 committed by GitHub
parent 2214468b51
commit f63a14e9ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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