Struct esp_idf_hal::uart::config::EventConfig
source · pub struct EventConfig {
pub receive_timeout: Option<u8>,
pub rx_fifo_full: Option<u8>,
pub tx_fifo_empty: Option<u8>,
pub flags: EnumSet<EventFlags>,
/* private fields */
}
Expand description
Configures the interrupts the UART driver should enable in order to be able to quickly inform us about the related event.
Fields§
§receive_timeout: Option<u8>
If Some(number_of_words)
, an interrupt will trigger
after number_of_words
could have been transmitted
(unit is baudrate dependant).
If None
or Some(0)
interrupt will be disabled.
rx_fifo_full: Option<u8>
Sets the threshold at which an interrupt will be generated (the hardware receive FIFO contains more words than this number).
If set to None
interrupt will be disabled.
tx_fifo_empty: Option<u8>
Sets the threshold below which an interrupt will be generated (the hardware transmit FIFO contains less words than this number).
If set to None
interrupt will be disabled.
Should not be set to 0
as the interrupt will trigger constantly.
flags: EnumSet<EventFlags>
Other interrupts to enable
Implementations§
source§impl EventConfig
impl EventConfig
Trait Implementations§
source§impl Clone for EventConfig
impl Clone for EventConfig
source§fn clone(&self) -> EventConfig
fn clone(&self) -> EventConfig
Returns a copy of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EventConfig
impl Debug for EventConfig
source§impl Default for EventConfig
impl Default for EventConfig
source§impl From<EventConfig> for uart_intr_config_t
impl From<EventConfig> for uart_intr_config_t
source§fn from(cfg: EventConfig) -> Self
fn from(cfg: EventConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EventConfig
impl RefUnwindSafe for EventConfig
impl Send for EventConfig
impl Sync for EventConfig
impl Unpin for EventConfig
impl UnwindSafe for EventConfig
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)