Format
This commit is contained in:
parent
a544726be4
commit
eb73cc7cfe
@ -13,8 +13,8 @@ use embassy_sync::waitqueue::AtomicWaker;
|
|||||||
use super::DePin;
|
use super::DePin;
|
||||||
use super::{
|
use super::{
|
||||||
clear_interrupt_flags, configure, half_duplex_set_rx_tx_before_write, rdr, reconfigure, send_break, set_baudrate,
|
clear_interrupt_flags, configure, half_duplex_set_rx_tx_before_write, rdr, reconfigure, send_break, set_baudrate,
|
||||||
sr, tdr, Config, ConfigError, CtsPin, Duplex, Error, HalfDuplexReadback, Info, Instance, Regs,
|
sr, tdr, Config, ConfigError, CtsPin, Duplex, Error, HalfDuplexReadback, Info, Instance, Regs, RtsPin, RxPin,
|
||||||
RtsPin, RxPin, TxPin,
|
TxPin,
|
||||||
};
|
};
|
||||||
use crate::gpio::{AfType, AnyPin, Pull, SealedPin as _};
|
use crate::gpio::{AfType, AnyPin, Pull, SealedPin as _};
|
||||||
use crate::interrupt::{self, InterruptExt};
|
use crate::interrupt::{self, InterruptExt};
|
||||||
|
|||||||
@ -450,13 +450,7 @@ impl<'d> UartTx<'d, Async> {
|
|||||||
tx_dma: Peri<'d, impl TxDma<T>>,
|
tx_dma: Peri<'d, impl TxDma<T>>,
|
||||||
config: Config,
|
config: Config,
|
||||||
) -> Result<Self, ConfigError> {
|
) -> Result<Self, ConfigError> {
|
||||||
Self::new_inner(
|
Self::new_inner(peri, new_pin!(tx, config.tx_af()), None, new_dma!(tx_dma), config)
|
||||||
peri,
|
|
||||||
new_pin!(tx, config.tx_af()),
|
|
||||||
None,
|
|
||||||
new_dma!(tx_dma),
|
|
||||||
config,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a new tx-only UART with a clear-to-send pin
|
/// Create a new tx-only UART with a clear-to-send pin
|
||||||
@ -508,13 +502,7 @@ impl<'d> UartTx<'d, Blocking> {
|
|||||||
tx: Peri<'d, impl TxPin<T>>,
|
tx: Peri<'d, impl TxPin<T>>,
|
||||||
config: Config,
|
config: Config,
|
||||||
) -> Result<Self, ConfigError> {
|
) -> Result<Self, ConfigError> {
|
||||||
Self::new_inner(
|
Self::new_inner(peri, new_pin!(tx, config.tx_af()), None, None, config)
|
||||||
peri,
|
|
||||||
new_pin!(tx, config.tx_af()),
|
|
||||||
None,
|
|
||||||
None,
|
|
||||||
config,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a new blocking tx-only UART with a clear-to-send pin
|
/// Create a new blocking tx-only UART with a clear-to-send pin
|
||||||
@ -682,13 +670,7 @@ impl<'d> UartRx<'d, Async> {
|
|||||||
rx_dma: Peri<'d, impl RxDma<T>>,
|
rx_dma: Peri<'d, impl RxDma<T>>,
|
||||||
config: Config,
|
config: Config,
|
||||||
) -> Result<Self, ConfigError> {
|
) -> Result<Self, ConfigError> {
|
||||||
Self::new_inner(
|
Self::new_inner(peri, new_pin!(rx, config.rx_af()), None, new_dma!(rx_dma), config)
|
||||||
peri,
|
|
||||||
new_pin!(rx, config.rx_af()),
|
|
||||||
None,
|
|
||||||
new_dma!(rx_dma),
|
|
||||||
config,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a new rx-only UART with a request-to-send pin
|
/// Create a new rx-only UART with a request-to-send pin
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user