Documentation
¶
Index ¶
- Constants
- type Conn
- func (c *Conn) Close() (err error)
- func (c *Conn) ExclusiveAccess(ea bool) (err error)
- func (c *Conn) ExitXIP() (err error)
- func (c *Conn) FlashErase(addr uint32, size int) (err error)
- func (c *Conn) GetCommandStatus() (token uint32, done bool, err error)
- func (c *Conn) GetInfo(info []uint32, args ...uint32) (err error)
- func (c *Conn) InterfaceReset() (err error)
- func (c *Conn) Read(p []byte) (n int, err error)
- func (c *Conn) ReadAddr() uint32
- func (c *Conn) Reboot2(rebootType uint32, delay time.Duration, p0, p1 uint32) (err error)
- func (c *Conn) SetReadAddr(addr uint32)
- func (c *Conn) SetWriteAddr(addr uint32)
- func (c *Conn) Token() uint32
- func (c *Conn) Write(p []byte) (n int, err error)
- func (c *Conn) WriteAddr() uint32
- type Error
- type StatusError
Constants ¶
View Source
const ( // Reboot2 types RebootNormal uint32 = 0x0 RebootBootsel uint32 = 0x2 RebootRAMImage uint32 = 0x3 RebootFlashUpdate uint32 = 0x4 RebootPCSP uint32 = 0xd // Optional flags that can be ORed to the type RebootToARM uint32 = 1 << 4 RebootToRISCV uint32 = 1 << 5 )
View Source
const ( InfoSys uint32 = 1 Partition uint32 = 2 UF2TargetPartition uint32 = 3 UF2Status uint32 = 4 )
GetInfo information type (args[0])
View Source
const ( ChipInfo uint32 = 1 << 0 Critical uint32 = 1 << 1 CPUInfo uint32 = 1 << 2 FlashDevInfo uint32 = 1 << 3 BootRandom uint32 = 1 << 4 BootInfo uint32 = 1 << 6 )
GetInfo InfoSys flags (args[1])
View Source
const ( PTInfo uint32 = 1 << 0 PartitionLocationAndFlags uint32 = 1 << 4 PartitionID uint32 = 1 << 5 PartitionFamilyIDs uint32 = 1 << 6 PartitionName uint32 = 1 << 7 SinglePartition uint32 = 1 << 15 )
GetInfo Partition flgs (args[1])
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func Connect ¶
Connect connects to the USB device in PICOBOOT mode. You can connect to the concrete device on the USB bus by providing BUS:DEV string where both BUS and DEV are decimal unsigned integers. If busAddr is empty connect will try to find a PICOBOOT device on the bus (it will return an error if there are more than one such devices).
func (*Conn) ExclusiveAccess ¶
func (*Conn) GetCommandStatus ¶
func (*Conn) InterfaceReset ¶
func (*Conn) Read ¶
Read performs n-byte PICOBOOT read transaction (if err == nil then n is always equal to len(p)) starting just after the last read address (see also SetReadAddr).
func (*Conn) SetReadAddr ¶
func (*Conn) SetWriteAddr ¶
type StatusError ¶
func (*StatusError) Error ¶
func (e *StatusError) Error() string
Click to show internal directories.
Click to hide internal directories.