Merge branch 'can' into develop
This commit is contained in:
@@ -5,6 +5,7 @@ mod rtc;
|
||||
mod v3_hal;
|
||||
mod v4_hal;
|
||||
mod water;
|
||||
mod v4_sensor;
|
||||
|
||||
use crate::hal::rtc::{DS3231Module, RTCModuleInteraction};
|
||||
use crate::hal::water::TankSensor;
|
||||
@@ -48,10 +49,11 @@ use once_cell::sync::Lazy;
|
||||
use std::result::Result::Ok as OkStd;
|
||||
use std::sync::Mutex;
|
||||
use std::time::Duration;
|
||||
use esp_idf_hal::can::CAN;
|
||||
use esp_idf_hal::pcnt::PCNT1;
|
||||
|
||||
//Only support for 8 right now!
|
||||
pub const PLANT_COUNT: usize = 8;
|
||||
const REPEAT_MOIST_MEASURE: usize = 1;
|
||||
|
||||
const TANK_MULTI_SAMPLE: usize = 11;
|
||||
|
||||
@@ -157,6 +159,7 @@ pub struct FreePeripherals {
|
||||
pub pcnt0: PCNT0,
|
||||
pub pcnt1: PCNT1,
|
||||
pub adc1: ADC1,
|
||||
pub can: CAN,
|
||||
}
|
||||
|
||||
impl PlantHal {
|
||||
@@ -186,6 +189,7 @@ impl PlantHal {
|
||||
boot_button.set_pull(Pull::Floating)?;
|
||||
|
||||
let free_pins = FreePeripherals {
|
||||
can: peripherals.can,
|
||||
adc1: peripherals.adc1,
|
||||
pcnt0: peripherals.pcnt0,
|
||||
pcnt1: peripherals.pcnt1,
|
||||
|
||||
Reference in New Issue
Block a user