rsiot/components/cmp_esp_i2c_master/
config.rsuse std::time::Duration;
use esp_idf_svc::hal::{gpio::AnyIOPin, i2c::I2c, peripheral::Peripheral};
use crate::{drivers_i2c::I2cDevices, message::MsgDataBound};
pub struct Config<TMsg, TI2c, TPeripheral>
where
TMsg: MsgDataBound,
TI2c: Peripheral<P = TPeripheral> + 'static,
TPeripheral: I2c,
{
pub i2c: TI2c,
pub sda: AnyIOPin,
pub scl: AnyIOPin,
pub baudrate: ConfigBaudrate,
pub pullup_enable: bool,
pub timeout: Duration,
pub devices: Vec<I2cDevices<TMsg>>,
}
#[derive(Clone)]
pub enum ConfigBaudrate {
Standard,
Fast,
}