Fix examples

This commit is contained in:
Dion Dokter 2023-10-01 23:39:53 +02:00
parent 561126b0d6
commit 05a9b11316
4 changed files with 4 additions and 3 deletions

View File

@ -17,7 +17,7 @@ async fn main(_spawner: Spawner) {
info!("Hello World!");
let ch1 = PwmPin::new_ch1(p.PE9, OutputType::PushPull);
let mut pwm = SimplePwm::new(p.TIM1, Some(ch1), None, None, None, khz(10));
let mut pwm = SimplePwm::new(p.TIM1, Some(ch1), None, None, None, khz(10), Default::default());
let max = pwm.get_max_duty();
pwm.enable(Channel::Ch1);

View File

@ -30,6 +30,7 @@ async fn main(_spawner: Spawner) {
None,
None,
khz(10),
Default::default(),
);
let max = pwm.get_max_duty();

View File

@ -17,7 +17,7 @@ async fn main(_spawner: Spawner) {
info!("Hello World!");
let ch1 = PwmPin::new_ch1(p.PC0, OutputType::PushPull);
let mut pwm = SimplePwm::new(p.TIM1, Some(ch1), None, None, None, khz(10));
let mut pwm = SimplePwm::new(p.TIM1, Some(ch1), None, None, None, khz(10), Default::default());
let max = pwm.get_max_duty();
pwm.enable(Channel::Ch1);

View File

@ -39,7 +39,7 @@ async fn main(_spawner: Spawner) {
info!("Hello World!");
let ch1 = PwmPin::new_ch1(p.PA6, OutputType::PushPull);
let mut pwm = SimplePwm::new(p.TIM3, Some(ch1), None, None, None, khz(10));
let mut pwm = SimplePwm::new(p.TIM3, Some(ch1), None, None, None, khz(10), Default::default());
let max = pwm.get_max_duty();
pwm.enable(Channel::Ch1);