initial import from picomap firmware

This commit is contained in:
Ian Gulliver
2026-04-19 17:28:44 -07:00
commit 92d2ce8181
37 changed files with 3914 additions and 0 deletions

20
include/flash.h Normal file
View File

@@ -0,0 +1,20 @@
#pragma once
#include <cstdint>
#include <tuple>
namespace flash {
constexpr uint32_t FLASH_BASE = 0x10000000;
constexpr uint32_t FLASH_SIZE = 2 * 1024 * 1024;
struct slot {
bool valid;
uint32_t version;
bool hash_ok;
auto as_tuple() const { return std::tie(valid, version, hash_ok); }
auto as_tuple() { return std::tie(valid, version, hash_ok); }
};
slot scan(uint32_t flash_offset);
}