a
Dependencies: BSP_DISCO_F429ZI LCD_DISCO_F429ZI TS_DISCO_F429ZI mbed
Fork of Mbed1d-2 by
Diff: KeyboardTsLcd.cpp
- Revision:
- 0:9b028a92ac8a
diff -r 000000000000 -r 9b028a92ac8a KeyboardTsLcd.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/KeyboardTsLcd.cpp Mon Apr 24 15:26:38 2017 +0000 @@ -0,0 +1,40 @@ +#include "KeyboardTsLcd.h" + + +KeyboardTSLcd::KeyboardTSLcd(uint8_t Column) +{ + pKeyboard = new KeyboardTs(Column); + pLed = new LedLcd(Column); +}; + +enum KeyboardState KeyboardTSLcd::eRead(){ + + switch(pKeyboard->eRead()) { + case BUTTON_0: + pLed->On(0); + return BUTTON_0; + // break; + + case BUTTON_1: + pLed->On(1); + return BUTTON_1; + // break; + + case BUTTON_2: + pLed->On(2); + return BUTTON_2; + // break; + + case BUTTON_3: + pLed->On(3); + return BUTTON_3; + // break; + + default : + pLed->On(4); + return RELASED; + // break; + + } + + } \ No newline at end of file