Back to godoc.org
gobot.io/x/gobot / platforms / dragonboard

Package dragonboard

v1.14.0
Latest Go to latest
Published: Oct 15, 2019 | Licenses: Apache-2.0 , Apache-2.0 | Module: gobot.io/x/gobot

Overview

Package dragonboard contains the Gobot adaptor for the DragonBoard 410c

For further information refer to the chip README: https://github.com/hybridgroup/gobot/blob/master/platforms/dragonboard/README.md

Index

Package Files

type Adaptor

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

Adaptor represents a Gobot Adaptor for a DragonBoard 410c

func NewAdaptor

func NewAdaptor() *Adaptor

NewAdaptor creates a DragonBoard 410c Adaptor

func (*Adaptor) Connect

func (c *Adaptor) Connect() (err error)

Connect initializes the board

func (*Adaptor) DigitalPin

func (c *Adaptor) DigitalPin(pin string, dir string) (sysfsPin *sysfs.DigitalPin, err error)

DigitalPin returns matched digitalPin for specified values

func (*Adaptor) DigitalRead

func (c *Adaptor) DigitalRead(pin string) (val int, err error)

DigitalRead reads digital value to the specified pin. Valids pins are the GPIO_A through GPIO_L pins from the extender (pins 23-34 on header J8), as well as the SoC pins aka all the other pins, APQ GPIO_0-GPIO_122 and PM_MPP_0-4.

func (*Adaptor) DigitalWrite

func (c *Adaptor) DigitalWrite(pin string, val byte) (err error)

DigitalWrite writes digital value to the specified pin. Valids pins are the GPIO_A through GPIO_L pins from the extender (pins 23-34 on header J8), as well as the SoC pins aka all the other pins, APQ GPIO_0-GPIO_122 and PM_MPP_0-4.

func (*Adaptor) Finalize

func (c *Adaptor) Finalize() (err error)

Finalize closes connection to board and pins

func (*Adaptor) GetConnection

func (c *Adaptor) GetConnection(address int, bus int) (connection i2c.Connection, err error)

GetConnection returns a connection to a device on a specified bus. Valid bus number is [0..1] which corresponds to /dev/i2c-0 through /dev/i2c-1.

func (*Adaptor) GetDefaultBus

func (c *Adaptor) GetDefaultBus() int

GetDefaultBus returns the default i2c bus for this platform

func (*Adaptor) Name

func (c *Adaptor) Name() string

Name returns the name of the Adaptor

func (*Adaptor) SetName

func (c *Adaptor) SetName(n string)

SetName sets the name of the Adaptor

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

Jump to identifier

Keyboard shortcuts

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