n76

package
v0.0.0-...-e9911ef Latest Latest
Warning

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

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

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.

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.

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.ChipFamily1T8051,
	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) },
	},
}
View Source
var N76E616 = &target.Definition{
	Name:        "N76E616",
	Family:      protocol.ChipFamily1T8051,
	DeviceID:    protocol.DeviceN76E616,
	ProgMemSize: 18 * 1024,
	LDROMOffset: 0x3800,
	Config: target.ConfigSpace{
		IHexOffset: 0x30000,
		MinSize:    4,
		ReadSize:   8,
		WriteSize:  32,
		NewConfig:  func() target.Config { return new(N76E616Config) },
	},
}
View Source
var N76E885 = &target.Definition{
	Name:        "N76E885",
	Family:      protocol.ChipFamily1T8051,
	DeviceID:    protocol.DeviceN76E885,
	ProgMemSize: 18 * 1024,
	LDROMOffset: 0x3800,
	Config: target.ConfigSpace{
		IHexOffset: 0x30000,
		MinSize:    4,
		ReadSize:   8,
		WriteSize:  32,
		NewConfig:  func() target.Config { return new(N76E885Config) },
	},
}

Functions

func BODVoltage885Strings

func BODVoltage885Strings() []string

BODVoltage885Strings returns a slice of all String values of the enum

func N76E885LDROMSizeStrings

func N76E885LDROMSizeStrings() []string

N76E885LDROMSizeStrings returns a slice of all String values of the enum

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 BODVoltage885

type BODVoltage885 byte
const (
	BODVoltage8854v3 BODVoltage885 = iota
	BODVoltage8853v7
	BODVoltage8853v0
	BODVoltage8852v7
	BODVoltage8852v4
	BODVoltage8852v2
	BODVoltage8852v0
	BODVoltage8851v7
)

func BODVoltage885String

func BODVoltage885String(s string) (BODVoltage885, error)

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

func BODVoltage885Values

func BODVoltage885Values() []BODVoltage885

BODVoltage885Values returns all values of the enum

func (BODVoltage885) IsABODVoltage885

func (i BODVoltage885) IsABODVoltage885() bool

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

func (BODVoltage885) MarshalJSON

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

MarshalJSON implements the json.Marshaler interface for BODVoltage885

func (BODVoltage885) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface for BODVoltage885

func (BODVoltage885) String

func (i BODVoltage885) String() string

func (*BODVoltage885) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaler interface for BODVoltage885

func (*BODVoltage885) UnmarshalText

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

UnmarshalText implements the encoding.TextUnmarshaler interface for BODVoltage885

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 N76E616Config

type N76E616Config struct {
	// CONFIG0.CBS[7]
	BootSelect BootSelect `json:"boot_select"`
	// 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 N76E616LDROMSize `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 (*N76E616Config) GetLDROMSize

func (c *N76E616Config) GetLDROMSize() uint

func (*N76E616Config) MarshalBinary

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

func (*N76E616Config) UnmarshalBinary

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

type N76E616LDROMSize

type N76E616LDROMSize byte
const (
	N76E616LDROM0KB N76E616LDROMSize = iota
	N76E616LDROM1KB
	N76E616LDROM2KB
	N76E616LDROM3KB
	N76E616LDROM4KB
)

func N76E616LDROMSizeString

func N76E616LDROMSizeString(s string) (N76E616LDROMSize, error)

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

func N76E616LDROMSizeValues

func N76E616LDROMSizeValues() []N76E616LDROMSize

N76E616LDROMSizeValues returns all values of the enum

func (N76E616LDROMSize) IsAN76E616LDROMSize

func (i N76E616LDROMSize) IsAN76E616LDROMSize() bool

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

func (N76E616LDROMSize) MarshalJSON

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

MarshalJSON implements the json.Marshaler interface for N76E616LDROMSize

func (N76E616LDROMSize) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface for N76E616LDROMSize

func (N76E616LDROMSize) String

func (i N76E616LDROMSize) String() string

func (*N76E616LDROMSize) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaler interface for N76E616LDROMSize

func (*N76E616LDROMSize) UnmarshalText

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

UnmarshalText implements the encoding.TextUnmarshaler interface for N76E616LDROMSize

type N76E885Config

type N76E885Config 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 N76E885LDROMSize `json:"ldrom_size"`

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

	// CONFIG2.COV[6:4]
	BODVoltage BODVoltage885 `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 (*N76E885Config) GetLDROMSize

func (c *N76E885Config) GetLDROMSize() uint

func (*N76E885Config) MarshalBinary

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

func (*N76E885Config) UnmarshalBinary

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

type N76E885LDROMSize

type N76E885LDROMSize byte
const (
	N76E885LDROM0KB N76E885LDROMSize = iota
	N76E885LDROM1KB
	N76E885LDROM2KB
	N76E885LDROM3KB
	N76E885LDROM4KB
)

func N76E885LDROMSizeString

func N76E885LDROMSizeString(s string) (N76E885LDROMSize, error)

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

func N76E885LDROMSizeValues

func N76E885LDROMSizeValues() []N76E885LDROMSize

N76E885LDROMSizeValues returns all values of the enum

func (N76E885LDROMSize) IsAN76E885LDROMSize

func (i N76E885LDROMSize) IsAN76E885LDROMSize() bool

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

func (N76E885LDROMSize) MarshalJSON

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

MarshalJSON implements the json.Marshaler interface for N76E885LDROMSize

func (N76E885LDROMSize) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface for N76E885LDROMSize

func (N76E885LDROMSize) String

func (i N76E885LDROMSize) String() string

func (*N76E885LDROMSize) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaler interface for N76E885LDROMSize

func (*N76E885LDROMSize) UnmarshalText

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

UnmarshalText implements the encoding.TextUnmarshaler interface for N76E885LDROMSize

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