ShiftReg library (74HC595, NUJ3711)

Revision:
0:5f1670338bef
Child:
1:3741bc0fbba8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ShiftReg.h	Sat Oct 24 16:30:11 2015 +0000
@@ -0,0 +1,20 @@
+#ifndef MBED_SHIFTREG_H
+#define MBED_SHIFTREG_H
+#define HC595
+//#define NJU3711
+#include "mbed.h"
+ 
+class ShiftReg {
+public:
+    ShiftReg(PinName dataPin, PinName stbPin, PinName clkPin, PinName clrPin);
+    void send_data(uint8_t data);
+  
+private:  
+    DigitalOut DATA;
+    DigitalOut STB;
+    DigitalOut CLK;
+    DigitalOut CLR;
+    void shiftOut(uint8_t data);
+};
+ 
+#endif
\ No newline at end of file