stm32: fix defective example

This commit is contained in:
xoviat 2023-04-16 18:32:55 -05:00
parent 776e001b5b
commit 9e1ddeac86
2 changed files with 2 additions and 6 deletions

View File

@ -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

View File

@ -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);