Merge pull request #2258 from ExplodingWaffle/patch-1

make usart::State private
This commit is contained in:
Dario Nieuwenhuis 2024-01-19 23:30:47 +01:00 committed by GitHub
commit a2eb46e9e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,13 +82,14 @@ impl<T: BasicInstance> interrupt::typelevel::Handler<T::Interrupt> for Interrupt
} }
} }
/// Buffered UART State pub(crate) use sealed::State;
pub(crate) mod sealed {
use super::*;
pub struct State { pub struct State {
rx_waker: AtomicWaker, pub(crate) rx_waker: AtomicWaker,
rx_buf: RingBuffer, pub(crate) rx_buf: RingBuffer,
pub(crate) tx_waker: AtomicWaker,
tx_waker: AtomicWaker, pub(crate) tx_buf: RingBuffer,
tx_buf: RingBuffer,
} }
impl State { impl State {
@ -102,6 +103,7 @@ impl State {
} }
} }
} }
}
/// Bidirectional buffered UART /// Bidirectional buffered UART
pub struct BufferedUart<'d, T: BasicInstance> { pub struct BufferedUart<'d, T: BasicInstance> {