Struct esp32_hal::serial::Serial [−][src]
pub struct Serial<UART: Instance, TX: OutputPin, RX: InputPin, CTS: InputPin = Gpio19<Input<Floating>>, RTS: OutputPin = Gpio22<Output<PushPull>>> { /* fields omitted */ }
Expand description
Serial abstraction
Implementations
Create a new serial driver
Change the number of stop bits
Change the number of data bits
Change the type of parity checking
Change the baudrate.
Will automatically select the clock source. When possible the reference clock (1MHz) will be used, because this is constant when the clock source/frequency changes. However if one of the clock frequencies is below 10MHz or if the baudrate is above the reference clock or if the baudrate cannot be set within 1.5% then use the APB clock.
Change the baudrate choosing the reference or APB clock manually
Returns if the reference or APB clock is used
Return true if the receiver is idle
Return true if the transmitter is idle
Split the serial driver in separate TX and RX drivers