bitfield

package
v0.0.0-...-0d72348 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitfield16

type Bitfield16 uint16

func (*Bitfield16) Clear

func (b *Bitfield16) Clear(pos uint)

func (Bitfield16) Read

func (b Bitfield16) Read(pos uint) bool

func (*Bitfield16) Set

func (b *Bitfield16) Set(pos uint)

func (Bitfield16) String

func (b Bitfield16) String() string

func (*Bitfield16) Toggle

func (b *Bitfield16) Toggle(pos uint)

type Bitfield8

type Bitfield8 uint8

Implementations for uint8, uint16

func (*Bitfield8) Clear

func (b *Bitfield8) Clear(pos uint)

Writes a false value to the bit at the specified position.

func (Bitfield8) Read

func (b Bitfield8) Read(pos uint) bool

Returns the value on the bit at the specified position.

func (*Bitfield8) Set

func (b *Bitfield8) Set(pos uint)

Writes a true value to the bit at the specified position.

func (Bitfield8) String

func (b Bitfield8) String() string

Reads the bitfield as a string

func (*Bitfield8) Toggle

func (b *Bitfield8) Toggle(pos uint)

Toggles the value on the bit at the specified position.

Jump to

Keyboard shortcuts

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