wip
This commit is contained in:
Generated
+29
-1583
File diff suppressed because it is too large
Load Diff
+2
-4
@@ -32,10 +32,6 @@ embassy-executor = { version = "0.10.0", features = ["trace", "metadata-name"] }
|
||||
embassy-time = { version = "0.5.1", default-features = false }
|
||||
embassy-futures = "0.1.2"
|
||||
esp-alloc = "0.10.0"
|
||||
esp-hal-wifimanager = { git = "https://github.com/rhetenor/esp-hal-wifimanager.git", default-features = false, features = [
|
||||
"ap",
|
||||
"esp32s3",
|
||||
] }
|
||||
esp-println = { version = "0.17.0", features = ["esp32s3", "log-04"] }
|
||||
display-interface-spi = "0.5.0"
|
||||
ili9341 = "0.6.0"
|
||||
@@ -56,6 +52,8 @@ binary_serde = "1.0.25"
|
||||
static_assertions = { version = "1.1.0", default-features = false }
|
||||
embedded-text = "0.7.3"
|
||||
esp-nvs = { version = "0.5.0", features = ["esp32s3"] }
|
||||
esp-backtrace = { version = "0.19.0", features = ["esp32s3", "panic-handler", "println"] }
|
||||
esp-radio = { version = "0.18.0", features = ["esp32s3", "wifi"] }
|
||||
|
||||
[build-dependencies]
|
||||
log = "0.4.27"
|
||||
|
||||
+2
-7
@@ -1,9 +1,4 @@
|
||||
# ESP-IDF Partition Table
|
||||
# Name,Type,SubType,Offset,Size,Flags
|
||||
nvs,data,nvs,0x9000,0x6000,
|
||||
phy_init,data,phy,0xf000,0x1000,
|
||||
# We keep the default layout more or less. But here we add a partition for more data before our application
|
||||
more_nvs,data,nvs,0x10000,0xfa000,
|
||||
# no offset given -> tool infers it for us
|
||||
factory,app,factory, ,0xea6000,
|
||||
|
||||
nvs,data,nvs,0x9000,0xa00000,
|
||||
factory,app,factory,0xa10000,0x200000,
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
use crate::navigation::navigation::display_error;
|
||||
use crate::{
|
||||
navigation::{navigation::Mutex, outputs::Outputs, state::NavigationState},
|
||||
Mutex,
|
||||
navigation::{outputs::Outputs, state::NavigationState},
|
||||
peripherals::Peripherals,
|
||||
};
|
||||
use alloc::string::ToString;
|
||||
|
||||
+18
-10
@@ -9,6 +9,7 @@
|
||||
|
||||
use alloc::boxed::Box;
|
||||
use alloc::sync::Arc;
|
||||
use creaturedex::Mutex;
|
||||
use creaturedex::background_tasks;
|
||||
use creaturedex::drivers::i2c_bus::I2cBusPinConfiguration;
|
||||
use creaturedex::drivers::nfc_pn532::NfcPn532Driver;
|
||||
@@ -19,11 +20,12 @@ use creaturedex::drivers::tertiary_lcd::{
|
||||
BOX, EMPTY, EXAMPLE, HEART, TertiaryDisplay, TertiaryDisplayPinConfiguration,
|
||||
};
|
||||
use creaturedex::navigation::inputs::Inputs;
|
||||
use creaturedex::navigation::navigation::Mutex;
|
||||
use creaturedex::navigation::navigation::{self};
|
||||
use creaturedex::navigation::outputs::Outputs;
|
||||
use creaturedex::navigation::state::NavigationState;
|
||||
use creaturedex::network::wifi::WifiError;
|
||||
use creaturedex::network::wifi::setup_wifi;
|
||||
use creaturedex::network::wifi::wait_for_wifi_credentials;
|
||||
use creaturedex::peripherals::Peripherals;
|
||||
use creaturedex::peripherals::storage::cardstore::CardStore;
|
||||
use creaturedex::peripherals::storage::store::Store;
|
||||
@@ -40,20 +42,15 @@ use esp_hal::gpio::{Input, InputConfig, Pull};
|
||||
use esp_hal::timer::timg::TimerGroup;
|
||||
use log::error;
|
||||
|
||||
use esp_backtrace as _;
|
||||
use esp_hal::rtc_cntl::Rtc;
|
||||
|
||||
#[panic_handler]
|
||||
fn panic(panic_info: &core::panic::PanicInfo) -> ! {
|
||||
error!("{}", panic_info);
|
||||
loop {}
|
||||
}
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
const HEAP_SIZE: usize = 73744;
|
||||
|
||||
const NVS_PARTITION_OFFSET: usize = 0x10000;
|
||||
const NVS_PARTITION_SIZE: usize = 0xfa000;
|
||||
const NVS_PARTITION_OFFSET: usize = 0x9000;
|
||||
const NVS_PARTITION_SIZE: usize = 0xa0000;
|
||||
|
||||
// This creates a default app-descriptor required by the esp-idf bootloader.
|
||||
// For more information see: <https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/app_image_format.html#application-description>
|
||||
@@ -133,7 +130,18 @@ async fn main(spawner: Spawner) {
|
||||
.expect("failed to create nvs"),
|
||||
));
|
||||
|
||||
setup_wifi(esp_peripherals.WIFI, Arc::clone(&nvs), &spawner).await;
|
||||
let wifi_init = esp_radio::init(
|
||||
esp_wifi::EspWifiInitFor::Wifi,
|
||||
timg1.timer0,
|
||||
rng,
|
||||
peripherals.RADIO_CLK,
|
||||
)?;
|
||||
|
||||
match setup_wifi(esp_peripherals.WIFI, Arc::clone(&nvs), &spawner).await {
|
||||
Err(WifiError::NoCredentialsStored) => log::info!("no wifi credentials provided."),
|
||||
Err(err) => log::error!("error setting up wifi: {err}"),
|
||||
Ok(_) => (),
|
||||
}
|
||||
|
||||
let card_store = CardStore::new(nvs)
|
||||
.await
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#![no_std]
|
||||
#![feature(vec_into_chunks)]
|
||||
|
||||
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
pub mod background_tasks;
|
||||
@@ -13,6 +15,9 @@ pub mod network;
|
||||
pub mod peripherals;
|
||||
pub mod views;
|
||||
|
||||
pub type Mutex<T> = embassy_sync::mutex::Mutex<CriticalSectionRawMutex, T>;
|
||||
pub type Signal<T> = embassy_sync::signal::Signal<CriticalSectionRawMutex, T>;
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "Rust" fn _embassy_trace_poll_start(executor_id: u32) {}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use crate::Mutex;
|
||||
use crate::card::model::Card;
|
||||
use crate::navigation::inputs::ButtonAction;
|
||||
use crate::navigation::inputs::Inputs;
|
||||
@@ -12,11 +13,8 @@ use alloc::string::ToString;
|
||||
use core::error;
|
||||
|
||||
use embassy_futures::select::{Either, select};
|
||||
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
|
||||
use embassy_time::{Duration, Timer};
|
||||
|
||||
pub type Mutex<T> = embassy_sync::mutex::Mutex<CriticalSectionRawMutex, T>;
|
||||
pub type Signal<T> = embassy_sync::signal::Signal<CriticalSectionRawMutex, T>;
|
||||
pub static CARD_DATA: Mutex<Option<Card>> = Mutex::new(None);
|
||||
const DEBOUNCE_DURATION_MILLIS: u64 = 100;
|
||||
|
||||
|
||||
+174
-50
@@ -1,67 +1,191 @@
|
||||
use crate::navigation::navigation::Mutex;
|
||||
use crate::Mutex;
|
||||
use crate::Signal;
|
||||
use crate::alloc::string::ToString;
|
||||
use crate::navigation::inputs::Inputs;
|
||||
use crate::navigation::outputs::Outputs;
|
||||
use crate::peripherals::Peripherals;
|
||||
use crate::peripherals::storage::Nvs;
|
||||
use alloc::string::String;
|
||||
use alloc::sync::Arc;
|
||||
use core::error::Error;
|
||||
use core::fmt::Display;
|
||||
use embassy_executor::Spawner;
|
||||
use esp_nvs::Key;
|
||||
use esp_radio::wifi::WifiController;
|
||||
use esp_radio::*;
|
||||
|
||||
#[cfg(not(feature = "wokwi"))]
|
||||
pub async fn setup_wifi(
|
||||
wifi: esp_hal::peripherals::WIFI<'static>,
|
||||
nvs: Arc<Mutex<Nvs>>,
|
||||
spawner: &Spawner,
|
||||
) {
|
||||
let espnvs = esp_hal_wifimanager::Nvs::new_from_nvs(nvs, 0, 0);
|
||||
|
||||
let mut wm_settings = esp_hal_wifimanager::WmSettings::default();
|
||||
|
||||
wm_settings.ssid.clear();
|
||||
_ = core::fmt::write(
|
||||
&mut wm_settings.ssid,
|
||||
format_args!("CreatureDex-{:X}", esp_hal_wifimanager::get_efuse_mac()),
|
||||
);
|
||||
|
||||
wm_settings.wifi_conn_timeout = 30000;
|
||||
wm_settings.esp_reset_timeout = Some(300000); // 5min
|
||||
|
||||
let wifi_res =
|
||||
esp_hal_wifimanager::init_wm(wm_settings, spawner, Some(&espnvs), wifi, None).await;
|
||||
|
||||
log::info!("wifi_res: {wifi_res:?}");
|
||||
#[derive(Debug)]
|
||||
pub struct WifiCredentials {
|
||||
pub ssid: String,
|
||||
pub pass: String,
|
||||
}
|
||||
|
||||
#[cfg(feature = "wokwi")]
|
||||
pub async fn setup_wifi(
|
||||
wifi: esp_hal::peripherals::WIFI<'static>,
|
||||
nvs: Arc<Mutex<Nvs>>,
|
||||
spawner: &Spawner,
|
||||
) {
|
||||
log::info!("Wokwi mode active: pre-seeding WiFi Manager with Wokwi credentials");
|
||||
pub static WIFI_CREDENTIALS: Signal<WifiCredentials> = Signal::new();
|
||||
|
||||
use esp_nvs::Key;
|
||||
const WIFIMANAGER_NAMESPACE: Key = Key::from_str("wifimanager");
|
||||
const WIFIMANAGER_NVS_KEY: Key = Key::from_str("WIFI_SETUP");
|
||||
const WIFI_NAMESPACE: Key = Key::from_str("WIFI");
|
||||
const WIFI_INIT_KEY: Key = Key::from_str("INIT");
|
||||
const WIFI_SSID_KEY: Key = Key::from_str("WIFI_SSID");
|
||||
const WIFI_PASS_KEY: Key = Key::from_str("WIFI_PASS");
|
||||
|
||||
if let Err(e) = nvs.lock().await.set(
|
||||
&WIFIMANAGER_NAMESPACE,
|
||||
&WIFIMANAGER_NVS_KEY,
|
||||
"{\"ssid\":\"Wokwi-GUEST\",\"psk\":\"\",\"data\":{}}",
|
||||
#[derive(Debug)]
|
||||
pub struct Wifi {
|
||||
pub controller: WifiController<'static>,
|
||||
pub credentials: WifiCredentials,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum WifiError {
|
||||
Store(esp_nvs::error::Error),
|
||||
NoCredentialsStored,
|
||||
}
|
||||
|
||||
impl Error for WifiError {}
|
||||
|
||||
impl Display for WifiError {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
match self {
|
||||
WifiError::Store(e) => e.fmt(f),
|
||||
WifiError::NoCredentialsStored => write!(f, "No WiFi stored in flash"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<esp_nvs::error::Error> for WifiError {
|
||||
fn from(error: esp_nvs::error::Error) -> WifiError {
|
||||
WifiError::Store(error)
|
||||
}
|
||||
}
|
||||
|
||||
impl Wifi {
|
||||
pub fn new(
|
||||
wifi: esp_hal::peripherals::WIFI<'static>,
|
||||
credentials: WifiCredentials
|
||||
) {
|
||||
log::error!("Failed to store Wokwi WiFi config in NVS: {e:?}");
|
||||
return;
|
||||
let controller = wifi::new(wifi, Default::default());
|
||||
|
||||
let wifi = Self {
|
||||
controller,
|
||||
credentials
|
||||
}
|
||||
}
|
||||
|
||||
// Preload connection data so init_wm can connect immediately without AP setup.
|
||||
let nvs = esp_hal_wifimanager::Nvs::new_from_nvs(nvs, 0, 0);
|
||||
#[cfg(not(feature = "wokwi"))]
|
||||
pub async fn get_credentials(
|
||||
nvs: Arc<Mutex<Nvs>>,
|
||||
) -> Result<WifiCredentials, WifiError> {
|
||||
nvs.lock()
|
||||
.await
|
||||
.set::<bool>(&WIFI_NAMESPACE, &WIFI_INIT_KEY, true)?;
|
||||
|
||||
let mut wm_settings = esp_hal_wifimanager::WmSettings::default();
|
||||
|
||||
// Wokwi simulation uses a default open network called "Wokwi-GUEST"
|
||||
wm_settings.ssid.clear();
|
||||
_ = core::fmt::write(&mut wm_settings.ssid, format_args!("Wokwi-GUEST"));
|
||||
let wifi_ssid = match option_env!("WIFI_SSID") {
|
||||
Some(ssid) => ssid.to_string(),
|
||||
|
||||
wm_settings.wifi_conn_timeout = 30000;
|
||||
None => match nvs
|
||||
.lock()
|
||||
.await
|
||||
.get::<String>(&WIFI_NAMESPACE, &WIFI_SSID_KEY)
|
||||
{
|
||||
Ok(ssid) => ssid,
|
||||
Err(esp_nvs::error::Error::KeyNotFound) => {
|
||||
log::info!("No ssid found in storage");
|
||||
"".to_string()
|
||||
}
|
||||
err => err?,
|
||||
},
|
||||
};
|
||||
|
||||
// Initialize Wi-Fi connection through WiFi Manager using the pre-seeded NVS data.
|
||||
let wifi_res = esp_hal_wifimanager::init_wm(wm_settings, spawner, Some(&nvs), wifi, None).await;
|
||||
let wifi_pass = match option_env!("WIFI_PASS") {
|
||||
Some(pass) => pass.to_string(),
|
||||
|
||||
log::info!("Wokwi wifi_res: {wifi_res:?}");
|
||||
None => match nvs
|
||||
.lock()
|
||||
.await
|
||||
.get::<String>(&WIFI_NAMESPACE, &WIFI_PASS_KEY)
|
||||
{
|
||||
Ok(pass) => pass,
|
||||
Err(esp_nvs::error::Error::KeyNotFound) => {
|
||||
log::info!("No pass found in storage");
|
||||
"".to_string()
|
||||
}
|
||||
err => err?,
|
||||
},
|
||||
};
|
||||
|
||||
Ok(WifiCredentials { ssid: wifi_ssid, pass: wifi_pass})
|
||||
}
|
||||
|
||||
#[embassy_executor::task]
|
||||
pub async fn wait_for_wifi_credentials(nvs: Arc<Mutex<Nvs>>, _inputs: Inputs, _outputs: Outputs, peripherals: Peripherals) {
|
||||
loop {
|
||||
log::info!("Waiting for new WiFi credentials");
|
||||
let credentials = WIFI_CREDENTIALS.wait().await;
|
||||
|
||||
log::info!("Received new WiFi credentials. Saving...");
|
||||
match nvs
|
||||
.lock()
|
||||
.await
|
||||
.set(&WIFI_NAMESPACE, &WIFI_SSID_KEY, credentials.ssid.as_str())
|
||||
{
|
||||
Ok(_) => (),
|
||||
Err(err) => {
|
||||
log::error!("error storing new ssid: {err}\ncredentials: {credentials:?}.");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
match nvs
|
||||
.lock()
|
||||
.await
|
||||
.set(&WIFI_NAMESPACE, &WIFI_PASS_KEY, credentials.pass.as_str())
|
||||
{
|
||||
Ok(_) => (),
|
||||
Err(err) => {
|
||||
log::error!("error storing new pass: {err}\ncredentials: {credentials:?}.");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
log::info!("Saved new WiFi credentials. Restarting WiFi");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "wokwi")]
|
||||
pub async fn setup(
|
||||
wifi: esp_hal::peripherals::WIFI<'static>,
|
||||
nvs: Arc<Mutex<Nvs>>,
|
||||
spawner: &Spawner,
|
||||
) {
|
||||
log::info!("Wokwi mode active: pre-seeding WiFi Manager with Wokwi credentials");
|
||||
|
||||
const WIFIMANAGER_NAMESPACE: Key = Key::from_str("wifimanager");
|
||||
const WIFIMANAGER_NVS_KEY: Key = Key::from_str("WIFI_SETUP");
|
||||
|
||||
if let Err(e) = nvs.lock().await.set(
|
||||
&WIFIMANAGER_NAMESPACE,
|
||||
&WIFIMANAGER_NVS_KEY,
|
||||
"{\"ssid\":\"Wokwi-GUEST\",\"psk\":\"\",\"data\":{}}",
|
||||
) {
|
||||
log::error!("Failed to store Wokwi WiFi config in NVS: {e:?}");
|
||||
return;
|
||||
}
|
||||
|
||||
// Preload connection data so init_wm can connect immediately without AP setup.
|
||||
let nvs = esp_hal_wifimanager::Nvs::new_from_nvs(nvs, 0, 0);
|
||||
|
||||
let mut wm_settings = esp_hal_wifimanager::WmSettings::default();
|
||||
|
||||
// Wokwi simulation uses a default open network called "Wokwi-GUEST"
|
||||
wm_settings.ssid.clear();
|
||||
_ = core::fmt::write(&mut wm_settings.ssid, format_args!("Wokwi-GUEST"));
|
||||
|
||||
wm_settings.wifi_conn_timeout = 30000;
|
||||
|
||||
// Initialize Wi-Fi connection through WiFi Manager using the pre-seeded NVS data.
|
||||
let wifi_res =
|
||||
esp_hal_wifimanager::init_wm(wm_settings, spawner, Some(&nvs), wifi, None).await;
|
||||
|
||||
log::info!("Wokwi wifi_res: {wifi_res:?}");
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
pub mod storage;
|
||||
|
||||
use crate::navigation::navigation::Mutex;
|
||||
use crate::Mutex;
|
||||
use crate::peripherals::storage::store::Store;
|
||||
|
||||
use esp_hal::rtc_cntl::Rtc;
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
use core::error::Error;
|
||||
use core::fmt::Display;
|
||||
|
||||
use crate::navigation::navigation::Mutex;
|
||||
use embedded_storage::nor_flash::NorFlash;
|
||||
use embedded_storage::nor_flash::ReadNorFlash;
|
||||
use esp_storage::{FlashStorage, FlashStorageError};
|
||||
|
||||
use crate::peripherals::storage::MAGIC_REGION;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct FlashStoreError(FlashStorageError);
|
||||
|
||||
impl From<FlashStorageError> for FlashStoreError {
|
||||
fn from(value: FlashStorageError) -> Self {
|
||||
Self(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl Error for FlashStoreError {}
|
||||
|
||||
impl Display for FlashStoreError {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
write!(f, "FlashStoreError:\n{:?}", self.0)
|
||||
}
|
||||
}
|
||||
|
||||
const FLASH_ADDR: u32 = 0x200000;
|
||||
|
||||
const INITIALIZATION_SIZE: usize = 0x1000;
|
||||
const FLASH_INITIALIZE_MAGIC: u32 = 0xde6de6de;
|
||||
|
||||
pub struct FlashStore {
|
||||
pub storage: Mutex<FlashStorage<'static>>,
|
||||
}
|
||||
|
||||
impl FlashStore {
|
||||
pub fn new(flash: esp_hal::peripherals::FLASH<'static>) -> Result<Self, FlashStoreError> {
|
||||
let mut storage = FlashStorage::new(flash);
|
||||
|
||||
let mut magic: [u8; 4] = [0, 0, 0, 0];
|
||||
storage.read(FLASH_ADDR + MAGIC_REGION.offset, &mut magic)?;
|
||||
log::debug!("Magic bytes are {magic:?}");
|
||||
|
||||
if Self::has_magic_bytes(&mut storage)? {
|
||||
log::info!("Skipped flash initialization, magic bytes already present.");
|
||||
} else {
|
||||
log::info!("Initializing flash because no magic bytes found.");
|
||||
Self::initialize_flash(&mut storage)?;
|
||||
}
|
||||
|
||||
Ok(Self {
|
||||
storage: Mutex::new(storage),
|
||||
})
|
||||
}
|
||||
|
||||
pub async fn read(&self, offset: u32, bytes: &mut [u8]) -> Result<(), FlashStoreError> {
|
||||
self.storage.lock().await.read(FLASH_ADDR + offset, bytes)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn write(&self, offset: u32, bytes: &mut [u8]) -> Result<(), FlashStoreError> {
|
||||
log::debug!("Writing {} bytes at offset 0x{offset:08x}", bytes.len());
|
||||
self.storage
|
||||
.lock()
|
||||
.await
|
||||
.write(FLASH_ADDR + offset, bytes)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn write_erase(&self, offset: u32, bytes: &mut [u8]) -> Result<(), FlashStoreError> {
|
||||
log::debug!(
|
||||
"Erasing and Writing {} bytes at offset 0x{offset:08x}",
|
||||
bytes.len()
|
||||
);
|
||||
let mut lock = self.storage.lock().await;
|
||||
let addr = FLASH_ADDR + offset;
|
||||
let to = FLASH_ADDR + offset + bytes.len() as u32;
|
||||
log::debug!("Erasing from 0x{addr:x} to 0x{to:x}");
|
||||
//lock.erase(addr, to)?;
|
||||
|
||||
log::debug!("Writing bytes...");
|
||||
lock.write(addr, bytes)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn has_magic_bytes(storage: &mut FlashStorage) -> Result<bool, FlashStoreError> {
|
||||
let mut magic: [u8; 4] = [0, 0, 0, 0];
|
||||
storage.read(FLASH_ADDR + MAGIC_REGION.offset, &mut magic)?;
|
||||
log::debug!("Magic bytes are {magic:?}");
|
||||
|
||||
Ok(u32::from_ne_bytes(magic) == FLASH_INITIALIZE_MAGIC)
|
||||
}
|
||||
|
||||
pub fn initialize_flash(storage: &mut FlashStorage) -> Result<(), FlashStoreError> {
|
||||
storage.erase(FLASH_ADDR, FLASH_ADDR + INITIALIZATION_SIZE as u32)?;
|
||||
let zeros: [u8; INITIALIZATION_SIZE] = [0; INITIALIZATION_SIZE];
|
||||
storage.write(FLASH_ADDR + MAGIC_REGION.end() as u32, &zeros)?;
|
||||
storage.write(
|
||||
FLASH_ADDR + MAGIC_REGION.offset,
|
||||
&FLASH_INITIALIZE_MAGIC.to_ne_bytes(),
|
||||
)?;
|
||||
|
||||
if Self::has_magic_bytes(storage)? {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(FlashStoreError(FlashStorageError::Other(
|
||||
FLASH_INITIALIZE_MAGIC as i32,
|
||||
)))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
|
||||
+3
-2
@@ -1,9 +1,10 @@
|
||||
[wokwi]
|
||||
version = 1
|
||||
gdbServerPort = 3333
|
||||
elf = "target/xtensa-esp32s3-none-elf/debug/creaturedex"
|
||||
firmware = "target/xtensa-esp32s3-none-elf/debug/creaturedex"
|
||||
elf = "target/xtensa-esp32s3-none-elf/release/creaturedex"
|
||||
firmware = "target/xtensa-esp32s3-none-elf/release/creaturedex"
|
||||
|
||||
[[chip]]
|
||||
name = 'ch1115'
|
||||
binary = 'wokwi/ch1115.chip.wasm'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user