Documentation ¶
Index ¶
- Constants
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func ESP32EncryptImageData(inData, key []byte, flashAddress uint32, flashCryptConf uint) ([]byte, error)
- func MustAsset(name string) []byte
- func NewFakeFuseController() rom_client.RegReaderWriter
- func ProgramFuses(rrw rom_client.RegReaderWriter) error
- func ReadFuses(rrw rom_client.RegReaderWriter) ([]*FuseBlock, []*Fuse, map[string]*Fuse, error)
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type Fuse
- func (f *Fuse) BitLen() int
- func (f *Fuse) HasDiffs() bool
- func (f *Fuse) IsKey() bool
- func (f *Fuse) IsReadable() bool
- func (f *Fuse) IsWritable() bool
- func (f *Fuse) KeyString() string
- func (f *Fuse) MACAddressString() string
- func (f *Fuse) Name() string
- func (f *Fuse) SetKeyValue(kb []byte) error
- func (f *Fuse) SetReadDisable() error
- func (f *Fuse) SetValue(v *big.Int) error
- func (f *Fuse) SetWriteDisable() error
- func (f *Fuse) String() string
- func (f *Fuse) Value(withDiffs bool) (*big.Int, error)
- type FuseBlock
Constants ¶
const (
KeyLen = 32
)
Variables ¶
var ( ReadDisableFuseName = "efuse_rd_disable" WriteDisableFuseName = "efuse_wr_disable" MACAddressFuseName = "WIFI_MAC_Address" )
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 ¶
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 ¶
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 ¶
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 ESP32EncryptImageData ¶
func MustAsset ¶
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 ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type Fuse ¶
type Fuse struct {
// contains filtered or unexported fields
}
func (*Fuse) IsReadable ¶
func (*Fuse) IsWritable ¶
func (*Fuse) MACAddressString ¶
c4 05 dd 9c b6 24 0a -> 24:0a:c4:05:dd:9c
func (*Fuse) SetKeyValue ¶
func (*Fuse) SetReadDisable ¶
func (*Fuse) SetWriteDisable ¶
type FuseBlock ¶
type FuseBlock struct {
// contains filtered or unexported fields
}