blabla

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 "mbed.h"
00002 #include "KeyboardTsLcd.h"
00003 
00004 KeyboardTsLcd::KeyboardTsLcd(unsigned char _ucColumn)
00005 {
00006     pKeyboard = new KeyboardTs(_ucColumn);
00007     pLed = new LedLcd(_ucColumn);
00008     
00009 }
00010     
00011     enum KeyboardState KeyboardTsLcd::eRead(){
00012         
00013         switch(pKeyboard->eRead()) {
00014             case BUTTON_0:
00015                 pLed->On(0);
00016                 return BUTTON_0;
00017             case BUTTON_1:
00018                 pLed->On(1);
00019                 return BUTTON_1;
00020             case BUTTON_2:
00021                 pLed->On(2);
00022                 return BUTTON_2;
00023             case BUTTON_3:
00024                 pLed->On(3);
00025                 return BUTTON_3;
00026             default :
00027                 pLed->On(4);
00028                 return NO_BUTTON;
00029         }
00030         }
00031