Copyright | (c) Levent Erkok |
---|---|
License | BSD3 |
Maintainer | erkokl@gmail.com |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Abstractions for shift-register IC parts.
Synopsis
- class ShiftRegister a where
- data SR_74HC595 = SR_74HC595 {}
Shift register abstraction
class ShiftRegister a where Source #
A shift-register class as supported by the hArduino library.
Capacity
Display name
dataSheet :: a -> String Source #
Data sheet (typically a URL)
initialize :: a -> Arduino () Source #
Initialize the shift-register
disable :: a -> Arduino () Source #
Disable the output, putting it into high-impedance state
enable :: a -> Arduino () Source #
Enable the output, getting it out of the high-impedance state
clear :: a -> Arduino () Source #
Clear the contents
push :: a -> Bool -> Arduino () Source #
Push a single bit down the shift-register
store :: a -> Arduino () Source #
Store the pushed-in values in the storage register
read :: a -> Arduino [Bool] Source #
Read the current value stored
Instances
ShiftRegister SR_74HC595 Source # | |
Defined in System.Hardware.Arduino.Parts.ShiftRegisters size :: SR_74HC595 -> Int Source # name :: SR_74HC595 -> String Source # dataSheet :: SR_74HC595 -> String Source # initialize :: SR_74HC595 -> Arduino () Source # disable :: SR_74HC595 -> Arduino () Source # enable :: SR_74HC595 -> Arduino () Source # clear :: SR_74HC595 -> Arduino () Source # push :: SR_74HC595 -> Bool -> Arduino () Source # store :: SR_74HC595 -> Arduino () Source # |
Supported shift-registers
Texas Instruments 7HC595
data SR_74HC595 Source #
The Texas-Instruments 74HC595 8-bit shift register with 3-state outputs. Data sheet: http://www.ti.com/lit/ds/symlink/sn74hc595.pdf.
This is a versatile 8-bit shift-register with separate serial and register clocks, allowing shifting to be done while the output remains untouched. We model all control pins provided. Note that the enable and clear lines are negated.
SR_74HC595 | |
|
Instances
ShiftRegister SR_74HC595 Source # | |
Defined in System.Hardware.Arduino.Parts.ShiftRegisters size :: SR_74HC595 -> Int Source # name :: SR_74HC595 -> String Source # dataSheet :: SR_74HC595 -> String Source # initialize :: SR_74HC595 -> Arduino () Source # disable :: SR_74HC595 -> Arduino () Source # enable :: SR_74HC595 -> Arduino () Source # clear :: SR_74HC595 -> Arduino () Source # push :: SR_74HC595 -> Bool -> Arduino () Source # store :: SR_74HC595 -> Arduino () Source # |