mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 22:32:29 +00:00
Fix docs
This commit is contained in:
parent
202800b96a
commit
0cf41dbb21
@ -176,8 +176,8 @@ impl<'a, C: Channel> Transfer<'a, C> {
|
|||||||
}
|
}
|
||||||
/// Abort a DMA transfer early
|
/// Abort a DMA transfer early
|
||||||
///
|
///
|
||||||
/// Returns the count of transfers still left to do and the data size of the transfers
|
/// Returns the count of transfers still left to do
|
||||||
pub fn abort(self) -> u32 {
|
pub fn abort(self) -> usize {
|
||||||
let p = self.channel.regs();
|
let p = self.channel.regs();
|
||||||
let transfer_count = p.trans_count().read();
|
let transfer_count = p.trans_count().read();
|
||||||
pac::DMA
|
pac::DMA
|
||||||
@ -185,7 +185,7 @@ impl<'a, C: Channel> Transfer<'a, C> {
|
|||||||
.modify(|m| m.set_chan_abort(1 << self.channel.number()));
|
.modify(|m| m.set_chan_abort(1 << self.channel.number()));
|
||||||
while p.ctrl_trig().read().busy() {}
|
while p.ctrl_trig().read().busy() {}
|
||||||
|
|
||||||
transfer_count
|
transfer_count as usize
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user