n76

package
v0.0.0-...-2f0ff53 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

package n76 contians N76 family device definitions

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

This section is empty.

Variables

View Source
var N76E003 = &target.Definition{
	Name:        "N76E003",
	Family:      protocol.ChipFamilyN76E003,
	DeviceID:    protocol.DeviceN76E003,
	ProgMemSize: 18 * 1024,
	LDROMOffset: 0x3800,
	Config: target.ConfigSpace{
		IHexOffset: 0x30000,
		MinSize:    4,
		ReadSize:   8,
		WriteSize:  32,
		NewConfig:  func() target.Config { return new(N76E003Config) },
	},
}

ProgMemSize: 12 * 1024,

Functions

This section is empty.

Types

type BODVoltage

type BODVoltage byte
const (
	BODVoltage4v4 BODVoltage = iota
	BODVoltage3v7
	BODVoltage2v7
	BODVoltage2v2
)

func BODVoltageString

func BODVoltageString(s string) (BODVoltage, error)

BODVoltageString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func BODVoltageValues

func BODVoltageValues() []BODVoltage

BODVoltageValues returns all values of the enum

func (BODVoltage) IsABODVoltage

func (i BODVoltage) IsABODVoltage() bool

IsABODVoltage returns "true" if the value is listed in the enum definition. "false" otherwise

func (BODVoltage) MarshalJSON

func (i BODVoltage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for BODVoltage

func (BODVoltage) MarshalText

func (i BODVoltage) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for BODVoltage

func (BODVoltage) String

func (i BODVoltage) String() string

func (*BODVoltage) UnmarshalJSON

func (i *BODVoltage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BODVoltage

func (*BODVoltage) UnmarshalText

func (i *BODVoltage) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for BODVoltage

type BootSelect

type BootSelect int
const (
	BootFromLDROM BootSelect = iota
	BootFromAPROM
)

func BootSelectString

func BootSelectString(s string) (BootSelect, error)

BootSelectString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func BootSelectValues

func BootSelectValues() []BootSelect

BootSelectValues returns all values of the enum

func (BootSelect) IsABootSelect

func (i BootSelect) IsABootSelect() bool

IsABootSelect returns "true" if the value is listed in the enum definition. "false" otherwise

func (BootSelect) MarshalJSON

func (i BootSelect) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for BootSelect

func (BootSelect) MarshalText

func (i BootSelect) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for BootSelect

func (BootSelect) String

func (i BootSelect) String() string

func (*BootSelect) UnmarshalJSON

func (i *BootSelect) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BootSelect

func (*BootSelect) UnmarshalText

func (i *BootSelect) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for BootSelect

type N76E003Config

type N76E003Config struct {
	// CONFIG0.CBS[7]
	BootSelect BootSelect `json:"boot_select"`
	// CONFIG0.OCDPWM[5]
	PWMEnabledDuringOCD bool `json:"pwm_enabled_during_ocd"`
	// CONFIG0.OCDEN[4]
	OCDEnabled bool `json:"ocd_enabled"`
	// CONFIG0.RPD[2]
	ResetPinDisabled bool `json:"reset_pin_disabled"`

	// CONFIG0.LOCK[1]
	Locked bool `json:"locked"`

	// CONFIG1.LDSIZE[2:0]
	LDROMSize N76E003LDROMSize `json:"ldrom_size"`

	// CONFIG2.CBODEN[7]
	BODDisabled bool `json:"bod_disabled"`

	// CONFIG2.COV[5:4]
	BODVoltage BODVoltage `json:"bod_voltage"`

	// CONFIG2.BOIAP[3]
	IAPEnabledInBrownout bool `json:"iap_enabled_in_brownout"`

	// CONFIG2.CBORST[2]
	BODResetDisabled bool `json:"bod_reset_disabled"`

	// CONFIG3.WDTEN[7:4]
	WDT WDTMode `json:"wdt"`
}

func (*N76E003Config) GetLDROMSize

func (c *N76E003Config) GetLDROMSize() uint

func (*N76E003Config) MarshalBinary

func (cfg *N76E003Config) MarshalBinary() ([]byte, error)

func (*N76E003Config) UnmarshalBinary

func (cfg *N76E003Config) UnmarshalBinary(buf []byte) error

type N76E003LDROMSize

type N76E003LDROMSize byte
const (
	N76E003LDROM0KB N76E003LDROMSize = iota
	N76E003LDROM1KB
	N76E003LDROM2KB
	N76E003LDROM3KB
	N76E003LDROM4KB
)

func N76E003LDROMSizeString

func N76E003LDROMSizeString(s string) (N76E003LDROMSize, error)

N76E003LDROMSizeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func N76E003LDROMSizeValues

func N76E003LDROMSizeValues() []N76E003LDROMSize

N76E003LDROMSizeValues returns all values of the enum

func (N76E003LDROMSize) IsAN76E003LDROMSize

func (i N76E003LDROMSize) IsAN76E003LDROMSize() bool

IsAN76E003LDROMSize returns "true" if the value is listed in the enum definition. "false" otherwise

func (N76E003LDROMSize) MarshalJSON

func (i N76E003LDROMSize) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for N76E003LDROMSize

func (N76E003LDROMSize) MarshalText

func (i N76E003LDROMSize) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for N76E003LDROMSize

func (N76E003LDROMSize) String

func (i N76E003LDROMSize) String() string

func (*N76E003LDROMSize) UnmarshalJSON

func (i *N76E003LDROMSize) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for N76E003LDROMSize

func (*N76E003LDROMSize) UnmarshalText

func (i *N76E003LDROMSize) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for N76E003LDROMSize

type WDTMode

type WDTMode byte
const (
	WDTDisabled WDTMode = iota
	WDTEnabled
	WDTEnabledAlways
)

func WDTModeString

func WDTModeString(s string) (WDTMode, error)

WDTModeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func WDTModeValues

func WDTModeValues() []WDTMode

WDTModeValues returns all values of the enum

func (WDTMode) IsAWDTMode

func (i WDTMode) IsAWDTMode() bool

IsAWDTMode returns "true" if the value is listed in the enum definition. "false" otherwise

func (WDTMode) MarshalJSON

func (i WDTMode) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for WDTMode

func (WDTMode) MarshalText

func (i WDTMode) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for WDTMode

func (WDTMode) String

func (i WDTMode) String() string

func (*WDTMode) UnmarshalJSON

func (i *WDTMode) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for WDTMode

func (*WDTMode) UnmarshalText

func (i *WDTMode) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for WDTMode

Jump to

Keyboard shortcuts

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