spi

package
Version: v0.0.0-...-f612f80 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SPI_CONTINUE     = 0
	SPI_LAST         = 1
	SPI_MODE0        = 0x00
	SPI_MODE1        = 0x01
	SPI_MODE2        = 0x02
	SPI_MODE3        = 0x03
	SPI_CLOCK_DIV1   = 0x00
	SPI_CLOCK_DIV2   = 0x01
	SPI_CLOCK_DIV4   = 0x02
	SPI_CLOCK_DIV8   = 0x03
	SPI_CLOCK_DIV16  = 0x04
	SPI_CLOCK_DIV32  = 0x05
	SPI_CLOCK_DIV64  = 0x06
	SPI_CLOCK_DIV128 = 0x07
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SPIDevice

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

func NewSPIDevice

func NewSPIDevice(bus byte) *SPIDevice

func (*SPIDevice) Begin

func (this *SPIDevice) Begin()

func (*SPIDevice) Close

func (this *SPIDevice) Close()

func (*SPIDevice) End

func (this *SPIDevice) End()

func (*SPIDevice) SetBitOrder

func (this *SPIDevice) SetBitOrder(bitOrder byte)

func (*SPIDevice) SetClockDivider

func (this *SPIDevice) SetClockDivider(rate int)

func (*SPIDevice) SetDataMode

func (this *SPIDevice) SetDataMode(mode int)

func (*SPIDevice) Transfer

func (this *SPIDevice) Transfer(value byte, mode byte) byte

Source Files

Jump to

Keyboard shortcuts

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