spiflash

package
v0.0.0-...-19051da Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flash

type Flash struct {
	// contains filtered or unexported fields
}

func New

func New(spi SPIFunc, maxBytesPerTransaction int) (*Flash, error)

func (*Flash) DeviceID

func (f *Flash) DeviceID() [4]byte

func (*Flash) EraseChip

func (f *Flash) EraseChip() error

func (*Flash) ErasePage

func (f *Flash) ErasePage(address uint32) error

func (*Flash) Read

func (f *Flash) Read(offset uint32, data []byte) (int, error)

func (*Flash) Write

func (f *Flash) Write(offset uint32, data []byte) (int, error)

type SPIFunc

type SPIFunc func(out []byte, in []byte) error

Jump to

Keyboard shortcuts

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