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

@ -8,7 +8,6 @@ mod dmamux;
mod gpdma;
use core::future::Future;
use core::marker::PhantomData;
use core::mem;
use core::pin::Pin;
use core::task::{Context, Poll, Waker};
@ -207,6 +206,8 @@ impl Default for TransferOptions {
}
mod transfers {
use embassy_hal_common::Unborrowed;
use super::*;
#[allow(unused)]
@ -255,17 +256,13 @@ mod transfers {
}
pub(crate) struct Transfer<'a, C: Channel> {
channel: C,
_phantom: PhantomData<&'a mut C>,
channel: Unborrowed<'a, C>,
}
impl<'a, C: Channel> Transfer<'a, C> {
pub(crate) fn new(channel: impl Unborrow<Target = C> + 'a) -> Self {
unborrow!(channel);
Self {
channel,
_phantom: PhantomData,
}
Self { channel }
}
}