esp_idf_hal::i2c

Type Alias I2cConfig

Source
pub type I2cConfig = Config;

Aliased Type§

struct I2cConfig {
    pub baudrate: Hertz,
    pub sda_pullup_enabled: bool,
    pub scl_pullup_enabled: bool,
    pub timeout: Option<APBTickType>,
    pub intr_flags: EnumSet<InterruptType>,
}

Fields§

§baudrate: Hertz§sda_pullup_enabled: bool§scl_pullup_enabled: bool§timeout: Option<APBTickType>§intr_flags: EnumSet<InterruptType>

Implementations

Source§

impl Config

Source

pub fn new() -> Self

Source

pub fn baudrate(self, baudrate: Hertz) -> Self

Source

pub fn sda_enable_pullup(self, enable: bool) -> Self

Source

pub fn scl_enable_pullup(self, enable: bool) -> Self

Source

pub fn timeout(self, timeout: APBTickType) -> Self

Source

pub fn intr_flags(self, flags: EnumSet<InterruptType>) -> Self

Trait Implementations

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Config

Source§

fn default() -> Self

Returns the “default value” for a type. Read more