hwspi

package module
v0.0.0-...-8423a9b Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

README

hwspi

HW SPI based on embd package (written in Go)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HWspi

type HWspi struct {
	ClkOut    embd.DigitalPin
	ClkPin    string
	DataOut   embd.DigitalPin
	DataPin   string
	ClkFactor time.Duration
}

HWspi is a driver for HWspi led strips

func (*HWspi) GpioWrite

func (spi *HWspi) GpioWrite(b byte)

GpioWrite - writes a byte to spi

func (*HWspi) GpioWriteBit

func (spi *HWspi) GpioWriteBit(b bool)

GpioWriteBit sends a single bit over SPI

func (*HWspi) GpioWriteBuffer

func (spi *HWspi) GpioWriteBuffer(bytes []byte)

GpioWriteBuffer - writes a buffer to spi

func (*HWspi) Init

func (spi *HWspi) Init(ClkPin, DataPin string, ClkFactor time.Duration) (*HWspi, error)

Init Creates a New HWspi driver based on embd package

Jump to

Keyboard shortcuts

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