Back to godoc.org

Package matrix4x3

v0.0.0-...-d3d8c0c
Latest Go to latest

The latest major version is .

Published: May 8, 2017 | License: MIT | Module: github.com/kidoman/embd

Overview

Package matrix4x3 allows interfacing 4x3 keypad with Raspberry pi.

Index

type Key

type Key int
const (
	KNone Key = iota
	K0
	K1
	K2
	K3
	K4
	K5
	K6
	K7
	K8
	K9
	KStar
	KHash
)

func (Key) String

func (k Key) String() string

type Matrix4x3

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

A Matrix4x3 struct represents access to the keypad.

func New

func New(rowPins, colPins []int) (*Matrix4x3, error)

New creates a new interface for matrix4x3.

func (*Matrix4x3) Close

func (d *Matrix4x3) Close()

Close.

func (*Matrix4x3) PressedKey

func (d *Matrix4x3) PressedKey() (key Key, err error)

Pressed key returns the current key pressed on the keypad.

func (*Matrix4x3) Run

func (d *Matrix4x3) Run()

Run starts the continuous key scan loop.

func (*Matrix4x3) SetPollDelay

func (d *Matrix4x3) SetPollDelay(delay int)

SetPollDelay sets the delay between run of key scan acquisition loop.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier