sx1301

package module
v0.0.0-...-6744f52 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2017 License: MIT Imports: 6 Imported by: 0

README

semtech1301

golang prototype spi driver for semtech sx1301 DO NOT USE!

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UknownRegisterNameError = errors.New("error unknown register")
	InvalidRegisterAddress  = errors.New("error invalid register address greater than 127")
)
View Source
var PageOutOfRangeError error = errors.New("memory page out of range")
View Source
var Registers = map[string]loraRegister{}/* 326 elements not displayed */

map of sx1301 registers

Functions

This section is empty.

Types

type GPIOPin

type GPIOPin interface {
	Low()
	High()
	State() uint8 // not really needed TODO: remove from definition
}

type SX1301Spi

type SX1301Spi struct {
	sync.Mutex
	driver.Conn
	ChipSelect GPIOPin
	// contains filtered or unexported fields
}

func (*SX1301Spi) ReadRegister

func (s *SX1301Spi) ReadRegister(address byte) (byte, error)

func (*SX1301Spi) ReadRegisterByName

func (s *SX1301Spi) ReadRegisterByName(sx1301Register string) ([]byte, error)

Returns []byte value of the register by the name of the register of the Registers table.

func (*SX1301Spi) WriteRegister

func (s *SX1301Spi) WriteRegister(address byte, data byte) error

func (*SX1301Spi) WriteRegisterByName

func (s *SX1301Spi) WriteRegisterByName(sx1301Register string, data ...byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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