code

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRamBlock = uint64(0x1800) //Maximum block sized for RAM and Flash writes, respectively.
	WriteSize   = uint64(0x400)

	ByteImageMagic    = byte(0xE9) //First byte of the application image
	ByteChecksumMagic = byte(0xEF) //Initial state for the checksum routine
)
View Source
const (
	DirectionTextRequest  = "Request"
	DirectionTextResponse = "Response"
)
View Source
const (
	ErrTextReceivedMessageIsInvalid     = "Received message is invalid"
	ErrTextFailedToActOnReceivedMessage = "Failed to act on received message"
	ErrTextInvalidCRCInMessage          = "Invalid CRC in message"

	ErrTextFlashWriteError      = "Flash write error"
	ErrTextFlashReadError       = "Flash read error"
	ErrTextFlashReadLengthError = "Flash read length error"

	ErrTextDeflateError = "Deflate error"
)
View Source
const (
	EspTextESP32D0WDQ6 = "ESP32 D0-WD Q6"
	EspTextESP32D0WDQ5 = "ESP32 D0-WD Q5"
	EspTextESP32D2WDQ5 = "ESP32 D2-WD Q5"
	EspTextESP32PICOD4 = "ESP32 PICO D4"
)
View Source
const (
	FeatureTextWiFi      = "WiFi"
	FeatureTextBluetooth = "Bluetooth"

	FeatureTextSingleCore = "Single Core"
	FeatureTextDualCore   = "Dual Core"

	FeatureTextClock80MHz  = "Clock 80MHz"
	FeatureTextClock160MHz = "Clock 160MHz"
	FeatureTextClock240MHz = "Clock 240MHz"
	FeatureTextClock320MHz = "Clock 320MHz"

	FeatureTextEmbeddedFlash         = "Embedded Flash"
	FeatureTextVRefCalibration       = "VRef calibration"
	FeatureTextBLK3PartiallyReserved = "BLK3 partially reserved"

	FeatureTextCodingSchemeNone    = "Coding Scheme None"
	FeatureTextCodingScheme34      = "Coding Scheme 3/4"
	FeatureTextCodingSchemeRepeat  = "Coding Scheme Repeat"
	FeatureTextCodingSchemeInvalid = "Coding Scheme Invalid"
)
View Source
const (
	OpTextSync           = "Sync"
	OpTextChangeBaudRate = "Change BaudRate"
	OpTextSecurityInfo   = "Security Info"
	OpTextWriteRegister  = "Write Register"
	OpTextReadRegister   = "Read Register"

	OpTextFlashBegin        = "Flash Begin"
	OpTextFlashReadSlow     = "Flash Read Slow"
	OpTextFlashData         = "Flash Data"
	OpTextFlashEnd          = "Flash End"
	OpTextFlashDeflateBegin = "Flash Deflate Begin"
	OpTextFlashDeflateData  = "Flash Deflate Data"
	OpTextFlashDeflateEnd   = "Flash Deflate End"
	OpTextMemoryBegin       = "Memory Begin"
	OpTextMemoryEnd         = "Memory End"
	OpTextMemoryData        = "Memory Data"
	OpTextFlashEncryptData  = "Flash Encrypt Data"

	OpTextSpiSetParams   = "Spi Set Params"
	OpTextSpiAttachFlash = "Spi Attach Flash"
	OpTextSpiFlashMD5    = "Spi Flash MD5"

	OpTextEraseFlash  = "Erase Flash"
	OpTextEraseRegion = "Erase Region"
)
View Source
const (
	SizeText256KbJ1 = "256Kb J1"
	SizeText512KbJ1 = "512Kb J1"
	SizeText1MbJ1   = "1Mb J1"
	SizeText2MbJ1   = "2Mb J1"
	SizeText4MbJ1   = "4Mb J1"
	SizeText8MbJ1   = "8Mb J1"
	SizeText16MbJ1  = "16Mb J1"
	SizeText32MbJ1  = "32Mb J1"
	SizeText64MbJ1  = "64Mb J1"
	SizeText128MbJ1 = "128Mb J1"
	SizeText256MbJ1 = "256Mb J1"

	SizeText64MbJ2  = "64Mb J2"
	SizeText128MbJ2 = "128Mb J2"
	SizeText256MbJ2 = "256Mb J2"

	SizeText256KbJ3 = "256Kb J3"
	SizeText512KbJ3 = "512Kb J3"
	SizeText1MbJ3   = "1Mb J3"
	SizeText2MbJ3   = "2Mb J3"
	SizeText4MbJ3   = "4Mb J3"
	SizeText8MbJ3   = "8Mb J3"
	SizeText16MbJ3  = "16Mb J3"
	SizeText32MbJ3  = "32Mb J3"
	SizeText64MbJ3  = "64Mb J3"
)
View Source
const (
	SlipTextHeader     = "Header"
	SlipTextEscapeChar = "Escape Char"
)
View Source
const (
	StateTextWaitingHeader  = "Waiting Header"
	StateTextReadingContent = "Reading Content"
	StateTextInEscape       = "In Escape"
)

Variables

Functions

This section is empty.

Types

type DirectionType

type DirectionType byte
const (
	DirectionRequest  DirectionType = 0 //0x00
	DirectionResponse DirectionType = 1 //0x01
)

func (DirectionType) String

func (obj DirectionType) String() string

type ErrType

