RP-PICO UART adding set_baudrate: missing to run rust-fmt

This commit is contained in:
Andres Hurtado Lopez 2023-02-26 21:23:51 -05:00
parent 482ba835c4
commit 2331d58aa6

View file

@ -385,13 +385,11 @@ impl<'d, T: Instance + 'd, M: Mode> Uart<'d, T, M> {
}
}
/// sets baudrate on runtime
pub fn set_baudrate(&mut self, baudrate: u32) {
Self::set_baudrate_inner(baudrate);
}
fn set_baudrate_inner(baudrate: u32) {
let r = T::regs();
@ -410,13 +408,11 @@ impl<'d, T: Instance + 'd, M: Mode> Uart<'d, T, M> {
}
unsafe {
// Load PL011's baud divisor registers
r.uartibrd().write_value(pac::uart::regs::Uartibrd(baud_ibrd));
r.uartfbrd().write_value(pac::uart::regs::Uartfbrd(baud_fbrd));
}
}
}
impl<'d, T: Instance, M: Mode> Uart<'d, T, M> {