Skip to content

Commit 4ad3b66

Browse files
committed
refactor: update write DMA transfer function to use separate memory word type
1 parent 50e98a9 commit 4ad3b66

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

embassy-stm32/src/dma/dma_bdma.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -620,10 +620,10 @@ impl<'a> Transfer<'a> {
620620
}
621621

622622
/// Create a new write DMA transfer (memory to peripheral), using raw pointers.
623-
pub unsafe fn new_write_raw<W: Word, PW: Word>(
623+
pub unsafe fn new_write_raw<MW: Word, PW: Word>(
624624
channel: impl Peripheral<P = impl Channel> + 'a,
625625
request: Request,
626-
buf: *const [W],
626+
buf: *const [MW],
627627
peri_addr: *mut PW,
628628
options: TransferOptions,
629629
) -> Self {
@@ -634,11 +634,11 @@ impl<'a> Transfer<'a> {
634634
request,
635635
Dir::MemoryToPeripheral,
636636
peri_addr as *const u32,
637-
buf as *const W as *mut u32,
637+
buf as *const MW as *mut u32,
638638
buf.len(),
639639
true,
640-
W::size(),
641-
W::size(),
640+
MW::size(),
641+
PW::size(),
642642
options,
643643
)
644644
}

0 commit comments

Comments
 (0)