generic

package
v0.0.0-...-12db844 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2014 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package generic provides generic (to Linux) drivers for functionalities like

Digital I/O I²C LED control

They are used by the hosts to satiate the HAL.

Index

Constants

View Source
const (
	SPI_IOC_WR_MODE          = 0x40016B01
	SPI_IOC_WR_BITS_PER_WORD = 0x40016B03
	SPI_IOC_WR_MAX_SPEED_HZ  = 0x40046B04

	SPI_IOC_RD_MODE          = 0x80016B01
	SPI_IOC_RD_BITS_PER_WORD = 0x80016B03
	SPI_IOC_RD_MAX_SPEED_HZ  = 0x80046B04

	SPI_IOC_MESSAGE_0   = 1073769216 //0x40006B00
	SPI_IOC_INCREMENTER = 2097152    //0x200000

	DEFAULT_DELAYMS   = uint16(0)
	DEFAULT_SPI_BPW   = uint8(8)
	DEFAULT_SPI_SPEED = uint32(1000000)
)

Variables

This section is empty.

Functions

func NewDigitalPin

func NewDigitalPin(pd *embd.PinDesc, drv embd.GPIODriver) embd.DigitalPin

func NewI2CBus

func NewI2CBus(l byte) embd.I2CBus

func NewLED

func NewLED(id string) embd.LED

func NewSPIBus

func NewSPIBus(spiDevMinor, mode, channel byte, speed, bpw, delay int) embd.SPIBus

Types

This section is empty.

Jump to

Keyboard shortcuts

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