Struct gd32vf103xx_hal::serial::Serial [−][src]
pub struct Serial<USART, TX, RX> { /* fields omitted */ }
Expand description
Serial abstraction
Implementations
Configures the serial interface and creates the interface struct.
pins
is a tuple specifying transmit and receive pins. Current mode of
these pins does not matter, as they are reconfigured during USART
initialization.
config
holds UART configuration such as the baud rate of the interface.
The Serial
struct takes ownership over the USARTx
device
registers and the specified PINS
afio
and rcu
are register handles which are passed for
configuration. (afio
is used to map the USART to the
corresponding pins. rcu
is used to reset the USART.)
Starts listening to the USART by enabling the Received data ready to be read (RXNE) interrupt and Transmit data register empty (TXE) interrupt
Stops listening to the USART by disabling the Received data ready to be read (RXNE) interrupt and Transmit data register empty (TXE) interrupt