Tamas Titusz Ban
/
ELEC1620_ExamTemplate_2019
Template for the ELEC1620 End of year exam
Diff: ShiftReg/ShiftReg.h
- Revision:
- 0:54721f063ac8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ShiftReg/ShiftReg.h Fri Mar 22 13:11:07 2019 +0000 @@ -0,0 +1,24 @@ +#ifndef SHIFTREG_H +#define SHIFTREG_H + +#include <mbed.h> + +/** A simple serial driver for a shift register that uses only three digital out pins. +* Based on a fork of Ollie8/ShiftOut +*/ +class ShiftReg { + + public : + + ShiftReg(); + ~ShiftReg(); + void write(int data); + + private : + DigitalOut *clkout; + DigitalOut *dataout; + DigitalOut *latchout; +}; + +#endif +