SHA-256 hash verification of flash slots, pico_hash_binary, flash:: namespace, ring_buffer iterator, non-destructive log
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user