type ErrType byte
const (
	ErrReceivedMessageIsInvalid     ErrType = 5 //0x05
	ErrFailedToActOnReceivedMessage ErrType = 6 //0x06
	ErrInvalidCRCInMessage          ErrType = 7 //0x07

	ErrFlashWriteError      ErrType = 8  //0x08
	ErrFlashReadError       ErrType = 9  //0x09
	ErrFlashReadLengthError ErrType = 10 //0x0a

	ErrDeflateError ErrType = 11 //0x0b
)

func (ErrType) String

func (obj ErrType) String() string

type EspType

type EspType byte
const (
	EspESP32D0WDQ6 EspType = 0 //0x00
	EspESP32D0WDQ5 EspType = 1 //0x01
	EspESP32D2WDQ5 EspType = 2 //0x02
	EspESP32PICOD4 EspType = 5 //0x05
)

func (EspType) String

func (obj EspType) String() string

type FeatureType

type FeatureType byte
const (
	FeatureWiFi      FeatureType = 1 //0x01
	FeatureBluetooth FeatureType = 2 //0x02

	FeatureSingleCore FeatureType = 31 //0x1f
	FeatureDualCore   FeatureType = 32 //0x20

	FeatureClock80MHz  FeatureType = 51 //0x33
	FeatureClock160MHz FeatureType = 52 //0x34
	FeatureClock240MHz FeatureType = 53 //0x35
	FeatureClock320MHz FeatureType = 54 //0x36

	FeatureEmbeddedFlash         FeatureType = 101 //0x65
	FeatureVRefCalibration       FeatureType = 102 //0x66
	FeatureBLK3PartiallyReserved FeatureType = 103 //0x67

	FeatureCodingSchemeNone    FeatureType = 151 //0x97
	FeatureCodingScheme34      FeatureType = 152 //0x98
	FeatureCodingSchemeRepeat  FeatureType = 153 //0x99
	FeatureCodingSchemeInvalid FeatureType = 154 //0x9a
)

func (FeatureType) String

func (obj FeatureType) String() string

type OpType

type OpType byte
const (
	OpSync           OpType = 8  //0x08
	OpChangeBaudRate OpType = 15 //0x0f
	OpSecurityInfo   OpType = 20 //0x14
	OpWriteRegister  OpType = 9  //0x09
	OpReadRegister   OpType = 10 //0x0a

	OpFlashBegin        OpType = 2   //0x02
	OpFlashReadSlow     OpType = 14  //0x0e
	OpFlashData         OpType = 3   //0x03
	OpFlashEnd          OpType = 4   //0x04
	OpFlashDeflateBegin OpType = 16  //0x10
	OpFlashDeflateData  OpType = 17  //0x11
	OpFlashDeflateEnd   OpType = 18  //0x12
	OpMemoryBegin       OpType = 5   //0x05
	OpMemoryEnd         OpType = 6   //0x06
	OpMemoryData        OpType = 7   //0x07
	OpFlashEncryptData  OpType = 212 //0xd4

	OpSpiSetParams   OpType = 11 //0x0b
	OpSpiAttachFlash OpType = 13 //0x0d
	OpSpiFlashMD5    OpType = 19 //0x13

	OpEraseFlash  OpType = 208 //0xd0
	OpEraseRegion OpType = 209 //0xd1

)

func (OpType) String

func (obj OpType) String() string

type SizeType

type SizeType byte
const (
	Size256KbJ1 SizeType = 18 //0x12
	Size512KbJ1 SizeType = 19 //0x13
	Size1MbJ1   SizeType = 20 //0x14
	Size2MbJ1   SizeType = 21 //0x15
	Size4MbJ1   SizeType = 22 //0x16
	Size8MbJ1   SizeType = 23 //0x17
	Size16MbJ1  SizeType = 24 //0x18
	Size32MbJ1  SizeType = 25 //0x19
	Size64MbJ1  SizeType = 26 //0x1a
	Size128MbJ1 SizeType = 27 //0x1b
	Size256MbJ1 SizeType = 28 //0x1c

	Size64MbJ2  SizeType = 32 //0x20
	Size128MbJ2 SizeType = 33 //0x21
	Size256MbJ2 SizeType = 34 //0x22

	Size256KbJ3 SizeType = 50 //0x32
	Size512KbJ3 SizeType = 51 //0x33
	Size1MbJ3   SizeType = 52 //0x34
	Size2MbJ3   SizeType = 53 //0x35
	Size4MbJ3   SizeType = 54 //0x36
	Size8MbJ3   SizeType = 55 //0x37
	Size16MbJ3  SizeType = 56 //0x38
	Size32MbJ3  SizeType = 57 //0x39
	Size64MbJ3  SizeType = 58 //0x3a
)

func (SizeType) String

func (obj SizeType) String() string

type SlipType

type SlipType byte
const (
	SlipHeader     SlipType = 192 //0xc0
	SlipEscapeChar SlipType = 219 //0xdb
)

func (SlipType) Byte

func (obj SlipType) Byte() byte

func (SlipType) String

func (obj SlipType) String() string

type StateType

type StateType byte
const (
	StateWaitingHeader  StateType = 0 //0x00
	StateReadingContent StateType = 1 //0x01
	StateInEscape       StateType = 2 //0x02
)

func (StateType) String

func (obj StateType) String() string

Jump to

Keyboard shortcuts

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