![](/media/cache/profiles/ndu.jpg.50x50_q85.jpg)
keyboard input, serial com test
Dependencies: mbed DISCO_L475VG_IOT01A_wifi TextLCD USBHost
main.cpp@5:0466445897b8, 2019-08-10 (annotated)
- Committer:
- duchonic
- Date:
- Sat Aug 10 08:34:41 2019 +0000
- Revision:
- 5:0466445897b8
- Parent:
- 4:c2cdba0bae47
- Child:
- 6:9d975a9d2728
first
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
duchonic | 0:6eeb987cb865 | 1 | #include "mbed.h" |
duchonic | 5:0466445897b8 | 2 | #include "inc/display.h" |
duchonic | 5:0466445897b8 | 3 | #include "inc/input.h" |
duchonic | 0:6eeb987cb865 | 4 | |
duchonic | 0:6eeb987cb865 | 5 | DigitalOut led1(LED1); |
duchonic | 2:c1f316e932bc | 6 | Serial pc(SERIAL_TX, SERIAL_RX); |
duchonic | 5:0466445897b8 | 7 | |
duchonic | 5:0466445897b8 | 8 | |
duchonic | 0:6eeb987cb865 | 9 | |
duchonic | 0:6eeb987cb865 | 10 | int main() |
duchonic | 4:c2cdba0bae47 | 11 | { |
duchonic | 5:0466445897b8 | 12 | displayInit(); |
duchonic | 5:0466445897b8 | 13 | inputInit(); |
duchonic | 4:c2cdba0bae47 | 14 | |
duchonic | 5:0466445897b8 | 15 | pc.printf("start main()\n\r"); |
duchonic | 0:6eeb987cb865 | 16 | while(1) { |
duchonic | 5:0466445897b8 | 17 | |
duchonic | 5:0466445897b8 | 18 | |
duchonic | 5:0466445897b8 | 19 | pc.printf("last key:%d \n\r", getKey()); |
duchonic | 5:0466445897b8 | 20 | displayScreen(1); |
duchonic | 4:c2cdba0bae47 | 21 | wait(1); |
duchonic | 0:6eeb987cb865 | 22 | led1 = !led1; |
duchonic | 5:0466445897b8 | 23 | displayScreen(0); |
duchonic | 5:0466445897b8 | 24 | wait(1); |
duchonic | 0:6eeb987cb865 | 25 | } |
duchonic | 0:6eeb987cb865 | 26 | } |