file up & download and delete
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
mod LittleFS2StorageAdapter;
|
||||
pub(crate) mod battery;
|
||||
pub mod esp;
|
||||
mod initial_hal;
|
||||
mod little_fs2storage_adapter;
|
||||
mod rtc;
|
||||
//mod water;
|
||||
|
||||
@@ -34,12 +34,10 @@ use esp_bootloader_esp_idf::partitions::{
|
||||
};
|
||||
use esp_hal::clock::CpuClock;
|
||||
use esp_hal::gpio::{Input, InputConfig, Pull};
|
||||
use esp_println::println;
|
||||
use measurements::{Current, Voltage};
|
||||
|
||||
use crate::hal::LittleFS2StorageAdapter::LittleFs2Filesystem;
|
||||
use crate::hal::little_fs2storage_adapter::LittleFs2Filesystem;
|
||||
use embassy_sync::mutex::Mutex;
|
||||
use embedded_storage::nor_flash::{NorFlash, ReadNorFlash};
|
||||
use esp_alloc as _;
|
||||
use esp_backtrace as _;
|
||||
use esp_bootloader_esp_idf::ota::Slot;
|
||||
@@ -182,6 +180,7 @@ impl PlantHal {
|
||||
let peripherals: Peripherals = esp_hal::init(config);
|
||||
|
||||
esp_alloc::heap_allocator!(size: 64 * 1024);
|
||||
esp_alloc::heap_allocator!(#[link_section = ".dram2_uninit"] size: 64000);
|
||||
let systimer = SystemTimer::new(peripherals.SYSTIMER);
|
||||
|
||||
let boot_button = Input::new(
|
||||
@@ -364,9 +363,11 @@ impl PlantHal {
|
||||
to_config_mode as u32,
|
||||
"",
|
||||
&format!("{reasons:?}"),
|
||||
);
|
||||
)
|
||||
.await;
|
||||
|
||||
esp.init_rtc_deepsleep_memory(init_rtc_store, to_config_mode);
|
||||
esp.init_rtc_deepsleep_memory(init_rtc_store, to_config_mode)
|
||||
.await;
|
||||
|
||||
let config = esp.load_config().await;
|
||||
|
||||
@@ -453,7 +454,8 @@ impl PlantHal {
|
||||
0,
|
||||
"",
|
||||
&err.to_string(),
|
||||
);
|
||||
)
|
||||
.await;
|
||||
HAL {
|
||||
board_hal: initial_hal::create_initial_board(
|
||||
free_pins,
|
||||
|
||||
Reference in New Issue
Block a user