summaryrefslogtreecommitdiff
path: root/embassy-rp/src/dma.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-rp/src/dma.rs')
-rw-r--r--embassy-rp/src/dma.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/embassy-rp/src/dma.rs b/embassy-rp/src/dma.rs
index acf33822..7ad1a6bf 100644
--- a/embassy-rp/src/dma.rs
+++ b/embassy-rp/src/dma.rs
@@ -75,6 +75,25 @@ pub unsafe fn write<'a, C: Channel, W: Word>(
)
}
+pub unsafe fn write_repeated<'a, C: Channel, W: Word>(
+ ch: impl Peripheral<P = C> + 'a,
+ to: *mut W,
+ len: usize,
+ dreq: u8,
+) -> Transfer<'a, C> {
+ let dummy: u32 = 0;
+ copy_inner(
+ ch,
+ &dummy as *const u32,
+ to as *mut u32,
+ len,
+ W::size(),
+ false,
+ false,
+ dreq,
+ )
+}
+
pub unsafe fn copy<'a, C: Channel, W: Word>(
ch: impl Peripheral<P = C> + 'a,
from: &[W],