Documentation ¶
Index ¶
Constants ¶
View Source
const ( FlashAreaUnknown = FlashArea(iota) FlashAreaPublicAPI )
View Source
const ( FlashOK = FlashStatus(iota) FlashInvAddr FlashWrProt FlashNotBlank FlashVerify FlashErase FlashProg FlashInitEr FlashSignEr FlashInvalidCRC FlashInvalidKeyNumb FlashInvalidSign FlashInvalidAreaName FlashInvalidTarget FlashRdpErr )
View Source
const BaseAddress = 0x8000000
View Source
const BlockHeaderAddrKey = 0xB2D5A864
View Source
const BlockHeaderSizeKey = 0xCE27A932
View Source
const FlashAreaPublicSignature = 0x19601217
View Source
const MarkerAlmaCode = "AlmaCode"
View Source
const MarkerPhyton = "Phyton\x00\x00"
View Source
const MarkerSize = 8
View Source
const SerialNumberSize = 16
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASBlockHeader ¶
type ASFileHeader ¶
type ASFileHeader struct { Marker [MarkerSize]byte HeaderSize uint32 DateTime DateTime BufferSize uint32 SerialNumber [SerialNumberSize]byte VersionLow uint8 VersionHigh uint8 // FileCount only available when IsAlmaCode() == true FileCount uint32 FirmwareHeaderSize uint32 Compressed uint8 Reserved uint8 CRC32 uint32 UpdateCRC32 uint32 }
func (ASFileHeader) IsAlmaCode ¶
func (h ASFileHeader) IsAlmaCode() bool
type ASFirmwareHeader ¶
func (ASFirmwareHeader) DescriptionString ¶
func (h ASFirmwareHeader) DescriptionString() string
type Block ¶
type Block struct { Header ASBlockHeader Block encryption.EncryptedBlock }
type Entry ¶
type Entry struct { Header ASFirmwareHeader Blocks Blocks // contains filtered or unexported fields }
type Firmware ¶
type Firmware struct { FileHeader ASFileHeader Entries []Entry Data []byte }
func LoadFirmware ¶
type FlashAreaData ¶
type FlashAreaData struct { // PublicSignature Should always be FlashAreaPublicSignature PublicSignature uint32 StructLen uint32 Data []byte }
func DecodeReadFlashArea ¶
func DecodeReadFlashArea(data []byte) (*FlashAreaData, error)
DecodeReadFlashArea Decodes a result of RD_FLASH_AREA command
func (*FlashAreaData) PublicAPI ¶
func (f *FlashAreaData) PublicAPI() *FlashAreaData_PublicAPI
type FlashAreaData_PublicAPI ¶
type FlashStatus ¶
type FlashStatus uint32
Click to show internal directories.
Click to hide internal directories.