
mbed_1 - last program
Dependencies: LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI
main.cpp@2:39601122cf74, 2020-06-01 (annotated)
- Committer:
- matisembed
- Date:
- Mon Jun 01 17:08:22 2020 +0000
- Revision:
- 2:39601122cf74
- Parent:
- 0:f3da1afb14d9
asdasd
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
matisembed | 0:f3da1afb14d9 | 1 | #include "mbed.h" |
matisembed | 0:f3da1afb14d9 | 2 | #include "KeyboardTsLcd.h" |
matisembed | 0:f3da1afb14d9 | 3 | |
matisembed | 0:f3da1afb14d9 | 4 | int main(){ |
matisembed | 0:f3da1afb14d9 | 5 | |
matisembed | 0:f3da1afb14d9 | 6 | KeyboardTsLcd Keyboard(0); |
matisembed | 0:f3da1afb14d9 | 7 | KeyboardTsLcd LedLcd(2); |
matisembed | 0:f3da1afb14d9 | 8 | |
matisembed | 0:f3da1afb14d9 | 9 | while(1){ |
matisembed | 0:f3da1afb14d9 | 10 | Keyboard.eRead(); |
matisembed | 0:f3da1afb14d9 | 11 | wait(0.1); |
matisembed | 2:39601122cf74 | 12 | switch(Keyboard.pKeyboard -> eRead()){ |
matisembed | 2:39601122cf74 | 13 | case BUTTON_0: |
matisembed | 2:39601122cf74 | 14 | LedLcd.pLed -> On(BUTTON_3); |
matisembed | 2:39601122cf74 | 15 | break; |
matisembed | 2:39601122cf74 | 16 | case BUTTON_1: |
matisembed | 2:39601122cf74 | 17 | LedLcd.pLed -> On(BUTTON_2); |
matisembed | 2:39601122cf74 | 18 | break; |
matisembed | 2:39601122cf74 | 19 | case BUTTON_2: |
matisembed | 2:39601122cf74 | 20 | LedLcd.pLed -> On(BUTTON_1); |
matisembed | 2:39601122cf74 | 21 | break; |
matisembed | 2:39601122cf74 | 22 | case BUTTON_3: |
matisembed | 2:39601122cf74 | 23 | LedLcd.pLed -> On(BUTTON_0); |
matisembed | 2:39601122cf74 | 24 | break; |
matisembed | 2:39601122cf74 | 25 | default: |
matisembed | 2:39601122cf74 | 26 | LedLcd.pLed -> On(NO_BUTTON_PRESSED); |
matisembed | 2:39601122cf74 | 27 | break; |
matisembed | 2:39601122cf74 | 28 | } |
matisembed | 0:f3da1afb14d9 | 29 | wait(0.1); |
matisembed | 0:f3da1afb14d9 | 30 | } |
matisembed | 0:f3da1afb14d9 | 31 | } |