Rename BOOTSEL to PICOBOOT, disable mass storage in bootsel mode
This commit is contained in:
@@ -78,12 +78,12 @@ func (c *Client) roundTrip(req any) (any, error) {
|
||||
return c.receive(id)
|
||||
}
|
||||
|
||||
func (c *Client) BOOTSEL() error {
|
||||
resp, err := c.roundTrip(&RequestBOOTSEL{})
|
||||
func (c *Client) PICOBOOT() error {
|
||||
resp, err := c.roundTrip(&RequestPICOBOOT{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, ok := resp.(*ResponseBOOTSEL); !ok {
|
||||
if _, ok := resp.(*ResponsePICOBOOT); !ok {
|
||||
return fmt.Errorf("unexpected response: %T", resp)
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -2,8 +2,8 @@ package client
|
||||
|
||||
import "github.com/theater/picomap/lib/msgpack"
|
||||
|
||||
type ResponseBOOTSEL struct{}
|
||||
type RequestBOOTSEL struct{}
|
||||
type ResponsePICOBOOT struct{}
|
||||
type RequestPICOBOOT struct{}
|
||||
|
||||
type DeviceError struct {
|
||||
Code uint32
|
||||
@@ -22,7 +22,7 @@ type Envelope struct {
|
||||
|
||||
func init() {
|
||||
msgpack.RegisterExt(0, (*Envelope)(nil))
|
||||
msgpack.RegisterExt(1, (*ResponseBOOTSEL)(nil))
|
||||
msgpack.RegisterExt(2, (*RequestBOOTSEL)(nil))
|
||||
msgpack.RegisterExt(1, (*ResponsePICOBOOT)(nil))
|
||||
msgpack.RegisterExt(2, (*RequestPICOBOOT)(nil))
|
||||
msgpack.RegisterExt(3, (*DeviceError)(nil))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user