Boot reason via watchdog scratch register, reboot/picoboot CLI commands, enum msgpack support
This commit is contained in:
@@ -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{}
|
||||
|
||||
Reference in New Issue
Block a user