chips

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package chips contains chips known to work with the flash tool.

Index

Constants

This section is empty.

Variables

View Source
var Chips = []Chip{
	{
		Vendor:    "SST",
		Chip:      "SST25VF016B",
		ID:        0xbf2541,
		ArraySize: 2 * m,

		PageSize:   1,
		SectorSize: 4 * k,
		BlockSize:  64 * k,
		Is4BA:      false,
		EraseBlocks: []EraseBlock{
			{
				Size: 4 * k,
				Op:   0x20,
			},
			{
				Size: 32 * k,
				Op:   0x52,
			},
			{
				Size: 64 * k,
				Op:   0xD8,
			},
			{
				Size: 2 * m,
				Op:   0x60,
			},
			{
				Size: 2 * m,
				Op:   0xc7,
			},
		},

		WriteEnableInstructionRequired: true,
		WriteEnableOpcodeSelect:        op.WriteEnable,
		Write:                          op.AAI,
		Read:                           op.Read,
	},
}

Chips are all the chips we know about. Note that the test assumes that SST25VF016B is first.

Functions

This section is empty.

Types

type Chip

type Chip struct {
	Vendor      string
	Chip        string
	ID          ID
	ArraySize   int64
	PageSize    int64
	SectorSize  int64
	BlockSize   int64
	Is4BA       bool
	EraseBlocks []EraseBlock

	WriteEnableInstructionRequired bool
	WriteEnableOpcodeSelect        op.OpCode
	Write                          op.OpCode
	Read                           op.OpCode
}

Chip defines a chip.

func Lookup

func Lookup(id ID) (*Chip, error)

Lookup finds a Chip by id, returning os.ErrNotExist if it is not found.

func (*Chip) String

func (c *Chip) String() string

String implements string for Chip.

type EraseBlock

type EraseBlock struct {
	Size int
	Op   op.OpCode
}

EraseBlock defines the size and the opcode used for an erase block. In Flash Chips, the erase region is aligned to the size.

type ID

type ID int

Jump to

Keyboard shortcuts

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