avr-classes
|
The devices project contains drivers for external devices that can be attached to an AVR controller.
Integrated Circuits
The base class IntegratedCircuit doesn't add functionality, but contains interfaces that describe common features of integrated circuits, like isClocked or hasOutputEnable. This allows similar devices to be treated similar and makes sure that names don't match just by coincidence.
Shift registers
A noteworthy feature of shift registers is that they can be used as port expanders, making typically 8 pins available while requiring only 2 pins to do this. To make this feature available, there are the classes OutputShiftRegisterPort and OutputShiftRegisterPortWithLatch which make use of a device implementing OutputShiftRegister / OutputShiftRegisterWithLatch and provide the OutputPort interface which then can be used by core classes like OutputPortPin.
Beside the abstract types there are also specific device implementations like ShiftRegister74HC164 and ShiftRegister74HC595 which make all features of the device available. It is generally safe to pass nullptr for pins that are not used (e.g. when DataA and DataB of the 74HC164 are physically connected).