Documentation ¶
Overview ¶
Package bits does the low (bit-)level parsing and assembly of new-style Raspberry Pi revision codes.
Index ¶
Constants ¶
View Source
const CodeBitsize = 32
CodeBitsize is the number of bits in a Raspberry Pi revision code.
Variables ¶
View Source
var ErrOverflow = errors.New("more Values than NumTotal")
ErrOverflow is returned when a function gets passed more Values than NumTotal.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field uint
A Field of revision code.
Keep in mind that, as an unsigned integer, Field cannot have negative values, and `f := Field(0) - 1` overflows to `f == Field(MaxUint)`. This means that you have to compare `f <= Last` if/when iterating down from Last.
const ( NoOvervoltage Field = iota // Overvoltage disallowed NoOTPPrograming // OTP programming disallowed NoOTPReading // OTP reading disallowed Unused1 // WarrantyVoid // Warranty has been voided by overclocking Unused2 // NewStyleRev // New-style revision code Memory // Memory size in multiples of 256 Manufacturer Processor Model Revision // NumTotal of known Fields. NumTotal // Taking advantage of iota continuing its effect here. // Last known field. Last = NumTotal - 1 // This automatically tracks the last field. // First of known Fields, short for "Field(0)" to iterate from. First Field = 0 )
Field constants.
Click to show internal directories.
Click to hide internal directories.