Mbed touchscreed project. To be corrected

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI

KeyboardTsLcd.cpp

Committer:
piotrlopata
Date:
2020-05-12
Revision:
6:fc42ae7ee145
Parent:
4:35b2f0e76b02

File content as of revision 6:fc42ae7ee145:

#include "KeyboardTsLcd.h"

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

enum Buttons KeyboardTsLcd::eRead(void) {
    enum Buttons ePressedButton = pKeyboard->eRead();
    switch( ePressedButton ) {
        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 ePressedButton;
}