Rework bufferedUart to get rid of PeripheralMutex in a similar fashion as nrf & rp. Also adds embedded-hal traits to bufferedUart
This commit is contained in:
@ -1112,6 +1112,9 @@ pub(crate) mod sealed {
|
||||
|
||||
fn regs() -> Regs;
|
||||
fn state() -> &'static State;
|
||||
|
||||
#[cfg(feature = "nightly")]
|
||||
fn buffered_state() -> &'static buffered::State;
|
||||
}
|
||||
|
||||
pub trait FullInstance: BasicInstance {
|
||||
@ -1147,6 +1150,12 @@ macro_rules! impl_lpuart {
|
||||
static STATE: crate::usart::sealed::State = crate::usart::sealed::State::new();
|
||||
&STATE
|
||||
}
|
||||
|
||||
#[cfg(feature = "nightly")]
|
||||
fn buffered_state() -> &'static buffered::State {
|
||||
static STATE: buffered::State = buffered::State::new();
|
||||
&STATE
|
||||
}
|
||||
}
|
||||
|
||||
impl BasicInstance for peripherals::$inst {}
|
||||
|
Reference in New Issue
Block a user