stm32: fix defective example
This commit is contained in:
parent
776e001b5b
commit
9e1ddeac86
2 changed files with 2 additions and 6 deletions
|
@ -599,10 +599,6 @@ fn main() {
|
|||
let pin_name = format_ident!("{}", pin.pin);
|
||||
let af = pin.af.unwrap_or(0);
|
||||
|
||||
if peri == time_driver_singleton {
|
||||
continue;
|
||||
}
|
||||
|
||||
// MCO is special
|
||||
if pin.signal.starts_with("MCO_") {
|
||||
// Supported in H7 only for now
|
||||
|
|
|
@ -15,8 +15,8 @@ async fn main(_spawner: Spawner) {
|
|||
let p = embassy_stm32::init(Default::default());
|
||||
info!("Hello World!");
|
||||
|
||||
let ch1 = PwmPin::new_ch1(p.PA5);
|
||||
let mut pwm = SimplePwm::new(p.TIM2, Some(ch1), None, None, None, khz(10));
|
||||
let ch1 = PwmPin::new_ch1(p.PC0);
|
||||
let mut pwm = SimplePwm::new(p.TIM1, Some(ch1), None, None, None, khz(10));
|
||||
let max = pwm.get_max_duty();
|
||||
pwm.enable(Channel::Ch1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue