esp_hal::uart

Struct AtCmdConfig

Source
pub struct AtCmdConfig {
    pub pre_idle_count: Option<u16>,
    pub post_idle_count: Option<u16>,
    pub gap_timeout: Option<u16>,
    pub cmd_char: u8,
    pub char_num: Option<u8>,
}
Expand description

Configuration for the AT-CMD detection functionality

Fields§

§pre_idle_count: Option<u16>

Optional idle time before the AT command detection begins, in clock cycles.

§post_idle_count: Option<u16>

Optional idle time after the AT command detection ends, in clock cycles.

§gap_timeout: Option<u16>

Optional timeout between characters in the AT command, in clock cycles.

§cmd_char: u8

The character that triggers the AT command detection.

§char_num: Option<u8>

Optional number of characters to detect as part of the AT command.

Implementations§

Source§

impl AtCmdConfig

Source

pub fn new( pre_idle_count: Option<u16>, post_idle_count: Option<u16>, gap_timeout: Option<u16>, cmd_char: u8, char_num: Option<u8>, ) -> AtCmdConfig

Creates a new AtCmdConfig with the specified configuration.

This function sets up the AT command detection parameters, including pre- and post-idle times, a gap timeout, the triggering command character, and the number of characters to detect.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.