cc32xx

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: 13 Imported by: 0

Documentation

Overview

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.

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 (
	StorageBitInvalid StorageBitmap = 0x00
	StorageBitFlash                 = 0x02
	StorageBitSFlash                = 0x04
	StorageBitRAM                   = 0x80
)
View Source
const (
	StorageRAM    StorageID = 0x00
	StorageFlash            = 0x01
	StorageSFlash           = 0x02
)
View Source
const (
	BootFlashImgName = "/sys/mcuflashimg.bin"

	PartTypeServicePack      = "service_pack"
	PartTypeCABundle         = "cabundle"
	PartTypeCertificate      = "cert"
	PartTypeSLFile           = "slfile"
	PartTypeSLConfig         = "slcfg"
	PartTypeBootLoader       = "boot"
	PartTypeBootLoaderConfig = "boot_cfg"
	PartTypeApp              = "app"
	PartTypeFSContainer      = "fs"
	PartTypeSignature        = "sig"
)
View Source
const (
	FileSignatureLength = 0x100
)

Variables

This section is empty.

Functions

func GetUSBSerialNumberForPort

func GetUSBSerialNumberForPort(port string) (string, error)

Types

type ChipType

type ChipType int
const (
	ChipCC3200 ChipType = iota
	ChipCC3220
	ChipCC3220S
	ChipCC3220SF
)

type DeviceControl

type DeviceControl interface {
	EnterBootLoader() error
	BootFirmware() error
	Close()
}

type DeviceInfo

type DeviceInfo struct {
	FSBlockSize         uint16
	FSNumBlocks         uint16
	Unknown04           uint16
	Unknown06           uint16
	Unknown08           uint16
	FSUnknownFreeSize0A uint16
	FSFreeBlocks        uint16
}

type FileSignature

type FileSignature []byte

type MACAddress

type MACAddress [6]byte

func (MACAddress) String

func (mac MACAddress) String() string

type PartsByTypeAndName

type PartsByTypeAndName []*fwbundle.FirmwarePart

func (PartsByTypeAndName) Len

func (pp PartsByTypeAndName) Len() int

func (PartsByTypeAndName) Less

func (pp PartsByTypeAndName) Less(i, j int) bool

func (PartsByTypeAndName) Swap

func (pp PartsByTypeAndName) Swap(i, j int)

type ROMClient

type ROMClient struct {
	// contains filtered or unexported fields
}

func NewROMClient

func NewROMClient(s serial.Serial, dc DeviceControl) (*ROMClient, error)

func (*ROMClient) EraseFile

func (rc *ROMClient) EraseFile(fname string) error

func (*ROMClient) ExecuteFromRAM

func (rc *ROMClient) ExecuteFromRAM() error

func (*ROMClient) FormatSLFS

func (rc *ROMClient) FormatSLFS(size int) error

func (*ROMClient) GetDeviceInfo

func (rc *ROMClient) GetDeviceInfo() (*DeviceInfo, error)

func (*ROMClient) GetMACAddress

func (rc *ROMClient) GetMACAddress() (MACAddress, error)

func (*ROMClient) GetStatus

func (rc *ROMClient) GetStatus() (romStatus, error)

func (*ROMClient) GetStorageInfo

func (rc *ROMClient) GetStorageInfo(sid StorageID) (*StorageInfo, error)

func (*ROMClient) GetStorageList

func (rc *ROMClient) GetStorageList() (StorageBitmap, error)

func (*ROMClient) GetVersionInfo

func (rc *ROMClient) GetVersionInfo() (*VersionInfo, error)

func (*ROMClient) RawEraseAndWrite

func (rc *ROMClient) RawEraseAndWrite(sid StorageID, offset int, data []byte) error

func (*ROMClient) RawStorageEraseBlocks

func (rc *ROMClient) RawStorageEraseBlocks(sid StorageID, startBlock int, numBlocks int) error

func (*ROMClient) RawStorageEraseBytes

func (rc *ROMClient) RawStorageEraseBytes(sid StorageID, offset int, numBytes int) error

func (*ROMClient) RawStorageWrite

func (rc *ROMClient) RawStorageWrite(sid StorageID, offset int, data []byte) error

func (*ROMClient) SwitchToNWPLoader

func (rc *ROMClient) SwitchToNWPLoader() error

func (*ROMClient) SwitchUARTtoAppsMCU

func (rc *ROMClient) SwitchUARTtoAppsMCU() error

func (*ROMClient) UploadFile

func (rc *ROMClient) UploadFile(fi *SLFSFileInfo) error

func (*ROMClient) UploadImageFile

func (rc *ROMClient) UploadImageFile(fname string) error

type SLFSFileInfo

type SLFSFileInfo struct {
	Name      string
	Data      []byte
	AllocSize uint32
	Signature FileSignature
}

type StorageBitmap

type StorageBitmap uint8

type StorageID

type StorageID uint8

func (StorageID) String

func (sid StorageID) String() string

type StorageInfo

type StorageInfo struct {
	BlockSize uint16
	NumBlocks uint16
	Reserved  uint32
}

type VersionInfo

type VersionInfo struct {
	BootLoaderVersion uint32
	NWPVersion        uint32
	MACVersion        uint32
	PHYVersion        uint32
	ChipTypeV         uint32
}

func (*VersionInfo) BootLoaderVersionString

func (vi *VersionInfo) BootLoaderVersionString() string

func (*VersionInfo) ChipType

func (vi *VersionInfo) ChipType() (ChipType, error)

func (*VersionInfo) ChipTypeString

func (vi *VersionInfo) ChipTypeString() string

Jump to

Keyboard shortcuts

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