4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-28 04:27:07 +08:00

[bsp][CV1800B] fix cv1800b polarity reversal error

Signed-off-by: Jingbao Qiu <qiujingbao.dlmu@gmail.com>
This commit is contained in:
Jingbao Qiu 2024-03-18 20:04:03 +08:00 committed by Meco Man
parent 90f86c2b71
commit 42e8191b34

View File

@ -31,7 +31,7 @@ static void cvi_pwm_set_config(rt_ubase_t reg_base, struct rt_pwm_configuration
{ {
unsigned long long duty_clk, period_clk; unsigned long long duty_clk, period_clk;
cvi_pwm_set_polarity_low_ch(reg_base, (cfg->channel & PWM_MAX_CH)); cvi_pwm_set_polarity_high_ch(reg_base, (cfg->channel & PWM_MAX_CH));
duty_clk = (cfg->pulse * count_unit) / NSEC_COUNT; duty_clk = (cfg->pulse * count_unit) / NSEC_COUNT;
cvi_pwm_set_high_period_ch(reg_base, (cfg->channel & PWM_MAX_CH), duty_clk); cvi_pwm_set_high_period_ch(reg_base, (cfg->channel & PWM_MAX_CH), duty_clk);