Struct stm32l432xx_hal::serial::Serial [−][src]
pub struct Serial<USART, PINS> { /* fields omitted */ }
Serial abstraction
Methods
impl<PINS> Serial<USART1, PINS>
[src]
impl<PINS> Serial<USART1, PINS>
pub fn usart1(
usart: USART1,
pins: PINS,
baud_rate: Bps,
clocks: Clocks,
apb: &mut APB2
) -> Self where
PINS: Pins<USART1>,
[src]
pub fn usart1(
usart: USART1,
pins: PINS,
baud_rate: Bps,
clocks: Clocks,
apb: &mut APB2
) -> Self where
PINS: Pins<USART1>,
Configures a USART peripheral to provide serial communication
pub fn listen(&mut self, event: Event)
[src]
pub fn listen(&mut self, event: Event)
Starts listening for an interrupt event
pub fn unlisten(&mut self, event: Event)
[src]
pub fn unlisten(&mut self, event: Event)
Starts listening for an interrupt event
pub fn split(self) -> (Tx<USART1>, Rx<USART1>)
[src]
pub fn split(self) -> (Tx<USART1>, Rx<USART1>)
Splits the Serial
abstraction into a transmitter and a receiver half
pub fn free(self) -> (USART1, PINS)
[src]
pub fn free(self) -> (USART1, PINS)
Releases the USART peripheral and associated pins
impl<PINS> Serial<USART2, PINS>
[src]
impl<PINS> Serial<USART2, PINS>
pub fn usart2(
usart: USART2,
pins: PINS,
baud_rate: Bps,
clocks: Clocks,
apb: &mut APB1R1
) -> Self where
PINS: Pins<USART2>,
[src]
pub fn usart2(
usart: USART2,
pins: PINS,
baud_rate: Bps,
clocks: Clocks,
apb: &mut APB1R1
) -> Self where
PINS: Pins<USART2>,
Configures a USART peripheral to provide serial communication
pub fn listen(&mut self, event: Event)
[src]
pub fn listen(&mut self, event: Event)
Starts listening for an interrupt event
pub fn unlisten(&mut self, event: Event)
[src]
pub fn unlisten(&mut self, event: Event)
Starts listening for an interrupt event
pub fn split(self) -> (Tx<USART2>, Rx<USART2>)
[src]
pub fn split(self) -> (Tx<USART2>, Rx<USART2>)
Splits the Serial
abstraction into a transmitter and a receiver half
pub fn free(self) -> (USART2, PINS)
[src]
pub fn free(self) -> (USART2, PINS)
Releases the USART peripheral and associated pins