mmio

package
v0.0.0-...-168ccc2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package mmio provides data types that can be used to access memory mapped registers of peripherals.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type U16

type U16 struct {
	// contains filtered or unexported fields
}

func AsU16

func AsU16(addr *uint16) *U16

func PtrU16

func PtrU16(addr unsafe.Pointer) *U16

func (*U16) Addr

func (r *U16) Addr() uintptr

func (*U16) Bit

func (r *U16) Bit(n int) int

func (*U16) Bits

func (r *U16) Bits(mask uint16) uint16

func (*U16) ClearBit

func (r *U16) ClearBit(n int)

func (*U16) ClearBits

func (r *U16) ClearBits(mask uint16)

func (*U16) Field

func (r *U16) Field(mask uint16) int

func (*U16) Load

func (r *U16) Load() uint16

func (*U16) SetBit

func (r *U16) SetBit(n int)

func (*U16) SetBits

func (r *U16) SetBits(mask uint16)

func (*U16) SetField

func (r *U16) SetField(mask uint16, v int)

func (*U16) Store

func (r *U16) Store(v uint16)

func (*U16) StoreBit

func (r *U16) StoreBit(n, v int)

func (*U16) StoreBits

func (r *U16) StoreBits(mask, bits uint16)

type U32

type U32 struct {
	// contains filtered or unexported fields
}

func AsU32

func AsU32(addr *uint32) *U32

func PtrU32

func PtrU32(addr unsafe.Pointer) *U32

func (*U32) Addr

func (r *U32) Addr() uintptr

func (*U32) AtomicClearBits

func (r *U32) AtomicClearBits(mask uint32)

func (*U32) AtomicSetBits

func (r *U32) AtomicSetBits(mask uint32)

func (*U32) AtomicStoreBits

func (r *U32) AtomicStoreBits(mask, bits uint32)

func (*U32) Bit

func (r *U32) Bit(n int) int

func (*U32) Bits

func (r *U32) Bits(mask uint32) uint32

func (*U32) ClearBit

func (r *U32) ClearBit(n int)

func (*U32) ClearBits

func (r *U32) ClearBits(mask uint32)

func (*U32) Field

func (r *U32) Field(mask uint32) int

func (*U32) Load

func (r *U32) Load() uint32

func (*U32) SetBit

func (r *U32) SetBit(n int)

func (*U32) SetBits

func (r *U32) SetBits(mask uint32)

func (*U32) SetField

func (r *U32) SetField(mask uint32, v int)

func (*U32) Store

func (r *U32) Store(v uint32)

func (*U32) StoreBit

func (r *U32) StoreBit(n, v int)

func (*U32) StoreBits

func (r *U32) StoreBits(mask, bits uint32)

type U8

type U8 struct {
	// contains filtered or unexported fields
}

func AsU8

func AsU8(addr *uint8) *U8

func PtrU8

func PtrU8(addr unsafe.Pointer) *U8

func (*U8) Addr

func (r *U8) Addr() uintptr

func (*U8) Bit

func (r *U8) Bit(n int) int

func (*U8) Bits

func (r *U8) Bits(mask uint8) uint8

func (*U8) ClearBit

func (r *U8) ClearBit(n int)

func (*U8) ClearBits

func (r *U8) ClearBits(mask uint8)

func (*U8) Field

func (r *U8) Field(mask uint8) int

func (*U8) Load

func (r *U8) Load() uint8

func (*U8) SetBit

func (r *U8) SetBit(n int)

func (*U8) SetBits

func (r *U8) SetBits(mask uint8)

func (*U8) SetField

func (r *U8) SetField(mask uint8, v int)

func (*U8) Store

func (r *U8) Store(v uint8)

func (*U8) StoreBit

func (r *U8) StoreBit(n, v int)

func (*U8) StoreBits

func (r *U8) StoreBits(mask, bits uint8)

type UM16

type UM16 struct {
	U    *U16
	Mask uint16
}

func (UM16) Clear

func (b UM16) Clear()

func (UM16) Load

func (b UM16) Load() uint16

func (UM16) LoadVal

func (b UM16) LoadVal() int

func (UM16) Set

func (b UM16) Set()

func (UM16) Store

func (b UM16) Store(bits uint16)

func (UM16) StoreVal

func (b UM16) StoreVal(v int)

type UM32

type UM32 struct {
	U    *U32
	Mask uint32
}

func (UM32) AtomicClear

func (b UM32) AtomicClear()

func (UM32) AtomicSet

func (b UM32) AtomicSet()

func (UM32) AtomicStore

func (b UM32) AtomicStore(bits uint32)

func (UM32) Clear

func (b UM32) Clear()

func (UM32) Load

func (b UM32) Load() uint32

func (UM32) LoadVal

func (b UM32) LoadVal() int

func (UM32) Set

func (b UM32) Set()

func (UM32) Store

func (b UM32) Store(bits uint32)

func (UM32) StoreVal

func (b UM32) StoreVal(v int)

type UM8

type UM8 struct {
	U    *U8
	Mask uint8
}

func (UM8) Clear

func (b UM8) Clear()

func (UM8) Load

func (b UM8) Load() uint8

func (UM8) LoadVal

func (b UM8) LoadVal() int

func (UM8) Set

func (b UM8) Set()

func (UM8) Store

func (b UM8) Store(bits uint8)

func (UM8) StoreVal

func (b UM8) StoreVal(v int)

Jump to

Keyboard shortcuts

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