core

package
v0.0.0-...-7ee4f4a Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOW = iota
	HIGH
)
View Source
const (
	INPUT = iota
	OUTPUT
	PULL_OFF
	PULL_DOWN
	PULL_UP
	PWM_OUTPUT
	GPIO_CLOCK
	SOFT_PWM_OUTPUT
	SOFT_TONE_OUTPUT
	PWM_TONE_OUTPUT
)
View Source
const (
	LSBFIRST = iota
	MSBFIRST
)
View Source
const (
	CHANGE
	FALLING
	RISING
)
View Source
const (
	MMAP_BLOCK_SIZE = 4096
	DEV_GPIO_MEM    = "/dev/gpiomem"
	DEV_MEM         = "/dev/mem"
	SYS_SOC_RANGES  = "/sys/firmware/devicetree/base/soc/ranges"
)

Variables

View Source
var (
	ErrUnknownMode       = errors.New("unknown pin-mode")
	ErrUnimplementedMode = errors.New("unimplemented pin-mode")
	ErrInvalidValue      = errors.New("invalid value")
	ErrInvalidPlatform   = errors.New("invalid platform")
)

Functions

func Delay

func Delay(ms int64)

func DelayMicroseconds

func DelayMicroseconds(us int64)

func DelayMicrosecondsSched

func DelayMicrosecondsSched(us int64)

func DelayShed

func DelayShed(ms int64)

func Micros

func Micros() int64

func Millis

func Millis() int64

func ShiftIn

func ShiftIn(dataPin, clockPin Pin, bitOrder byte) byte

func ShiftOut

func ShiftOut(dataPin, clockPin Pin, bitOrder, value byte)

Types

type Pin

type Pin uint8

func (Pin) DigitalRead

func (this Pin) DigitalRead() uint8

func (Pin) DigitalWrite

func (this Pin) DigitalWrite(v uint8) error

func (Pin) Input

func (this Pin) Input() error

func (Pin) Mode

func (this Pin) Mode(m uint8) (err error)

func (Pin) Output

func (this Pin) Output() error

func (Pin) PullDown

func (this Pin) PullDown() error

func (Pin) PullOff

func (this Pin) PullOff() error

func (Pin) PullUp

func (this Pin) PullUp() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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