2d1

Fork of TS_DISCO_F429ZI by ST

Keyboard_TsLcd.cpp

Committer:
Robsonik16
Date:
2017-05-05
Revision:
1:972c0d202476

File content as of revision 1:972c0d202476:



#include "Keyboard_TsLcd.h"
KeyboardTsLcd::KeyboardTsLcd(unsigned char _ucColumn){
    pLed = new LedLcd(_ucColumn);
    pKeyboard = new KeyboardTs(_ucColumn);
}
enum KeyboardState KeyboardTsLcd::eRead(){
    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);
    }
        
}