RP-PICO UART adding set_baudrate: Changing static call from specific type to a Self (requires adding lifetime specifier)

This commit is contained in:
Andres Hurtado Lopez 2023-02-26 19:20:08 -05:00
parent 7172dfd083
commit 482ba835c4

View File

@ -299,7 +299,7 @@ impl<'d, T: Instance> Uart<'d, T, Async> {
} }
} }
impl<'d, T: Instance, M: Mode> Uart<'d, T, M> { impl<'d, T: Instance + 'd, M: Mode> Uart<'d, T, M> {
fn new_inner( fn new_inner(
_uart: impl Peripheral<P = T> + 'd, _uart: impl Peripheral<P = T> + 'd,
mut tx: PeripheralRef<'d, AnyPin>, mut tx: PeripheralRef<'d, AnyPin>,
@ -350,7 +350,7 @@ impl<'d, T: Instance, M: Mode> Uart<'d, T, M> {
pin.pad_ctrl().write(|w| w.set_ie(true)); pin.pad_ctrl().write(|w| w.set_ie(true));
} }
Uart::<T,M>::set_baudrate_inner(config.baudrate); Self::set_baudrate_inner(config.baudrate);
let (pen, eps) = match config.parity { let (pen, eps) = match config.parity {
Parity::ParityNone => (false, false), Parity::ParityNone => (false, false),