Expand channel trait
@@ -9,6 +9,7 @@ mod dmamux;
pub use dmamux::*;
use core::future::Future;
+use core::task::Waker;
use embassy::util::Unborrow;
#[cfg(any(bdma_v2, dma_v2, dmamux))]
@@ -50,6 +51,12 @@ pub trait Channel: sealed::Channel {
num: usize,
dst: *mut u8,
) -> Self::WriteFuture<'a>;
+
+ fn stop<'a>(&'a mut self);
+
+ fn is_stopped<'a>(&self) -> bool;
+ fn remaining_transfers<'a>(&'a mut self) -> usize;
+ fn set_waker(&mut self, waker: &Waker);
}
pub struct NoDma;
