USB: Use updated PeripheralMutex

This commit is contained in:
Thales Fragoso
2021-03-01 21:30:03 -03:00
parent a39dea4d98
commit 615bb33dcb
11 changed files with 17 additions and 186 deletions

View File

@ -69,6 +69,12 @@ impl<'a> RingBuffer<'a> {
self.empty = self.start == self.end;
}
pub fn clear(&mut self) {
self.start = 0;
self.end = 0;
self.empty = true;
}
fn wrap(&self, n: usize) -> usize {
assert!(n <= self.buf.len());
if n == self.buf.len() {