stm32/dma: minor cleanup, optmization
This commit is contained in:
parent
7e269f6f17
commit
e80db42061
@ -497,7 +497,7 @@ impl<'a, C: Channel, W: Word> ReadableRingBuffer<'a, C, W> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// The capacity of the ringbuffer.
|
/// The capacity of the ringbuffer.
|
||||||
pub fn cap(&self) -> usize {
|
pub const fn cap(&self) -> usize {
|
||||||
self.ringbuf.cap()
|
self.ringbuf.cap()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -628,7 +628,7 @@ impl<'a, C: Channel, W: Word> WritableRingBuffer<'a, C, W> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// The capacity of the ringbuffer.
|
/// The capacity of the ringbuffer.
|
||||||
pub fn cap(&self) -> usize {
|
pub const fn cap(&self) -> usize {
|
||||||
self.ringbuf.cap()
|
self.ringbuf.cap()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -742,12 +742,12 @@ impl<'a, C: Channel, W: Word> ReadableRingBuffer<'a, C, W> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The capacity of the ringbuffer
|
// The capacity of the ringbuffer
|
||||||
pub fn cap(&self) -> usize {
|
pub const fn cap(&self) -> usize {
|
||||||
self.ringbuf.cap()
|
self.ringbuf.cap()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_waker(&mut self, waker: &Waker) {
|
pub fn set_waker(&mut self, waker: &Waker) {
|
||||||
STATE.ch_wakers[self.channel.index()].register(waker);
|
DmaCtrlImpl(self.channel.reborrow()).set_waker(waker);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn clear_irqs(&mut self) {
|
fn clear_irqs(&mut self) {
|
||||||
@ -890,12 +890,12 @@ impl<'a, C: Channel, W: Word> WritableRingBuffer<'a, C, W> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The capacity of the ringbuffer
|
// The capacity of the ringbuffer
|
||||||
pub fn cap(&self) -> usize {
|
pub const fn cap(&self) -> usize {
|
||||||
self.ringbuf.cap()
|
self.ringbuf.cap()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_waker(&mut self, waker: &Waker) {
|
pub fn set_waker(&mut self, waker: &Waker) {
|
||||||
STATE.ch_wakers[self.channel.index()].register(waker);
|
DmaCtrlImpl(self.channel.reborrow()).set_waker(waker);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn clear_irqs(&mut self) {
|
fn clear_irqs(&mut self) {
|
||||||
|
Loading…
Reference in New Issue
Block a user