pad

package
v0.0.0-...-5560990 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

type Button byte
const (
	// A is the A button on the GameBoy.
	A Button = 0x01
	// B is the B button on the GameBoy.
	B Button = 0x02
	// Select is the select button on the GameBoy.
	Select Button = 0x04
	// Start is the start button on the GameBoy.
	Start Button = 0x08
	// Right is the right pad direction on the GameBoy.
	Right Button = 0x10
	// Left is the left pad direction on the GameBoy.
	Left Button = 0x20
	// Up is the up pad direction on the GameBoy.
	Up Button = 0x40
	// Down is the down pad direction on the GameBoy.
	Down Button = 0x80
)

type Pad

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

func NewPad

func NewPad() *Pad

NewPad constructs pad peripheral.

func (*Pad) Press

func (pad *Pad) Press(button Button)

func (*Pad) Read

func (pad *Pad) Read() byte

func (*Pad) Release

func (pad *Pad) Release(button Button)

func (*Pad) Write

func (pad *Pad) Write(data byte)

Jump to

Keyboard shortcuts

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