esp32

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: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyLen = 32
)

Variables

View Source
var (
	ReadDisableFuseName  = "efuse_rd_disable"
	WriteDisableFuseName = "efuse_wr_disable"
	MACAddressFuseName   = "WIFI_MAC_Address"
)
View Source
var (
	FlashSizeToId = map[string]int{

		"8m":   1,
		"16m":  2,
		"32m":  3,
		"64m":  4,
		"128m": 5,
	}

	FlashSizes = map[int]int{
		0: 1048576,
		1: 2097152,
		2: 4194304,
		3: 8388608,
		4: 16777216,
	}
)

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func ESP32EncryptImageData

func ESP32EncryptImageData(inData, key []byte, flashAddress uint32, flashCryptConf uint) ([]byte, error)

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func NewFakeFuseController

func NewFakeFuseController() rom_client.RegReaderWriter

func ProgramFuses

func ProgramFuses(rrw rom_client.RegReaderWriter) error

func ReadFuses

func ReadFuses(rrw rom_client.RegReaderWriter) ([]*FuseBlock, []*Fuse, map[string]*Fuse, error)

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

Types

type Fuse

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

func (*Fuse) BitLen

func (f *Fuse) BitLen() int

func (*Fuse) HasDiffs

func (f *Fuse) HasDiffs() bool

func (*Fuse) IsKey

func (f *Fuse) IsKey() bool

func (*Fuse) IsReadable

func (f *Fuse) IsReadable() bool

func (*Fuse) IsWritable

func (f *Fuse) IsWritable() bool

func (*Fuse) KeyString

func (f *Fuse) KeyString() string

func (*Fuse) MACAddressString

func (f *Fuse) MACAddressString() string

c4 05 dd 9c b6 24 0a -> 24:0a:c4:05:dd:9c

func (*Fuse) Name

func (f *Fuse) Name() string

func (*Fuse) SetKeyValue

func (f *Fuse) SetKeyValue(kb []byte) error

func (*Fuse) SetReadDisable

func (f *Fuse) SetReadDisable() error

func (*Fuse) SetValue

func (f *Fuse) SetValue(v *big.Int) error

func (*Fuse) SetWriteDisable

func (f *Fuse) SetWriteDisable() error

func (*Fuse) String

func (f *Fuse) String() string

func (*Fuse) Value

func (f *Fuse) Value(withDiffs bool) (*big.Int, error)

type FuseBlock

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

func (*FuseBlock) HasDiffs

func (b *FuseBlock) HasDiffs() bool

func (*FuseBlock) Read

func (b *FuseBlock) Read() error

func (*FuseBlock) String

func (b *FuseBlock) String() string

func (*FuseBlock) WriteDiffs

func (b *FuseBlock) WriteDiffs() error

Jump to

Keyboard shortcuts

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