From 0cf41dbb21be20abd32fbd2fb6289fd8b5838ac4 Mon Sep 17 00:00:00 2001 From: "Jomer.Dev" Date: Tue, 16 Jul 2024 21:23:18 +0200 Subject: [PATCH] Fix docs --- embassy-rp/src/dma.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/embassy-rp/src/dma.rs b/embassy-rp/src/dma.rs index ea3178a53..ce7a961e4 100644 --- a/embassy-rp/src/dma.rs +++ b/embassy-rp/src/dma.rs @@ -176,8 +176,8 @@ impl<'a, C: Channel> Transfer<'a, C> { } /// Abort a DMA transfer early /// - /// Returns the count of transfers still left to do and the data size of the transfers - pub fn abort(self) -> u32 { + /// Returns the count of transfers still left to do + pub fn abort(self) -> usize { let p = self.channel.regs(); let transfer_count = p.trans_count().read(); pac::DMA @@ -185,7 +185,7 @@ impl<'a, C: Channel> Transfer<'a, C> { .modify(|m| m.set_chan_abort(1 << self.channel.number())); while p.ctrl_trig().read().busy() {} - transfer_count + transfer_count as usize } }