reg

package
v0.0.0-...-da58827 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package reg provides primitives for retrieving and modifying hardware registers.

This package is only meant to be used with `GOOS=tamago` as supported by the TamaGo framework for bare metal Go on ARM/RISC-V SoCs, see https://github.com/usbarmory/tamago.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear(addr uint32, pos int)

func Clear16

func Clear16(addr uint32, pos int)

func ClearN

func ClearN(addr uint32, pos int, mask int)

func ClearN16

func ClearN16(addr uint32, pos int, mask int)

func Get

func Get(addr uint32, pos int, mask int) uint32

func Get16

func Get16(addr uint32, pos int, mask int) uint16

func IsSet

func IsSet(addr uint32, pos int) bool

func IsSet64

func IsSet64(addr uint64, pos int) bool

func Move

func Move(dst uint32, src uint32)

defined in reg32_*.s

func Or

func Or(addr uint32, val uint32)

func Or16

func Or16(addr uint32, val uint16)

func Read

func Read(addr uint32) uint32

func Read16

func Read16(addr uint32) uint16

func Read64

func Read64(addr uint64) uint64

func Set

func Set(addr uint32, pos int)

func Set16

func Set16(addr uint32, pos int)

func SetN

func SetN(addr uint32, pos int, mask int, val uint32)

func SetN16

func SetN16(addr uint32, pos int, mask int, val uint16)

func SetTo

func SetTo(addr uint32, pos int, val bool)

func SetTo16

func SetTo16(addr uint32, pos int, val bool)

func Wait

func Wait(addr uint32, pos int, mask int, val uint32)

Wait waits for a specific register bit to match a value. This function cannot be used before runtime initialization with `GOOS=tamago`.

func Wait16

func Wait16(addr uint32, pos int, mask int, val uint16)

Wait16 waits for a specific register bit to match a value. This function cannot be used before runtime initialization with `GOOS=tamago`.

func WaitFor

func WaitFor(timeout time.Duration, addr uint32, pos int, mask int, val uint32) bool

WaitFor waits, until a timeout expires, for a specific register bit to match a value. The return boolean indicates whether the wait condition was checked (true) or if it timed out (false). This function cannot be used before runtime initialization.

func WaitFor16

func WaitFor16(timeout time.Duration, addr uint32, pos int, mask int, val uint16) bool

WaitFor16 waits, until a timeout expires, for a specific register bit to match a value. The return boolean indicates whether the wait condition was checked (true) or if it timed out (false). This function cannot be used before runtime initialization with `GOOS=tamago`.

func WaitSignal

func WaitSignal(exit chan struct{}, addr uint32, pos int, mask int, val uint32) bool

WaitSignal waits, until a channel is closed, for a specific register bit to match a value. The return boolean indicates whether the wait condition was checked (true) or cancelled (false). This function cannot be used before runtime initialization.

func Write

func Write(addr uint32, val uint32)

func Write16

func Write16(addr uint32, val uint16)

func Write64

func Write64(addr uint64, val uint64)

func WriteBack

func WriteBack(addr uint32)

func WriteBack16

func WriteBack16(addr uint32)

Types

This section is empty.

Jump to

Keyboard shortcuts

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