Update embassy-stm32

This commit is contained in:
Dario Nieuwenhuis
2022-07-23 01:29:35 +02:00
parent e0521ea249
commit 8a9d2f59af
26 changed files with 433 additions and 361 deletions

View File

@ -1,6 +1,4 @@
use core::marker::PhantomData;
use embassy_hal_common::unborrow;
use embassy_hal_common::{unborrow, Unborrowed};
use super::*;
#[allow(unused_imports)]
@ -9,8 +7,7 @@ use crate::time::Hertz;
use crate::Unborrow;
pub struct SimplePwm<'d, T> {
phantom: PhantomData<&'d mut T>,
inner: T,
inner: Unborrowed<'d, T>,
}
macro_rules! config_pins {
@ -83,10 +80,7 @@ impl<'d, T: CaptureCompare16bitInstance> SimplePwm<'d, T> {
configure_pins();
let mut this = Self {
inner: tim,
phantom: PhantomData,
};
let mut this = Self { inner: tim };
this.inner.set_frequency(freq);
this.inner.start();