pub type UartConfig = Config;
Aliased Type§
struct UartConfig {Show 13 fields
pub mode: Mode,
pub baudrate: Hertz,
pub data_bits: DataBits,
pub parity: Parity,
pub stop_bits: StopBits,
pub flow_control: FlowControl,
pub flow_control_rts_threshold: u8,
pub source_clock: SourceClock,
pub intr_flags: EnumSet<InterruptType>,
pub event_config: EventConfig,
pub rx_fifo_size: usize,
pub tx_fifo_size: usize,
pub queue_size: usize,
/* private fields */
}
Fields§
§mode: Mode
§baudrate: Hertz
§data_bits: DataBits
§parity: Parity
§stop_bits: StopBits
§flow_control: FlowControl
§flow_control_rts_threshold: u8
§source_clock: SourceClock
§intr_flags: EnumSet<InterruptType>
Configures the flags to use for interrupt allocation, e.g. priority to use for the interrupt.
Note that you should not set Iram
here, because it will
be automatically set depending on the value of CONFIG_UART_ISR_IN_IRAM
.
event_config: EventConfig
Configures the interrupts the driver should enable.
rx_fifo_size: usize
The size of the software rx buffer. Must be bigger than the hardware FIFO.
tx_fifo_size: usize
The size of the software tx buffer. Must be bigger than the hardware FIFO or 0 to disable transmit buffering (note that this will make write operations block until data has been sent out).
queue_size: usize
Number of events that should fit into the event queue. Specify 0 to prevent the creation of an event queue.
Implementations
Source§impl Config
impl Config
pub const fn new() -> Config
pub fn mode(self, mode: Mode) -> Self
pub fn baudrate(self, baudrate: Hertz) -> Self
pub fn parity_none(self) -> Self
pub fn parity_even(self) -> Self
pub fn parity_odd(self) -> Self
pub fn data_bits(self, data_bits: DataBits) -> Self
pub fn stop_bits(self, stop_bits: StopBits) -> Self
pub fn flow_control(self, flow_control: FlowControl) -> Self
Sourcepub fn flow_control_rts_threshold(self, flow_control_rts_threshold: u8) -> Self
pub fn flow_control_rts_threshold(self, flow_control_rts_threshold: u8) -> Self
This setting only has effect if flow control is enabled.
It determines how many bytes must be received before RTS
line is asserted.
Notice that count starts from 0
which means that RTS
is asserted after every received byte.