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

@@ -6,11 +6,30 @@ type RequestPICOBOOT struct{}
type ResponsePICOBOOT struct{}
type RequestInfo struct{}
type BootReason uint8
const (
BootCold BootReason = 0
BootReboot BootReason = 1
)
func (b BootReason) String() string {
switch b {
case BootCold:
return "cold"
case BootReboot:
return "reboot"
default:
return "unknown"
}
}
type ResponseInfo struct {
BoardID [8]byte
MAC [6]byte
IP [4]byte
FirmwareName string
Boot BootReason
}
type RequestLog struct{}