Add flowsensor prototype, add canbus to backplane

This commit is contained in:
2025-07-27 13:38:53 +02:00
parent 9f113adf7e
commit d650358bab
18 changed files with 4294 additions and 3553 deletions

View File

@@ -47,6 +47,7 @@ use once_cell::sync::Lazy;
use std::result::Result::Ok as OkStd;
use std::sync::Mutex;
use std::time::Duration;
use esp_idf_hal::pcnt::PCNT1;
//Only support for 8 right now!
pub const PLANT_COUNT: usize = 8;
@@ -154,6 +155,7 @@ pub struct FreePeripherals {
pub gpio29: Gpio29,
pub gpio30: Gpio30,
pub pcnt0: PCNT0,
pub pcnt1: PCNT1,
pub adc1: ADC1,
}
@@ -186,6 +188,7 @@ impl PlantHal {
let free_pins = FreePeripherals {
adc1: peripherals.adc1,
pcnt0: peripherals.pcnt0,
pcnt1: peripherals.pcnt1,
gpio0: peripherals.pins.gpio0,
gpio1: peripherals.pins.gpio1,
gpio2: peripherals.pins.gpio2,