common

package
v0.0.0-...-2771a78 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2017 License: GPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LimitStr

func LimitStr(b []byte, n int) string

func Reportf

func Reportf(f string, args ...interface{})

Types

type FirmwareBundle

type FirmwareBundle struct {
	FirmwareManifest

	Blobs map[string][]byte
}

func NewZipFirmwareBundle

func NewZipFirmwareBundle(fname string) (*FirmwareBundle, error)

func (*FirmwareBundle) GetPartData

func (fw *FirmwareBundle) GetPartData(name string) ([]byte, error)

type FirmwareManifest

type FirmwareManifest struct {
	Name           string                   `json:"name"`
	Platform       string                   `json:"platform"`
	Description    string                   `json:"description,omitempty"`
	Version        string                   `json:"version"`
	BuildID        string                   `json:"build_id,omitempty"`
	BuildTimestamp string                   `json:"build_timestamp,omitempty"`
	Parts          map[string]*FirmwarePart `json:"parts"`
}

type FirmwarePart

type FirmwarePart struct {
	Name         string `json:"-"`
	Type         string `json:"type,omitempty"`
	Src          string `json:"src,omitempty"`
	Size         uint32 `json:"size,omitempty"`
	Fill         *uint8 `json:"fill,omitempty"`
	ChecksumSHA1 string `json:"cs_sha1,omitempty"`
	// For SPIFFS images.
	FSSize      uint32 `json:"fs_size,omitempty"`
	FSBlockSize uint32 `json:"fs_block_size,omitempty"`
	FSEraseSize uint32 `json:"fs_erase_size,omitempty"`
	FSPageSize  uint32 `json:"fs_page_size,omitempty"`
	// Platform-specific stuff:
	// ESP32, ESP8266
	ESPFlashAddress uint32 `json:"addr,omitempty"`
	ESP32Encrypt    bool   `json:"encrypt,omitempty"`
	// CC3200
	CC3200FileAllocSize uint32 `json:"falloc,omitempty"`
	CC3200FileSignature string `json:"sign,omitempty"`
}

type SLIPReaderWriter

type SLIPReaderWriter struct {
	// contains filtered or unexported fields
}

func NewSLIPReaderWriter

func NewSLIPReaderWriter(rw io.ReadWriter) *SLIPReaderWriter

func (*SLIPReaderWriter) Read

func (srw *SLIPReaderWriter) Read(buf []byte) (int, error)

func (*SLIPReaderWriter) Write

func (srw *SLIPReaderWriter) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL