Merge pull request #2258 from ExplodingWaffle/patch-1
make usart::State private
This commit is contained in:
commit
a2eb46e9e4
@ -82,16 +82,17 @@ impl<T: BasicInstance> interrupt::typelevel::Handler<T::Interrupt> for Interrupt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Buffered UART State
|
pub(crate) use sealed::State;
|
||||||
pub struct State {
|
pub(crate) mod sealed {
|
||||||
rx_waker: AtomicWaker,
|
use super::*;
|
||||||
rx_buf: RingBuffer,
|
pub struct State {
|
||||||
|
pub(crate) rx_waker: AtomicWaker,
|
||||||
|
pub(crate) rx_buf: RingBuffer,
|
||||||
|
pub(crate) tx_waker: AtomicWaker,
|
||||||
|
pub(crate) tx_buf: RingBuffer,
|
||||||
|
}
|
||||||
|
|
||||||
tx_waker: AtomicWaker,
|
impl State {
|
||||||
tx_buf: RingBuffer,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl State {
|
|
||||||
/// Create new state
|
/// Create new state
|
||||||
pub const fn new() -> Self {
|
pub const fn new() -> Self {
|
||||||
Self {
|
Self {
|
||||||
@ -101,6 +102,7 @@ impl State {
|
|||||||
tx_waker: AtomicWaker::new(),
|
tx_waker: AtomicWaker::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Bidirectional buffered UART
|
/// Bidirectional buffered UART
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user