wip
This commit is contained in:
parent
b80a44a4d9
commit
461f219b08
@ -74,11 +74,16 @@ static void th_func(void *arg)
|
||||
unsigned int duty = 0;
|
||||
pwm_open(&pwm_ch4);
|
||||
while(1) {
|
||||
pwm_set_duty_cycle(&pwm_ch4, duty);
|
||||
sleep_ms(100);
|
||||
duty++;
|
||||
if(duty > 100)
|
||||
duty = 0;
|
||||
while(duty < 100) {
|
||||
pwm_set_duty_cycle(&pwm_ch4, duty);
|
||||
sleep_ms(10);
|
||||
duty++;
|
||||
}
|
||||
while(duty > 0) {
|
||||
pwm_set_duty_cycle(&pwm_ch4, duty);
|
||||
sleep_ms(10);
|
||||
duty--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user