Kacper Gaweda / Mbed 2 deprecated 2a

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers KeyboardTsLcd.cpp Source File

KeyboardTsLcd.cpp

00001 #include "KeyboardTs.h"
00002 #include "LedLcd.h"
00003 #include "mbed.h"
00004 #include "KeyboardTsLcd.h"
00005 
00006 KeyboardTs *pKeyboard;
00007 LedLcd *pLed;  
00008 
00009 KeyboardTsLcd::KeyboardTsLcd(unsigned char _ucColumn)
00010 {
00011 pKeyboard = new KeyboardTs(_ucColumn);
00012 pLed = new LedLcd(_ucColumn);
00013 }
00014 
00015   
00016 
00017 enum eKEYBOARD_KEY KeyboardTsLcd::eRead(){    
00018     
00019         switch(pKeyboard->eRead()) {
00020         case BUTTON_0:
00021         pLed->On(0);
00022         return BUTTON_0;
00023         case BUTTON_1:
00024         pLed->On(1);
00025         return BUTTON_1;
00026         case BUTTON_2:
00027         pLed->On(2);
00028         return BUTTON_2;
00029         case BUTTON_3:
00030         pLed->On(3);
00031         return BUTTON_3;
00032         default :
00033         pLed->On(4);
00034         return NOT_TOUCHED;
00035         } 
00036    
00037 }