AGH MTM PPO MBED

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI

Keyboard_Ts_Lcd.cpp

Committer:
matis755
Date:
2020-05-09
Revision:
1:36b3fd4a01fd
Parent:
0:f4a48c08fea7

File content as of revision 1:36b3fd4a01fd:

#include "Keyboard_Ts_Lcd.h"

KeyboardTsLcd::KeyboardTsLcd(unsigned char _ucColumn)
{
    pKeyboard = new KeyboardTs(_ucColumn);
    pLed = new LedLcd(_ucColumn);
};

enum KeyboardState KeyboardTsLcd::eRead(void) {
    enum KeyboardState eButton = pKeyboard -> eRead();
    switch(eButton) {
        case BUTTON_0:
            pLed -> On(0);
            break;
        case BUTTON_1:
            pLed -> On(1);
            break;
        case BUTTON_2:
            pLed -> On(2);
            break;
        case BUTTON_3:
            pLed -> On(3);
            break;
        default :
            pLed -> On(4);
            break;
    }  
    return eButton;
}