TFT_Touch_exemplo3_git
Dependencies: mbed TouchScreen_kbv_mbed MCUFRIEND_kbv_R299 GLUE_STUFF_kbv ADA_GFX_kbv_R1107
main_glue.cpp@4:606d4da3f1b4, 2021-05-25 (annotated)
- Committer:
- henriquer
- Date:
- Tue May 25 15:02:46 2021 +0000
- Revision:
- 4:606d4da3f1b4
- Parent:
- 0:063c3eaefd81
TFT_Touch_exemplo3_git
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
davidprentice | 0:063c3eaefd81 | 1 | #if 1 |
davidprentice | 0:063c3eaefd81 | 2 | |
davidprentice | 0:063c3eaefd81 | 3 | #include "Arduino.h" |
davidprentice | 0:063c3eaefd81 | 4 | #include "HardwareSerial.h" |
davidprentice | 0:063c3eaefd81 | 5 | //#include "readpixel_kbv.inc" |
davidprentice | 0:063c3eaefd81 | 6 | //#include "graphictest_kbv.inc" |
davidprentice | 0:063c3eaefd81 | 7 | |
davidprentice | 0:063c3eaefd81 | 8 | HardwareSerial serial_kbv(USBTX, USBRX); |
davidprentice | 0:063c3eaefd81 | 9 | |
davidprentice | 0:063c3eaefd81 | 10 | uint32_t millis(void) |
davidprentice | 0:063c3eaefd81 | 11 | { |
davidprentice | 0:063c3eaefd81 | 12 | static Timer t; |
davidprentice | 0:063c3eaefd81 | 13 | static int first = 1; |
davidprentice | 0:063c3eaefd81 | 14 | if (first) first = 0, t.start(); |
davidprentice | 0:063c3eaefd81 | 15 | return t.read_ms(); |
davidprentice | 0:063c3eaefd81 | 16 | } |
davidprentice | 0:063c3eaefd81 | 17 | |
davidprentice | 0:063c3eaefd81 | 18 | uint32_t micros(void) |
davidprentice | 0:063c3eaefd81 | 19 | { |
davidprentice | 0:063c3eaefd81 | 20 | static Timer t; |
davidprentice | 0:063c3eaefd81 | 21 | static int first = 1; |
davidprentice | 0:063c3eaefd81 | 22 | if (first) first = 0, t.start(); |
davidprentice | 0:063c3eaefd81 | 23 | return t.read_us(); |
davidprentice | 0:063c3eaefd81 | 24 | } |
davidprentice | 0:063c3eaefd81 | 25 | |
davidprentice | 0:063c3eaefd81 | 26 | int main(void) |
davidprentice | 0:063c3eaefd81 | 27 | { |
davidprentice | 0:063c3eaefd81 | 28 | setup(); |
davidprentice | 0:063c3eaefd81 | 29 | while (1) { |
davidprentice | 0:063c3eaefd81 | 30 | loop(); |
davidprentice | 0:063c3eaefd81 | 31 | } |
davidprentice | 0:063c3eaefd81 | 32 | return 0; //never happens |
davidprentice | 0:063c3eaefd81 | 33 | } |
davidprentice | 0:063c3eaefd81 | 34 | |
davidprentice | 0:063c3eaefd81 | 35 | #endif |