pub struct Uart<'d, T> { /* private fields */ }Expand description
UART driver
Implementations§
source§impl<'d, T> Uart<'d, T>where
    T: Instance,
 
impl<'d, T> Uart<'d, T>where T: Instance,
sourcepub fn new_with_config<P>(
    uart: impl Peripheral<P = T> + 'd,
    config: Option<Config>,
    pins: Option<P>,
    clocks: &Clocks<'_>
) -> Uart<'d, T>where
    P: UartPins,
 
pub fn new_with_config<P>( uart: impl Peripheral<P = T> + 'd, config: Option<Config>, pins: Option<P>, clocks: &Clocks<'_> ) -> Uart<'d, T>where P: UartPins,
Create a new UART instance with defaults
sourcepub fn new(uart: impl Peripheral<P = T> + 'd) -> Uart<'d, T>
 
pub fn new(uart: impl Peripheral<P = T> + 'd) -> Uart<'d, T>
Create a new UART instance with defaults
sourcepub fn set_at_cmd(&mut self, config: AtCmdConfig)
 
pub fn set_at_cmd(&mut self, config: AtCmdConfig)
Configures the AT-CMD detection settings.
sourcepub fn set_rx_fifo_full_threshold(&mut self, threshold: u16)
 
pub fn set_rx_fifo_full_threshold(&mut self, threshold: u16)
Configures the RX-FIFO threshold
sourcepub fn listen_at_cmd(&mut self)
 
pub fn listen_at_cmd(&mut self)
Listen for AT-CMD interrupts
sourcepub fn unlisten_at_cmd(&mut self)
 
pub fn unlisten_at_cmd(&mut self)
Stop listening for AT-CMD interrupts
sourcepub fn listen_tx_done(&mut self)
 
pub fn listen_tx_done(&mut self)
Listen for TX-DONE interrupts
sourcepub fn unlisten_tx_done(&mut self)
 
pub fn unlisten_tx_done(&mut self)
Stop listening for TX-DONE interrupts
sourcepub fn listen_rx_fifo_full(&mut self)
 
pub fn listen_rx_fifo_full(&mut self)
Listen for RX-FIFO-FULL interrupts
sourcepub fn unlisten_rx_fifo_full(&mut self)
 
pub fn unlisten_rx_fifo_full(&mut self)
Stop listening for RX-FIFO-FULL interrupts
sourcepub fn at_cmd_interrupt_set(&self) -> bool
 
pub fn at_cmd_interrupt_set(&self) -> bool
Checks if AT-CMD interrupt is set
sourcepub fn tx_done_interrupt_set(&self) -> bool
 
pub fn tx_done_interrupt_set(&self) -> bool
Checks if TX-DONE interrupt is set
sourcepub fn rx_fifo_full_interrupt_set(&self) -> bool
 
pub fn rx_fifo_full_interrupt_set(&self) -> bool
Checks if RX-FIFO-FULL interrupt is set
sourcepub fn reset_at_cmd_interrupt(&self)
 
pub fn reset_at_cmd_interrupt(&self)
Reset AT-CMD interrupt
sourcepub fn reset_tx_done_interrupt(&self)
 
pub fn reset_tx_done_interrupt(&self)
Reset TX-DONE interrupt
sourcepub fn reset_rx_fifo_full_interrupt(&self)
 
pub fn reset_rx_fifo_full_interrupt(&self)
Reset RX-FIFO-FULL interrupt
sourcepub fn change_stop_bits(&mut self, stop_bits: StopBits) -> &mut Uart<'d, T>
 
pub fn change_stop_bits(&mut self, stop_bits: StopBits) -> &mut Uart<'d, T>
Change the number of stop bits