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

Returns ownership of the borrowed register handles

Separates the serial struct into separate channel objects for sending (Tx) and receiving (Rx)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.