Reset UART in new()

This commit is contained in:
Jan Niehusmann 2021-12-05 07:05:12 +00:00
parent 26fa532fa3
commit b380b3ddf6

View file

@ -224,6 +224,7 @@ impl<S: State, D: UartDevice> UartPeripheral<S, D> {
impl<D: UartDevice> UartPeripheral<Disabled, D> { impl<D: UartDevice> UartPeripheral<Disabled, D> {
/// Creates an UartPeripheral in Disabled state. /// Creates an UartPeripheral in Disabled state.
pub fn new(device: D, resets: &mut pac::RESETS) -> UartPeripheral<Disabled, D> { pub fn new(device: D, resets: &mut pac::RESETS) -> UartPeripheral<Disabled, D> {
device.reset_bring_down(resets);
device.reset_bring_up(resets); device.reset_bring_up(resets);
UartPeripheral { UartPeripheral {