esp32

package
v0.0.0-...-b44964e Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0, Apache-2.0 Imports: 17 Imported by: 0

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

View Source
const (
	KeyEncodingSchemeNone   KeyEncodingScheme = 0
	KeyEncodingScheme34                       = 1
	KeyEncodingSchemeRepeat                   = 2
)
View Source
const (
	KeyLen       = 32
	KeyLen34     = 24
	KeyLenRepeat = 16
)
View Source
const (
	ESPPartitionMagic uint16 = 0x50aa
)

Variables

View Source
var (
	ReadDisableFuseName       = "efuse_rd_disable"
	WriteDisableFuseName      = "efuse_wr_disable"
	MACAddressFuseName        = "WIFI_MAC_Address"
	KeyEncodingSchemeFuseName = "coding_scheme"
	FlashCryptCntFuseName     = "flash_crypt_cnt"
	AbstractDone0FuseName     = "abstract_done_0"
)
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, flashCryptConf uint32) ([]byte, error)

func GetChipDescr

func GetChipDescr(rrw esp.RegReaderWriter) (string, 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() esp.RegReaderWriter

func ProgramFuses

func ProgramFuses(rrw esp.RegReaderWriter) error

func ReadFuses

func ReadFuses(rrw esp.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 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 ESPPartitionPos struct {
	Offset uint32
	Size   uint32
}

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(kcs KeyEncodingScheme) 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, kcs KeyEncodingScheme) 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

type KeyEncodingScheme

type KeyEncodingScheme uint8

func GetKeyEncodingScheme

func GetKeyEncodingScheme(fusesByName map[string]*Fuse) KeyEncodingScheme

func (KeyEncodingScheme) String

func (kcs KeyEncodingScheme) String() string

Jump to

Keyboard shortcuts

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