legacy

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package legacy describes Raspberry Pi old-style revision codes.

Index

Constants

View Source
const (
	A     = Model(pirev.A)
	B     = Model(pirev.B)
	APlus = Model(pirev.APlus) // A+
	BPlus = Model(pirev.BPlus) // B+
	CM1   = Model(pirev.CM1)
)

Legacy model constants.

Variables

View Source
var (
	// ErrRevisionOutOfRange happens when asked to Describe a revision
	// number greater than the Last known.
	ErrRevisionOutOfRange = errors.New("revision out of range")
	// ErrUnknownRevision happens when asked to Describe a revision number
	// that is not specified in the Raspberry Pi documentation.
	ErrUnknownRevision = errors.New("unknown revision")
)

Functions

This section is empty.

Types

type Info

type Info struct {
	Revision     Revision
	Memory       Memory
	Model        Model
	Manufacturer Manufacturer
}

Info about hardware with an old-style revision code.

func Describe

func Describe(r RevCode) (i Info, err error)

Describe an old-style revision code.

type Manufacturer

type Manufacturer uint8

Manufacturer code.

const (
	Egoman Manufacturer = iota
	SonyUK              // Sony UK
	Qisda
	Embest
)

Legacy manufacturer constants.

func (Manufacturer) String

func (i Manufacturer) String() string

type Memory

type Memory uint8

Memory size.

const (
	M256 Memory = iota // 256 MB
	M512               // 512 MB
)

Memory size constants.

func (Memory) String

func (i Memory) String() string

type Model

type Model = pirev.Model

Model code.

type RevCode

type RevCode = uint16

RevCode is a Raspberry Pi revision code. Also, an alias for uint16.

const Last RevCode = 0x0015

Last is the last old-style revision code according to the official Raspberry Pi documentation.

type Revision

type Revision float32

Revision number.

Jump to

Keyboard shortcuts

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