outover instead of inover

This commit is contained in:
Jacob Davis-Hansson 2023-04-15 15:13:44 +02:00
parent b9fc2a6b33
commit 81f10e136a

View File

@ -6,7 +6,7 @@ use crate::dma::{AnyChannel, Channel};
use crate::gpio::sealed::Pin; use crate::gpio::sealed::Pin;
use crate::gpio::AnyPin; use crate::gpio::AnyPin;
use crate::{pac, peripherals, Peripheral}; use crate::{pac, peripherals, Peripheral};
use crate::pac::io::vals::Inover; use crate::pac::io::vals::{Inover, Outover};
#[cfg(feature = "nightly")] #[cfg(feature = "nightly")]
mod buffered; mod buffered;
@ -396,7 +396,7 @@ impl<'d, T: Instance + 'd, M: Mode> Uart<'d, T, M> {
if let Some(pin) = &tx { if let Some(pin) = &tx {
pin.io().ctrl().write(|w| { pin.io().ctrl().write(|w| {
w.set_funcsel(2); w.set_funcsel(2);
w.set_inover(if config.invert_tx { Inover::INVERT } else { Inover::NORMAL }); w.set_outover(if config.invert_tx { Outover::INVERT } else { Outover::NORMAL });
}); });
pin.pad_ctrl().write(|w| w.set_ie(true)); pin.pad_ctrl().write(|w| w.set_ie(true));
} }
@ -417,7 +417,7 @@ impl<'d, T: Instance + 'd, M: Mode> Uart<'d, T, M> {
if let Some(pin) = &rts { if let Some(pin) = &rts {
pin.io().ctrl().write(|w| { pin.io().ctrl().write(|w| {
w.set_funcsel(2); w.set_funcsel(2);
w.set_inover(if config.invert_rts { Inover::INVERT } else { Inover::NORMAL }); w.set_outover(if config.invert_rts { Outover::INVERT } else { Outover::NORMAL });
}); });
pin.pad_ctrl().write(|w| w.set_ie(true)); pin.pad_ctrl().write(|w| w.set_ie(true));
} }