Boot reason via watchdog scratch register, reboot/picoboot CLI commands, enum msgpack support

This commit is contained in:
Ian Gulliver
2026-04-12 08:17:22 +09:00
parent 9b7362c460
commit 6c3e0757f9
8 changed files with 110 additions and 6 deletions

View File

@@ -44,14 +44,20 @@ struct RequestInfo {
auto as_tuple() { return std::tie(); }
};
enum class boot_reason : uint8_t {
cold_boot = 0,
request_reboot = 1,
};
struct ResponseInfo {
static constexpr int8_t ext_id = 5;
std::array<uint8_t, 8> board_id;
std::array<uint8_t, 6> mac;
std::array<uint8_t, 4> ip;
std::string firmware_name;
auto as_tuple() const { return std::tie(board_id, mac, ip, firmware_name); }
auto as_tuple() { return std::tie(board_id, mac, ip, firmware_name); }
boot_reason boot;
auto as_tuple() const { return std::tie(board_id, mac, ip, firmware_name, boot); }
auto as_tuple() { return std::tie(board_id, mac, ip, firmware_name, boot); }
};
struct RequestLog {