util

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PRIO_HISTORY    = 0
	PRIO_BREAKPOINT = 1
)

Variables

This section is empty.

Functions

func Bit

func Bit(val interface{}, idx int) bool

Bit check val's idx bit

func Bool2Int

func Bool2Int(b bool) int

func Bool2U16

func Bool2U16(b bool) uint16

func Bool2U32

func Bool2U32(b bool) uint32

func Bool2U64

func Bool2U64(b bool) uint64

func Bool2U8

func Bool2U8(b bool) byte

func SetBit16

func SetBit16(val uint16, idx int, b bool) uint16

func SetBit8

func SetBit8(val byte, idx int, b bool) byte

func SetLSB

func SetLSB(val byte, b bool) byte

func SetMSB

func SetMSB(val byte, b bool) byte

Types

type Callback

type Callback struct {
	Name     string
	Priority Priority
	Func     func() bool
}

func RemoveCallback

func RemoveCallback(callbacks []*Callback, name string) []*Callback

func SetCallback

func SetCallback(callbacks []*Callback, name string, priority Priority, callback func() bool) ([]*Callback, error)

type GBModel

type GBModel byte
const (
	GB_MODEL_AUTODETECT GBModel = 0xFF
	GB_MODEL_DMG        GBModel = 0x00
	GB_MODEL_SGB        GBModel = 0x20
	GB_MODEL_MGB        GBModel = 0x40
	GB_MODEL_SGB2       GBModel = 0x60
	GB_MODEL_CGB        GBModel = 0x80
	GB_MODEL_AGB        GBModel = 0xC0
)

type Priority

type Priority uint

Jump to

Keyboard shortcuts

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