package
Version:
v0.0.0-...-7a30345
Opens a new window with list of versions in this module.
Published: Mar 1, 2023
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
-
func AddrArg(defAdr, maxAdr uint, args []string) (uint, error)
-
func BitMask(msb, lsb uint) uint
-
func BoolToInt(x bool) int
-
func DisplayEnum(x uint, m map[uint]string, unknown string) string
-
func FileExists(name string) bool
-
func FmtDec(x uint) string
-
func FmtHex(x uint) string
-
func FmtHex16(x uint) string
-
func FmtHex8(x uint) string
-
func GetBits(x, msb, lsb uint) uint
-
func GetELFClass(filename string) (elf.Class, error)
-
func GreenString(s string) string
-
func MaskBits(x, msb, lsb uint) uint
-
func MemArg(defAdr, maxAdr uint, args []string) (uint, uint, error)
-
func RedString(s string) string
-
func SetBits(x, val, msb, lsb uint) uint
-
type Field
-
type FieldSet
AddrArg converts an address argument to an address value.
BitMask returns a bit mask from the msb to lsb bits.
BoolToInt converts a boolean to an int (1 or 0).
DisplayEnum returns the display string for an enumeration.
FileExists returns true if the file exists.
FmtDec formats a uint as a decimal string.
FmtHex formats a uint as a hexadecimal string.
FmtHex16 formats a uint as a 4-nybble hexadecimal string.
FmtHex8 formats a uint as a 2-nybble hexadecimal string.
GetBits reads a bit field from a value.
GetELFClass return the elf file class (32 or 64 bit)
GreenString returns a green string.
MaskBits masks a bit field within a value.
MemArg converts memory arguments to an (address, size) tuple.
RedString returns a red string.
func SetBits(x, val, msb, lsb uint) uint
SetBits writes a bit field within a value.
type Field struct {
Name string
Msb, Lsb uint
Fmt fmtFunc
}
Field is a bit field within a uint value.
Display returns a display string for a bit field.
FieldSet is a set of field definitions.
Display returns a display string for the bit fields of a uint value.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.