shifter

package
v0.0.0-...-3bb5b45 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package shifter is for 8bit shift register, most common are 74HC165 and 74165

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	Pins []ShiftPin
	// contains filtered or unexported fields
}

Device holds the Pins.

func New

func New(numBits NumberBit, latch, clk, out machine.Pin) Device

New returns a new thermistor driver given an ADC pin.

func (*Device) Configure

func (d *Device) Configure()

Configure here just for interface compatibility.

func (*Device) GetShiftPin

func (d *Device) GetShiftPin(input int) ShiftPin

GetShiftPin returns an ShiftPin for a specific input.

func (*Device) Read16Input

func (d *Device) Read16Input() (uint16, error)

Read16Input reads the 16 inputs and return an uint16

func (*Device) Read32Input

func (d *Device) Read32Input() (uint32, error)

Read32Input reads the 32 inputs and return an uint32

func (*Device) Read8Input

func (d *Device) Read8Input() (uint8, error)

Read8Input reads the 8 inputs and return an uint8

type NumberBit

type NumberBit int8
const (
	EIGHT_BITS     NumberBit = 8
	SIXTEEN_BITS   NumberBit = 16
	THIRTYTWO_BITS NumberBit = 32
)

type ShiftPin

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

ShiftPin is the implementation of the ShiftPin interface.

func (ShiftPin) Configure

func (p ShiftPin) Configure()

Configure here just for interface compatibility.

func (ShiftPin) Get

func (p ShiftPin) Get() bool

Get the current reading for a specific ShiftPin.

Jump to

Keyboard shortcuts

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