![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
TFT_Touch_Menu_Encoder
Dependencies: mbed TouchScreen_kbv_mbed MCUFRIEND_kbv_R299 GLUE_STUFF_kbv EncoderAli ADA_GFX_kbv_R1107
main_glue.cpp@0:063c3eaefd81, 2021-04-27 (annotated)
- Committer:
- davidprentice
- Date:
- Tue Apr 27 07:03:31 2021 +0000
- Revision:
- 0:063c3eaefd81
initial commit
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 |