Roza Dwornik / Mbed 2 deprecated DISCO-F429ZI_mbed1

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