wip: add flash info view

This commit is contained in:
2026-08-29 15:52:38 +00:00
parent e65162249d
commit 92c20d61cb
6 changed files with 125 additions and 18 deletions
+6 -5
View File
@@ -22,7 +22,6 @@ use creaturedex::network::wifi::setup_wifi;
use creaturedex::storage::cardstore::CardStore;
use creaturedex::storage::store::Store;
use embassy_executor::Spawner;
use embassy_time::Instant;
use embedded_graphics::pixelcolor::BinaryColor;
use embedded_graphics::{
mono_font::{MonoTextStyle, ascii::FONT_6X10},
@@ -30,13 +29,13 @@ use embedded_graphics::{
text::Text,
};
use embedded_hal_bus::i2c::AtomicDevice;
use embedded_hal_bus::util::AtomicCell;
use esp_hal::Blocking;
use esp_hal::clock::CpuClock;
use esp_hal::gpio::{Input, InputConfig, Pull};
use esp_hal::timer::timg::TimerGroup;
use log::error;
use esp_hal::rtc_cntl::Rtc;
#[panic_handler]
fn panic(panic_info: &core::panic::PanicInfo) -> ! {
error!("{}", panic_info);
@@ -108,7 +107,7 @@ async fn main(spawner: Spawner) {
}
let store = Store::new(peripherals.FLASH).expect("Could not initialize Flash Store");
let card_store = CardStore::new(store).expect("Could not initialize Card Store");
let cardstore = CardStore::new(store).expect("Could not initialize Card Store");
let rtc = Rtc::new(peripherals.LPWR);
//setup_wifi(peripherals.WIFI, peripherals.FLASH, &spawner).await;
@@ -148,7 +147,9 @@ async fn main(spawner: Spawner) {
log::info!("Setup complete, entering main loop");
spawner.spawn(navigation::run(inputs, outputs).expect("run task failed"));
spawner.spawn(background_tasks::nfc_scanner(nfc_driver).expect("nfc scanner task failed"));
spawner.spawn(
background_tasks::nfc_scanner(nfc_driver, cardstore, rtc).expect("nfc scanner task failed"),
);
}
fn display_shit(oled: &mut SecondaryDisplay<'static>, text: &str) {