Cleanup stm32_metapac register usage in usart module

This commit is contained in:
Tobias Naumann 2025-03-27 12:03:52 +01:00
parent 9e31a45134
commit 14d079ae84

View File

@ -398,7 +398,7 @@ pub struct UartRx<'d, M: Mode> {
rx_dma: Option<ChannelAndRequest<'d>>, rx_dma: Option<ChannelAndRequest<'d>>,
detect_previous_overrun: bool, detect_previous_overrun: bool,
#[cfg(any(usart_v1, usart_v2))] #[cfg(any(usart_v1, usart_v2))]
buffered_sr: stm32_metapac::usart::regs::Sr, buffered_sr: regs::Sr,
_phantom: PhantomData<M>, _phantom: PhantomData<M>,
} }
@ -945,7 +945,7 @@ impl<'d, M: Mode> UartRx<'d, M> {
rx_dma, rx_dma,
detect_previous_overrun: config.detect_previous_overrun, detect_previous_overrun: config.detect_previous_overrun,
#[cfg(any(usart_v1, usart_v2))] #[cfg(any(usart_v1, usart_v2))]
buffered_sr: stm32_metapac::usart::regs::Sr(0), buffered_sr: regs::Sr(0),
}; };
this.enable_and_configure(&config)?; this.enable_and_configure(&config)?;
Ok(this) Ok(this)
@ -1444,7 +1444,7 @@ impl<'d, M: Mode> Uart<'d, M> {
rx_dma, rx_dma,
detect_previous_overrun: config.detect_previous_overrun, detect_previous_overrun: config.detect_previous_overrun,
#[cfg(any(usart_v1, usart_v2))] #[cfg(any(usart_v1, usart_v2))]
buffered_sr: stm32_metapac::usart::regs::Sr(0), buffered_sr: regs::Sr(0),
}, },
}; };
this.enable_and_configure(&config)?; this.enable_and_configure(&config)?;