stm32/ipcc: minor cleanup
This commit is contained in:
parent
39334f7280
commit
748d1ea89d
@ -122,7 +122,6 @@ impl Ipcc {
|
|||||||
let regs = IPCC::regs();
|
let regs = IPCC::regs();
|
||||||
|
|
||||||
Self::flush(channel).await;
|
Self::flush(channel).await;
|
||||||
compiler_fence(Ordering::SeqCst);
|
|
||||||
|
|
||||||
f();
|
f();
|
||||||
|
|
||||||
@ -189,7 +188,6 @@ impl Ipcc {
|
|||||||
.await;
|
.await;
|
||||||
|
|
||||||
trace!("ipcc: ch {}: read data", channel as u8);
|
trace!("ipcc: ch {}: read data", channel as u8);
|
||||||
compiler_fence(Ordering::SeqCst);
|
|
||||||
|
|
||||||
match f() {
|
match f() {
|
||||||
Some(ret) => return ret,
|
Some(ret) => return ret,
|
||||||
@ -239,7 +237,7 @@ pub(crate) mod sealed {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn rx_waker_for(&self, channel: IpccChannel) -> &AtomicWaker {
|
pub const fn rx_waker_for(&self, channel: IpccChannel) -> &AtomicWaker {
|
||||||
match channel {
|
match channel {
|
||||||
IpccChannel::Channel1 => &self.rx_wakers[0],
|
IpccChannel::Channel1 => &self.rx_wakers[0],
|
||||||
IpccChannel::Channel2 => &self.rx_wakers[1],
|
IpccChannel::Channel2 => &self.rx_wakers[1],
|
||||||
@ -250,7 +248,7 @@ pub(crate) mod sealed {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn tx_waker_for(&self, channel: IpccChannel) -> &AtomicWaker {
|
pub const fn tx_waker_for(&self, channel: IpccChannel) -> &AtomicWaker {
|
||||||
match channel {
|
match channel {
|
||||||
IpccChannel::Channel1 => &self.tx_wakers[0],
|
IpccChannel::Channel1 => &self.tx_wakers[0],
|
||||||
IpccChannel::Channel2 => &self.tx_wakers[1],
|
IpccChannel::Channel2 => &self.tx_wakers[1],
|
||||||
|
Loading…
Reference in New Issue
Block a user