Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SimpleGUI SimpleGUITouchScreen TouchScreen UniGraphic mbed-rtos mbed
main.h@1:ece0ecedf40a, 2016-03-27 (annotated)
- Committer:
- duncanFrance
- Date:
- Sun Mar 27 14:42:53 2016 +0000
- Revision:
- 1:ece0ecedf40a
- Parent:
- 0:402fb0c36182
Updated to use FontRenderer
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
duncanFrance | 0:402fb0c36182 | 1 | #include "mbed.h" |
duncanFrance | 0:402fb0c36182 | 2 | #include "rtos.h" |
duncanFrance | 0:402fb0c36182 | 3 | |
duncanFrance | 0:402fb0c36182 | 4 | #include "Arial12x12.h" |
duncanFrance | 0:402fb0c36182 | 5 | #include "Arial24x23.h" |
duncanFrance | 0:402fb0c36182 | 6 | #include "ILI932x.h" |
duncanFrance | 1:ece0ecedf40a | 7 | #include "SimpleGUI.h" |
duncanFrance | 0:402fb0c36182 | 8 | #include "TouchScreenEventSource.h" |
duncanFrance | 0:402fb0c36182 | 9 | |
duncanFrance | 0:402fb0c36182 | 10 | |
duncanFrance | 0:402fb0c36182 | 11 | #define LCD_X_RES 240 |
duncanFrance | 0:402fb0c36182 | 12 | #define LCD_Y_RES 320 |
duncanFrance | 0:402fb0c36182 | 13 | |
duncanFrance | 0:402fb0c36182 | 14 | #define LCD_CS PH_0 |
duncanFrance | 0:402fb0c36182 | 15 | #define LCD_RESET PH_1 |
duncanFrance | 0:402fb0c36182 | 16 | #define LCD_RS PA_0 |
duncanFrance | 0:402fb0c36182 | 17 | #define LCD_WR PA_1 |
duncanFrance | 0:402fb0c36182 | 18 | #define LCD_RD PA_4 |
duncanFrance | 0:402fb0c36182 | 19 | |
duncanFrance | 0:402fb0c36182 | 20 | |
duncanFrance | 0:402fb0c36182 | 21 | #define T_CLK PC_10 |
duncanFrance | 0:402fb0c36182 | 22 | #define T_DIN PC_12 |
duncanFrance | 0:402fb0c36182 | 23 | #define T_DOUT PC_11 |
duncanFrance | 0:402fb0c36182 | 24 | #define T_CS PC_8 |
duncanFrance | 0:402fb0c36182 | 25 | #define T_IRQ PB_9 |
duncanFrance | 0:402fb0c36182 | 26 | |
duncanFrance | 0:402fb0c36182 | 27 | /** |
duncanFrance | 0:402fb0c36182 | 28 | * My touch screen lies at a slight angle and hides some of the screen |
duncanFrance | 0:402fb0c36182 | 29 | * Adjust this value as needed until the calibration dots are visible on your screen |
duncanFrance | 0:402fb0c36182 | 30 | **/ |
duncanFrance | 0:402fb0c36182 | 31 | #define CAL_OFFSET 4 |
duncanFrance | 0:402fb0c36182 | 32 | |
duncanFrance | 0:402fb0c36182 | 33 | /** |
duncanFrance | 0:402fb0c36182 | 34 | * hand-crafted values for the touch-screen calibration |
duncanFrance | 0:402fb0c36182 | 35 | **/ |
duncanFrance | 0:402fb0c36182 | 36 | #define TOUCH_X_MIN 540 |
duncanFrance | 0:402fb0c36182 | 37 | #define TOUCH_X_MAX 3700 |
duncanFrance | 0:402fb0c36182 | 38 | #define TOUCH_Y_MIN 340 |
duncanFrance | 0:402fb0c36182 | 39 | #define TOUCH_Y_MAX 3656 |