SHA-256 hash verification of flash slots, pico_hash_binary, flash:: namespace, ring_buffer iterator, non-destructive log

This commit is contained in:
Ian Gulliver
2026-04-12 23:47:00 +09:00
parent cc37b711a4
commit 23587c41e2
7 changed files with 210 additions and 64 deletions

View File

@@ -37,15 +37,3 @@ inline void dlog_if_slow(std::string_view label, uint32_t threshold_us, std::fun
dlogf("%.*s %luus", static_cast<int>(label.size()), label.data(), static_cast<unsigned long>(elapsed));
}
inline std::vector<log_entry> dlog_drain() {
std::vector<log_entry> result;
uint16_t n = g_debug_log.used();
result.reserve(n);
for (uint16_t i = 0; i < n; i++) {
log_entry e;
g_debug_log.peek(std::span{&e, 1});
result.push_back(std::move(e));
g_debug_log.consume(1);
}
return result;
}