code review
Dependencies: LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI
KeyboardTsLcd.cpp@0:db2c7dc10f89, 2020-05-14 (annotated)
- Committer:
- thepaueu
- Date:
- Thu May 14 18:45:14 2020 +0000
- Revision:
- 0:db2c7dc10f89
Pawel Majtas cw 2d2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thepaueu | 0:db2c7dc10f89 | 1 | #include "KeyboardTsLcd.h" |
thepaueu | 0:db2c7dc10f89 | 2 | |
thepaueu | 0:db2c7dc10f89 | 3 | |
thepaueu | 0:db2c7dc10f89 | 4 | |
thepaueu | 0:db2c7dc10f89 | 5 | KeyboardTsLcd::KeyboardTsLcd(unsigned char _ucColumn) |
thepaueu | 0:db2c7dc10f89 | 6 | { |
thepaueu | 0:db2c7dc10f89 | 7 | pKeyboard = new KeyboardTs(_ucColumn); |
thepaueu | 0:db2c7dc10f89 | 8 | pLed = new LedLcd(_ucColumn); |
thepaueu | 0:db2c7dc10f89 | 9 | }; |
thepaueu | 0:db2c7dc10f89 | 10 | |
thepaueu | 0:db2c7dc10f89 | 11 | enum BUTTON KeyboardTsLcd::eRead( void ){ |
thepaueu | 0:db2c7dc10f89 | 12 | |
thepaueu | 0:db2c7dc10f89 | 13 | switch(pKeyboard->eRead()){ |
thepaueu | 0:db2c7dc10f89 | 14 | case BUTTON_0 : |
thepaueu | 0:db2c7dc10f89 | 15 | pLed->On(0); |
thepaueu | 0:db2c7dc10f89 | 16 | return BUTTON_0; |
thepaueu | 0:db2c7dc10f89 | 17 | |
thepaueu | 0:db2c7dc10f89 | 18 | case BUTTON_1 : |
thepaueu | 0:db2c7dc10f89 | 19 | pLed->On(1); |
thepaueu | 0:db2c7dc10f89 | 20 | return BUTTON_1; |
thepaueu | 0:db2c7dc10f89 | 21 | |
thepaueu | 0:db2c7dc10f89 | 22 | case BUTTON_2 : |
thepaueu | 0:db2c7dc10f89 | 23 | pLed->On(2); |
thepaueu | 0:db2c7dc10f89 | 24 | return BUTTON_2; |
thepaueu | 0:db2c7dc10f89 | 25 | |
thepaueu | 0:db2c7dc10f89 | 26 | case BUTTON_3 : |
thepaueu | 0:db2c7dc10f89 | 27 | pLed->On(3); |
thepaueu | 0:db2c7dc10f89 | 28 | return BUTTON_3; |
thepaueu | 0:db2c7dc10f89 | 29 | |
thepaueu | 0:db2c7dc10f89 | 30 | default: |
thepaueu | 0:db2c7dc10f89 | 31 | pLed->On(4); |
thepaueu | 0:db2c7dc10f89 | 32 | return NONE; |
thepaueu | 0:db2c7dc10f89 | 33 | } |
thepaueu | 0:db2c7dc10f89 | 34 | |
thepaueu | 0:db2c7dc10f89 | 35 | } |