pub struct Uart { /* private fields */ }
Expand description

Representation of a UART.

NOTE: Instances of this struct should never be created manually. Refer to the public constants the struct holds, which represent the UARTs A through E.

Implementations

Representation of UART A.

Representation of UART B.

Representation of UART C.

Representation of UART D.

Representation of UART E.

Initializes the UART with a given baud rate.

NOTE: This method needs to be called once before a Uart can actually send and receive data. Further, it is required to do the respective pinmux configuration before calling this method.

Reads a singly byte over UART and returns it.

This method blocks until data is available to read.

Fills a mutable buffer of data with bytes read over UART.

This method blocks until the buffer is filled.

Writes a single byte over UART.

This method blocks until data can be transferred.

Writes a buffer of bytes over UART.

This method blocks until everything was transferred.

Enables or disables inversion of the UART signal with the desired bitmask.

See the documentation of the UART_IRDA_CSR_0 bitfield for instructions on the structure of the expected bitmask.

Flushes the underlying FIFOs of the Uart.

This wipes out the data to read and the data that should be written, so be careful when you use it. In most cases, this method won’t be needed.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Writes a string slice into this writer, returning whether the write succeeded. Read more

Writes a char into this writer, returning whether the write succeeded. Read more

Glue for usage of the write! macro with implementors of this trait. Read more

The type of error that can occur when writing

Writes a slice, blocking until everything has been written Read more

Block until the serial interface has sent all buffered words

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.