Documentation
¶
Index ¶
- Variables
- type ChipDescription
- type ChipType
- type CountingWriter
- type ESP32ROM
- func (e *ESP32ROM) AttachSpiFlash() (err error)
- func (e *ESP32ROM) ChangeBaudrate(newBaudrate uint32) error
- func (e *ESP32ROM) CheckExecuteCommand(command *common.Command, timeout time.Duration, retries int) (response *common.Response, err error)
- func (e *ESP32ROM) Connect(maxRetries uint) (err error)
- func (e *ESP32ROM) ExecuteCommand(command *common.Command, timeout time.Duration) (*common.Response, error)
- func (e *ESP32ROM) GetChipDescription() (*ChipDescription, error)
- func (e *ESP32ROM) GetChipMAC() (string, error)
- func (e *ESP32ROM) GetFeatures() (Features, error)
- func (e *ESP32ROM) ReadEfuse(efuseIndex uint) ([4]byte, error)
- func (e *ESP32ROM) ReadFlash(offset uint32, size uint32) ([]byte, error)
- func (e *ESP32ROM) ReadPartitionList() (PartitionList, error)
- func (e *ESP32ROM) ReadRegister(register uint) ([4]byte, error)
- func (e *ESP32ROM) Reset() (err error)
- func (e *ESP32ROM) Sync() (err error)
- func (e *ESP32ROM) WriteFlash(offset uint32, data []byte, useCompression bool) (err error)
- type Feature
- type Features
- type Partition
- type PartitionBinaryReader
- type PartitionBinaryWriter
- type PartitionCSVReader
- type PartitionCSVWriter
- type PartitionList
- type PartitionSubType
- type PartitionType
Constants ¶
This section is empty.
Variables ¶
var PartitionSubTypeToString = map[PartitionSubType]string{ PartitionSubTypeFactory: "factory", PartitionSubTypeOTA0: "ota0", PartitionSubTypeOTA1: "ota1", PartitionSubTypeOTA2: "ota2", PartitionSubTypeOTA3: "ota3", PartitionSubTypeOTA4: "ota4", PartitionSubTypeOTA5: "ota5", PartitionSubTypeOTA6: "ota6", PartitionSubTypeOTA7: "ota7", PartitionSubTypeOTA8: "ota8", PartitionSubTypeOTA9: "ota9", PartitionSubTypeOTA10: "ota10", PartitionSubTypeOTA11: "ota11", PartitionSubTypeOTA12: "ota12", PartitionSubTypeOTA13: "ota13", PartitionSubTypeOTA14: "ota14", PartitionSubTypeOTA15: "ota15", PartitionSubTypeTest: "test", PartitionSubTypePHY: "phy", PartitionSubTypeNVS: "nvs", PartitionSubTypeCoredump: "coredump", PartitionSubTypeNvsKeys: "nvs_keys", PartitionSubTypeEfuse: "efuse", PartitionSubTypeEspHttpd: "esphttpd", PartitionSubTypeFAT: "fat", PartitionSubTypeSpiffs: "spiffs", }
Functions ¶
This section is empty.
Types ¶
type ChipDescription ¶
func (*ChipDescription) String ¶
func (c *ChipDescription) String() string
type CountingWriter ¶
type CountingWriter struct {
// contains filtered or unexported fields
}
type ESP32ROM ¶
type ESP32ROM struct { SerialPort *serial.Port SlipReadWriter *common.SlipReadWriter // contains filtered or unexported fields }
func (*ESP32ROM) AttachSpiFlash ¶
func (*ESP32ROM) ChangeBaudrate ¶
func (*ESP32ROM) CheckExecuteCommand ¶
func (*ESP32ROM) ExecuteCommand ¶
func (*ESP32ROM) GetChipDescription ¶
func (e *ESP32ROM) GetChipDescription() (*ChipDescription, error)
func (*ESP32ROM) GetChipMAC ¶
func (*ESP32ROM) GetFeatures ¶
func (*ESP32ROM) ReadPartitionList ¶
func (e *ESP32ROM) ReadPartitionList() (PartitionList, error)
type Partition ¶
type Partition struct { Name string `json:"name"` Type PartitionType `json:"type"` SubType PartitionSubType `json:"subtype"` Offset int `json:"offset'` Size int `json:"size"` }
type PartitionBinaryReader ¶
type PartitionBinaryReader struct {
// contains filtered or unexported fields
}
func NewPartitionBinaryReader ¶
func NewPartitionBinaryReader(reader io.Reader) *PartitionBinaryReader
func (*PartitionBinaryReader) Read ¶
func (p *PartitionBinaryReader) Read() (partition *Partition, err error)
func (*PartitionBinaryReader) ReadAll ¶
func (p *PartitionBinaryReader) ReadAll() (partitionList PartitionList, err error)
type PartitionBinaryWriter ¶
type PartitionBinaryWriter struct {
// contains filtered or unexported fields
}
func NewPartitionBinaryWriter ¶
func NewPartitionBinaryWriter(writer io.Writer) *PartitionBinaryWriter
func (*PartitionBinaryWriter) WriteAll ¶
func (p *PartitionBinaryWriter) WriteAll(partitionList PartitionList) error
type PartitionCSVReader ¶
type PartitionCSVReader struct {
// contains filtered or unexported fields
}
PartitionCSVReader reads a CSV file with partition entries
func NewPartitionCSVReader ¶
func NewPartitionCSVReader(reader io.Reader) *PartitionCSVReader
NewPartitionCSVReader initializes a PartitionCSVReader
func (*PartitionCSVReader) Read ¶
func (p *PartitionCSVReader) Read() (*Partition, error)
Read tries to read the next partition
func (*PartitionCSVReader) ReadAll ¶
func (p *PartitionCSVReader) ReadAll() (partitionList PartitionList, err error)
type PartitionCSVWriter ¶
type PartitionCSVWriter struct {
// contains filtered or unexported fields
}
func NewPartitionCSVWriter ¶
func NewPartitionCSVWriter(writer io.Writer) *PartitionCSVWriter
func (*PartitionCSVWriter) Write ¶
func (p *PartitionCSVWriter) Write(partition *Partition) error
func (*PartitionCSVWriter) WriteAll ¶
func (p *PartitionCSVWriter) WriteAll(partitionList PartitionList) error
type PartitionList ¶
type PartitionList []Partition
func (PartitionList) String ¶
func (p PartitionList) String() string
type PartitionSubType ¶
type PartitionSubType int
PartitionSubType as defined in esp_partition_subtype_t
const ( // PartitionSubTypeFactory Factory application partition PartitionSubTypeFactory PartitionSubType = iota // PartitionSubTypeOTA0 OTA partition 0 PartitionSubTypeOTA0 // PartitionSubTypeOTA1 OTA partition 1 PartitionSubTypeOTA1 // PartitionSubTypeOTA2 OTA partition 2 PartitionSubTypeOTA2 // PartitionSubTypeOTA3 OTA partition 3 PartitionSubTypeOTA3 // PartitionSubTypeOTA4 OTA partition 4 PartitionSubTypeOTA4 // PartitionSubTypeOTA5 OTA partition 5 PartitionSubTypeOTA5 // PartitionSubTypeOTA6 OTA partition 6 PartitionSubTypeOTA6 // PartitionSubTypeOTA7 OTA partition 7 PartitionSubTypeOTA7 // PartitionSubTypeOTA8 OTA partition 8 PartitionSubTypeOTA8 // PartitionSubTypeOTA9 OTA partition 9 PartitionSubTypeOTA9 // PartitionSubTypeOTA10 OTA partition 10 PartitionSubTypeOTA10 // PartitionSubTypeOTA11 OTA partition 11 PartitionSubTypeOTA11 // PartitionSubTypeOTA12 OTA partition 12 PartitionSubTypeOTA12 // PartitionSubTypeOTA13 OTA partition 13 PartitionSubTypeOTA13 // PartitionSubTypeOTA14 OTA partition 14 PartitionSubTypeOTA14 // PartitionSubTypeOTA15 OTA partition 15 PartitionSubTypeOTA15 // PartitionSubTypeTest Test application partition PartitionSubTypeTest // PartitionSubTypePHY PHY init data partition PartitionSubTypePHY // PartitionSubTypeNVS NVS partition PartitionSubTypeNVS // PartitionSubTypeCoredump COREDUMP partition PartitionSubTypeCoredump // PartitionSubTypeNvsKeys Partition for NVS keys PartitionSubTypeNvsKeys // PartitionSubTypeEfuse Partition for emulate eFuse bits PartitionSubTypeEfuse // PartitionSubTypeEspHttpd ESPHTTPD partition PartitionSubTypeEspHttpd // PartitionSubTypeFAT FAT partition PartitionSubTypeFAT // PartitionSubTypeSpiffs SPIFFS partition PartitionSubTypeSpiffs )
func ParsePartitionSubType ¶
func ParsePartitionSubType(value string) (PartitionSubType, error)
ParsePartitionSubType parses a string into a PartitionSubType
func PartitionSubTypeFromUint8 ¶
func PartitionSubTypeFromUint8(value uint8) PartitionSubType
We don't need to know the partition type here, because no sub types (currently) overlap
func (PartitionSubType) MarshalJSON ¶
func (p PartitionSubType) MarshalJSON() ([]byte, error)
func (PartitionSubType) String ¶
func (p PartitionSubType) String() string
String returns a string representation of the given PartitionSubType
func (PartitionSubType) ToUint8 ¶
func (p PartitionSubType) ToUint8() uint8
ToUint8 returns a uint8 representation as defined in the ESP-IDF
func (PartitionSubType) UnmarshalJSON ¶
func (p PartitionSubType) UnmarshalJSON(data []byte) error
type PartitionType ¶
type PartitionType int
const ( // PartitionTypeApp Application partition type PartitionTypeApp PartitionType = iota // PartitionTypeData Data partition type PartitionTypeData )
func ParsePartitionType ¶
func ParsePartitionType(value string) (PartitionType, error)
ParsePartitionType parses a string into a PartitionType
func PartitionTypeFromUint8 ¶
func PartitionTypeFromUint8(value uint8) PartitionType
func (PartitionType) MarshalJSON ¶
func (p PartitionType) MarshalJSON() ([]byte, error)
func (PartitionType) String ¶
func (p PartitionType) String() string
String returns a string representation of the given PartitionType
func (PartitionType) ToUint8 ¶
func (p PartitionType) ToUint8() uint8
ToUint8 returns a uint8 representation as defined in the ESP-IDF
func (PartitionType) UnmarshalJSON ¶
func (p PartitionType) UnmarshalJSON(data []byte) error