ms51

package
v0.0.0-...-d6e21ea Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 5 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.

Index

Constants

This section is empty.

Variables

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

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 MS51FBConfig

type MS51FBConfig 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 MS51FBLDROMSize `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 (*MS51FBConfig) GetLDROMSize

func (c *MS51FBConfig) GetLDROMSize() uint

func (*MS51FBConfig) MarshalBinary

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

func (*MS51FBConfig) UnmarshalBinary

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

type MS51FBLDROMSize

type MS51FBLDROMSize byte
const (
	MS51FBLDROM0KB MS51FBLDROMSize = iota
	MS51FBLDROM1KB
	MS51FBLDROM2KB
	MS51FBLDROM3KB
	MS51FBLDROM4KB
)

func MS51FBLDROMSizeString

func MS51FBLDROMSizeString(s string) (MS51FBLDROMSize, error)

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

func MS51FBLDROMSizeValues

func MS51FBLDROMSizeValues() []MS51FBLDROMSize

MS51FBLDROMSizeValues returns all values of the enum

func (MS51FBLDROMSize) IsAMS51FBLDROMSize

func (i MS51FBLDROMSize) IsAMS51FBLDROMSize() bool

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

func (MS51FBLDROMSize) MarshalJSON

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

MarshalJSON implements the json.Marshaler interface for MS51FBLDROMSize

func (MS51FBLDROMSize) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface for MS51FBLDROMSize

func (MS51FBLDROMSize) String

func (i MS51FBLDROMSize) String() string

func (*MS51FBLDROMSize) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaler interface for MS51FBLDROMSize

func (*MS51FBLDROMSize) UnmarshalText

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

UnmarshalText implements the encoding.TextUnmarshaler interface for MS51FBLDROMSize

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