stuff
This commit is contained in:
@@ -45,6 +45,8 @@ use esp_idf_svc::systime::EspSystemTime;
|
||||
use esp_idf_sys::{esp, gpio_hold_dis, gpio_hold_en, vTaskDelay, EspError};
|
||||
use one_wire_bus::OneWire;
|
||||
|
||||
use bitbang_hal;
|
||||
|
||||
use crate::config::{self, Config, WifiConfig};
|
||||
use crate::STAY_ALIVE;
|
||||
|
||||
@@ -953,12 +955,13 @@ impl CreatePlantHal<'_> for PlantHal {
|
||||
fn create() -> Result<Mutex<PlantCtrlBoard<'static>>> {
|
||||
let peripherals = Peripherals::take()?;
|
||||
|
||||
|
||||
let i2c = peripherals.i2c0;
|
||||
let config = I2cConfig::new()
|
||||
.scl_enable_pullup(false)
|
||||
.sda_enable_pullup(false)
|
||||
.baudrate(10_u32.kHz().into())
|
||||
.timeout(Duration::from_millis(10).into);
|
||||
.baudrate(1_u32.kHz().into())
|
||||
.timeout(Duration::from_millis(10).into());
|
||||
let scl = peripherals.pins.gpio19;
|
||||
let sda = peripherals.pins.gpio20;
|
||||
|
||||
|
Reference in New Issue
Block a user