wip: add flash info view
This commit is contained in:
+6
-5
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user