reg

package
v0.0.0-...-d73fcdd Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 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 GOARCH=arm` as supported by the TamaGo framework for bare metal Go on ARM SoCs, see https://github.com/f-secure-foundry/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 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 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 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(done chan bool, 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 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