avr-classes
|
#include <shiftregister74hc595.h>
Public Member Functions | |
ShiftRegister74HC595 (OutputPin *pinData, OutputPin *pinClock, OutputPin *pinClear, OutputPin *pinLatch, OutputPin *pinEnable) | |
void | setData (bool value) |
virtual void | clock (void) override |
virtual void | clear (void) override |
virtual void | enableOutput (bool enable) override |
virtual void | latchOutput (void) override |
Implementation of the 74HC595 serial in/parallel out shift register with output latch and output enable functions. Each input of the hardware device can be connected using a OutputPin instance. For functions that are not required it is safe to pass a null pointer.
Pinout of device:
|
inline |
Constructor. Pins that are not used can be passed as null pointer.
pinData | Pin to be used for data input. |
pinClock | Pin to be used for clocking data into device. |
pinClear | Pin to be used to clear device. |
pinLatch | Pin to be used to trigger latch. |
pinEnable | Pin to be used to enable/disable the device's outputs. |
|
inlineoverridevirtual |
Toggle clear input.
Implements IntegratedCircuit::hasClear.
|
inlineoverridevirtual |
Toggle clock input.
Implements IntegratedCircuit::isClocked.
|
inlineoverridevirtual |
Enable or disable outputs.
enable | Controls if outputs are enabled (true) or disabled (false). |
Implements IntegratedCircuit::hasOutputEnable.
|
inlineoverridevirtual |
Toggle clock input for output latch.
Implements IntegratedCircuit::hasOutputLatch.
|
inlinevirtual |
Sets data input of shift register to specified value.
value | Value of data input, true for HIGH level and false for LOW level. |
Implements OutputShiftRegister.