stm32/dma: remove trace

This commit is contained in:
xoviat 2023-07-31 17:55:25 -05:00
parent ffa0c08140
commit bbc8424a5b

View file

@ -229,14 +229,6 @@ impl<'a, W: Word> WritableDmaRingBuffer<'a, W> {
pub fn write(&mut self, mut dma: impl DmaCtrl, buf: &[W]) -> Result<(usize, usize), OverrunError> { pub fn write(&mut self, mut dma: impl DmaCtrl, buf: &[W]) -> Result<(usize, usize), OverrunError> {
let start = self.pos(dma.get_remaining_transfers()); let start = self.pos(dma.get_remaining_transfers());
if start > self.end { if start > self.end {
trace!(
"[1]: start, end, len, complete_count: {}, {}, {}, {}",
start,
self.end,
buf.len(),
dma.get_complete_count()
);
// The occupied portion in the ring buffer DOES wrap // The occupied portion in the ring buffer DOES wrap
let len = self.copy_from(buf, self.end..start); let len = self.copy_from(buf, self.end..start);
@ -253,24 +245,8 @@ impl<'a, W: Word> WritableDmaRingBuffer<'a, W> {
Ok((len, self.cap() - (start - self.end))) Ok((len, self.cap() - (start - self.end)))
} }
} else if start == self.end && dma.get_complete_count() == 0 { } else if start == self.end && dma.get_complete_count() == 0 {
trace!(
"[2]: start, end, len, complete_count: {}, {}, {}, {}",
start,
self.end,
buf.len(),
dma.get_complete_count()
);
Ok((0, 0)) Ok((0, 0))
} else if start <= self.end && self.end + buf.len() < self.cap() { } else if start <= self.end && self.end + buf.len() < self.cap() {
trace!(
"[3]: start, end, len, complete_count: {}, {}, {}, {}",
start,
self.end,
buf.len(),
dma.get_complete_count()
);
// The occupied portion in the ring buffer DOES NOT wrap // The occupied portion in the ring buffer DOES NOT wrap
// and copying elements into the buffer WILL NOT cause it to // and copying elements into the buffer WILL NOT cause it to
@ -289,14 +265,6 @@ impl<'a, W: Word> WritableDmaRingBuffer<'a, W> {
Ok((len, self.cap() - (self.end - start))) Ok((len, self.cap() - (self.end - start)))
} }
} else { } else {
trace!(
"[4]: start, end, len, complete_count: {}, {}, {}, {}",
start,
self.end,
buf.len(),
dma.get_complete_count()
);
// The occupied portion in the ring buffer DOES NOT wrap // The occupied portion in the ring buffer DOES NOT wrap
// and copying elements into the buffer WILL cause it to // and copying elements into the buffer WILL cause it to