[−][src]Struct e310x_hal::serial::Serial
Serial abstraction
Methods
impl<UART: UartX, TX, RX> Serial<UART, (TX, RX)>
[src]
pub fn new(uart: UART, pins: (TX, RX), baud_rate: Bps, clocks: Clocks) -> Self where
TX: TxPin<UART>,
RX: RxPin<UART>,
[src]
TX: TxPin<UART>,
RX: RxPin<UART>,
Configures a UART peripheral to provide serial communication
pub fn listen(self) -> Self
[src]
Starts listening for an interrupt event
pub fn unlisten(self) -> Self
[src]
Stops listening for an interrupt event
pub fn split(self) -> (Tx<UART>, Rx<UART>)
[src]
Splits the Serial
abstraction into a transmitter and a
receiver half
pub fn free(self) -> (UART, (TX, RX))
[src]
Releases the UART peripheral and associated pins
impl<TX, RX> Serial<UART0, (TX, RX)>
[src]
pub fn uart0(
uart: UART0,
pins: (TX, RX),
baud_rate: Bps,
clocks: Clocks
) -> Self where
TX: TxPin<UART0>,
RX: RxPin<UART0>,
[src]
uart: UART0,
pins: (TX, RX),
baud_rate: Bps,
clocks: Clocks
) -> Self where
TX: TxPin<UART0>,
RX: RxPin<UART0>,
Deprecated:
Please use Serial::new function instead
Configures a UART peripheral to provide serial communication
impl<TX, RX> Serial<UART1, (TX, RX)>
[src]
pub fn uart1(
uart: UART1,
pins: (TX, RX),
baud_rate: Bps,
clocks: Clocks
) -> Self where
TX: TxPin<UART1>,
RX: RxPin<UART1>,
[src]
uart: UART1,
pins: (TX, RX),
baud_rate: Bps,
clocks: Clocks
) -> Self where
TX: TxPin<UART1>,
RX: RxPin<UART1>,
Deprecated:
Please use Serial::new function instead
Configures a UART peripheral to provide serial communication
Auto Trait Implementations
impl<UART, PINS> Send for Serial<UART, PINS> where
PINS: Send,
UART: Send,
PINS: Send,
UART: Send,
impl<UART, PINS> Sync for Serial<UART, PINS> where
PINS: Sync,
UART: Sync,
PINS: Sync,
UART: Sync,
impl<UART, PINS> Unpin for Serial<UART, PINS> where
PINS: Unpin,
UART: Unpin,
PINS: Unpin,
UART: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,