target

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: 4 Imported by: 3

Documentation

Overview

Copyright © 2019 Erin Shepherd

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

This section is empty.

Functions

func Register

func Register(td *Definition)

Types

type Config

type Config interface {
	encoding.BinaryMarshaler
	encoding.BinaryUnmarshaler

	// Returns the LDROM size specified by this config,
	// (0 if not present)
	GetLDROMSize() uint
}

type ConfigSpace

type ConfigSpace struct {
	// In Intel Hex files, configuration data will be stored
	// at this offset
	IHexOffset uint32

	// Minimum size of configuration data to be valid
	MinSize uint
	// Size to use when issuing reads
	ReadSize uint8
	// Size to use when issuing writes (data will be padded with FFs)
	WriteSize uint8

	// Create a new Config object
	NewConfig func() Config
}

Configuration space configuration for target

func (*ConfigSpace) Decode

func (cs *ConfigSpace) Decode(buf []byte) (Config, error)

Decode config bytes

type Definition

type Definition struct {
	// Name of target device
	Name string

	// Device family
	Family protocol.ChipFamily

	// Device ID
	DeviceID protocol.DeviceID

	// Program memory size
	ProgMemSize uint

	// LDROM offset
	// If LDROM is enabled, then it starts at this address in
	// program space from the perspective of the programmer
	LDROMOffset uint

	// Config space configuration
	Config ConfigSpace
}

Definition of a target

func ByName

func ByName(name string) *Definition

Directories

Path Synopsis
package all imports all target packages (and hence ensures they are registered)
package all imports all target packages (and hence ensures they are registered)
package n76 contians N76 family device definitions
package n76 contians N76 family device definitions
package n76 contians N76 family device definitions
package n76 contians N76 family device definitions

Jump to

Keyboard shortcuts

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