Fix examples
This commit is contained in:
parent
561126b0d6
commit
05a9b11316
@ -17,7 +17,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
info!("Hello World!");
|
info!("Hello World!");
|
||||||
|
|
||||||
let ch1 = PwmPin::new_ch1(p.PE9, OutputType::PushPull);
|
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();
|
let max = pwm.get_max_duty();
|
||||||
pwm.enable(Channel::Ch1);
|
pwm.enable(Channel::Ch1);
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
khz(10),
|
khz(10),
|
||||||
|
Default::default(),
|
||||||
);
|
);
|
||||||
|
|
||||||
let max = pwm.get_max_duty();
|
let max = pwm.get_max_duty();
|
||||||
|
@ -17,7 +17,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
info!("Hello World!");
|
info!("Hello World!");
|
||||||
|
|
||||||
let ch1 = PwmPin::new_ch1(p.PC0, OutputType::PushPull);
|
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();
|
let max = pwm.get_max_duty();
|
||||||
pwm.enable(Channel::Ch1);
|
pwm.enable(Channel::Ch1);
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
info!("Hello World!");
|
info!("Hello World!");
|
||||||
|
|
||||||
let ch1 = PwmPin::new_ch1(p.PA6, OutputType::PushPull);
|
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();
|
let max = pwm.get_max_duty();
|
||||||
pwm.enable(Channel::Ch1);
|
pwm.enable(Channel::Ch1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user