n76

package
v0.0.0-...-d1fcd08 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 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 MS51FB9AE = &target.Definition{
	Name:        "MS51FB9AE",
	Family:      protocol.ChipFamily8051,
	DeviceID:    protocol.DeviceMS51FB9AE,
	ProgMemSize: 16 * 1024,
	LDROMOffset: 0x3800,
	Config: target.ConfigSpace{
		IHexOffset: 0x30000,
		MinSize:    4,
		ReadSize:   8,
		WriteSize:  32,
		NewConfig:  func() target.Config { return new(MS51FB9AEConfig) },
	},
}

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 MS51FB9AEConfig

type MS51FB9AEConfig 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 MS51FB9AELDROMSize `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 (*MS51FB9AEConfig) GetLDROMSize

func (c *MS51FB9AEConfig) GetLDROMSize() uint

func (*MS51FB9AEConfig) MarshalBinary

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

func (*MS51FB9AEConfig) UnmarshalBinary

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

type MS51FB9AELDROMSize

type MS51FB9AELDROMSize byte
const (
	MS51FB9AELDROM0KB MS51FB9AELDROMSize = iota
	MS51FB9AELDROM1KB
	MS51FB9AELDROM2KB
	MS51FB9AELDROM3KB
	MS51FB9AELDROM4KB
)

func MS51FB9AELDROMSizeString

func MS51FB9AELDROMSizeString(s string) (MS51FB9AELDROMSize, 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 MS51FB9AELDROMSizeValues

func MS51FB9AELDROMSizeValues() []MS51FB9AELDROMSize

N76E003LDROMSizeValues returns all values of the enum

func (MS51FB9AELDROMSize) IsAMS51FB9AELDROMSize

func (i MS51FB9AELDROMSize) IsAMS51FB9AELDROMSize() bool

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

func (MS51FB9AELDROMSize) MarshalJSON

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

MarshalJSON implements the json.Marshaler interface for N76E003LDROMSize

func (MS51FB9AELDROMSize) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface for N76E003LDROMSize

func (MS51FB9AELDROMSize) String

func (i MS51FB9AELDROMSize) String() string

func (*MS51FB9AELDROMSize) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaler interface for N76E003LDROMSize

func (*MS51FB9AELDROMSize) UnmarshalText

func (i *MS51FB9AELDROMSize) 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