Documentation ¶
Overview ¶
Code generated for package esp32 by go-bindata DO NOT EDIT. (@generated) sources: stub/stub.json
Copyright (c) 2014-2019 Cesanta Software Limited All rights reserved
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2014-2019 Cesanta Software Limited All rights reserved
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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, flashCryptConf uint32) ([]byte, error)
- func GetChipDescr(rrw esp.RegReaderWriter) (string, error)
- func MustAsset(name string) []byte
- func NewFakeFuseController() esp.RegReaderWriter
- func ProgramFuses(rrw esp.RegReaderWriter) error
- func ReadFuses(rrw esp.RegReaderWriter) ([]*FuseBlock, []*Fuse, map[string]*Fuse, error)
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type ESPPartitionInfo
- type ESPPartitionPos
- 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(kcs KeyEncodingScheme) string
- func (f *Fuse) MACAddressString() string
- func (f *Fuse) Name() string
- func (f *Fuse) SetKeyValue(kb []byte, kcs KeyEncodingScheme) 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
- type KeyEncodingScheme
Constants ¶
const ( KeyEncodingSchemeNone KeyEncodingScheme = 0 KeyEncodingScheme34 = 1 KeyEncodingSchemeRepeat = 2 )
const ( KeyLen = 32 KeyLen34 = 24 KeyLenRepeat = 16 )
const (
ESPPartitionMagic uint16 = 0x50aa
)
Variables ¶
var ( ReadDisableFuseName = "efuse_rd_disable" WriteDisableFuseName = "efuse_wr_disable" MACAddressFuseName = "WIFI_MAC_Address" KeyEncodingSchemeFuseName = "coding_scheme" FlashCryptCntFuseName = "flash_crypt_cnt" AbstractDone0FuseName = "abstract_done_0" )
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 GetChipDescr ¶
func GetChipDescr(rrw esp.RegReaderWriter) (string, error)
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() esp.RegReaderWriter
func ProgramFuses ¶
func ProgramFuses(rrw esp.RegReaderWriter) error
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type ESPPartitionInfo ¶
type ESPPartitionInfo struct { Magic uint16 Type uint8 Subtype uint8 Pos ESPPartitionPos Label [16]byte Flags uint32 }
func GetPartitionInfo ¶
func GetPartitionInfo(fw *fwbundle.FirmwareBundle, name string) (*ESPPartitionInfo, error)
type ESPPartitionPos ¶
type Fuse ¶
type Fuse struct {
// contains filtered or unexported fields
}
func (*Fuse) IsReadable ¶
func (*Fuse) IsWritable ¶
func (*Fuse) KeyString ¶
func (f *Fuse) KeyString(kcs KeyEncodingScheme) string
func (*Fuse) MACAddressString ¶
c4 05 dd 9c b6 24 0a -> 24:0a:c4:05:dd:9c
func (*Fuse) SetKeyValue ¶
func (f *Fuse) SetKeyValue(kb []byte, kcs KeyEncodingScheme) error
func (*Fuse) SetReadDisable ¶
func (*Fuse) SetWriteDisable ¶
type FuseBlock ¶
type FuseBlock struct {
// contains filtered or unexported fields
}
func (*FuseBlock) WriteDiffs ¶
type KeyEncodingScheme ¶
type KeyEncodingScheme uint8
func GetKeyEncodingScheme ¶
func GetKeyEncodingScheme(fusesByName map[string]*Fuse) KeyEncodingScheme
func (KeyEncodingScheme) String ¶
func (kcs KeyEncodingScheme) String() string