a

Dependents:   2d2

Files at this revision

API Documentation at this revision

Comitter:
Dom952
Date:
Sat Apr 23 17:56:48 2016 +0000
Commit message:
a

Changed in this revision

KeyboardTsLcd.cpp Show annotated file Show diff for this revision Revisions of this file
KeyboardTsLcd.h Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 7ea4e551fed6 KeyboardTsLcd.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/KeyboardTsLcd.cpp	Sat Apr 23 17:56:48 2016 +0000
@@ -0,0 +1,28 @@
+#include "KeyboardTsLcd.h"
+
+KeyboardTsLcd::KeyboardTsLcd (unsigned char _ucColumn)
+{
+    pKeyboard = new KeyboardTs(_ucColumn);
+    pLed = new LedLcd(_ucColumn);
+}
+
+enum KeyboardTsState KeyboardTsLcd::eRead( void )
+{
+        switch(pKeyboard -> eRead()) {
+            case BUTTON_0:
+                pLed -> On(0);
+                return BUTTON_0;
+            case BUTTON_1:
+                pLed -> On(1);
+                return BUTTON_1;
+            case BUTTON_2:
+                pLed -> On(2);
+                return BUTTON_2;
+            case BUTTON_3:
+                pLed -> On(3);
+                return BUTTON_3;
+            default :
+                pLed -> On(4);
+                return RELASED;
+        }
+}
\ No newline at end of file
diff -r 000000000000 -r 7ea4e551fed6 KeyboardTsLcd.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/KeyboardTsLcd.h	Sat Apr 23 17:56:48 2016 +0000
@@ -0,0 +1,16 @@
+#ifndef KEYBOARD_TSLCD_H
+#define KEYBOARD_TSLCD_H
+
+#include "Keyboard_Ts.h"
+#include "Led_Lcd.h"
+
+class KeyboardTsLcd{
+public:
+    KeyboardTsLcd (unsigned char);
+    enum KeyboardTsState eRead (void);
+private:
+    LedLcd * pLed;
+    KeyboardTs * pKeyboard;
+};
+
+#endif
\ No newline at end of file