Wire up DMA with USART v1.

This commit is contained in:
Bob McWhirter
2021-06-29 10:59:22 -04:00
parent b88fc2847a
commit c53ab325c1
5 changed files with 107 additions and 32 deletions

View File

@ -1,6 +1,6 @@
#![macro_use]
//#[cfg_attr(dma_v1, path = "v1.rs")]
#[cfg_attr(dma_v1, path = "v1.rs")]
#[cfg_attr(dma_v2, path = "v2.rs")]
mod _version;
@ -19,4 +19,12 @@ pub trait WriteDma<T> {
T: 'a;
}
pub trait ReadDma {}
pub trait ReadDma<T> {
type ReadDmaFuture<'a>: Future<Output = ()> + 'a
where
Self: 'a;
fn transfer<'a>(&'a mut self, src: *const u8, buf: &'a mut [u8]) -> Self::ReadDmaFuture<'a>
where
T: 'a;
}