Struct f3::serial::Serial
[−]
[src]
pub struct Serial<'a>(pub &'a Usart1);
Methods
impl<'a> Serial<'a>
[src]
fn init(self, gpioa: &Gpioa, rcc: &Rcc, baud_rate: u32)
Initializes the serial interface with a baud rate of baut_rate
bits
per second
fn read(self) -> Result<u8>
Reads a byte from the RX buffer
Returns None
if the buffer is empty
fn write(self, byte: u8) -> Result<()>
Writes byte into the TX buffer
Returns Err
if the buffer is already full
Trait Implementations
impl<'a> Clone for Serial<'a>
[src]
fn clone(&self) -> Serial<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more