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: BSP_DISCO_F429ZI LCD_DISCO_F429ZI TS_DISCO_F429ZI mbed
Revision 0:91c6ab790bd7, committed 2015-12-18
- Comitter:
- bcostm
- Date:
- Fri Dec 18 12:58:41 2015 +0000
- Child:
- 1:13cda05abe66
- Commit message:
- Initial version
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BSP_DISCO_F429ZI.lib Fri Dec 18 12:58:41 2015 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/teams/ST/code/BSP_DISCO_F429ZI/#e1d164542663
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LCD_DISCO_F429ZI.lib Fri Dec 18 12:58:41 2015 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/teams/ST/code/LCD_DISCO_F429ZI/#dc55a068bc1a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TS_DISCO_F429ZI.lib Fri Dec 18 12:58:41 2015 +0000 @@ -0,0 +1,1 @@ +TS_DISCO_F429ZI#4f8b6df8e235
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Dec 18 12:58:41 2015 +0000
@@ -0,0 +1,57 @@
+#include "mbed.h"
+#include "TS_DISCO_F429ZI.h"
+#include "LCD_DISCO_F429ZI.h"
+
+LCD_DISCO_F429ZI lcd;
+TS_DISCO_F429ZI ts;
+
+int main()
+{
+ TS_StateTypeDef TS_State;
+ uint16_t x, y;
+ uint8_t text[30];
+ uint8_t status;
+
+ BSP_LCD_SetFont(&Font20);
+
+ lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"TOUCHSCREEN", CENTER_MODE);
+ lcd.DisplayStringAt(0, LINE(6), (uint8_t *)"DEMO", CENTER_MODE);
+ wait(1);
+
+ status = ts.Init(lcd.GetXSize(), lcd.GetYSize());
+
+ if (status != TS_OK)
+ {
+ lcd.Clear(LCD_COLOR_RED);
+ lcd.SetBackColor(LCD_COLOR_RED);
+ lcd.SetTextColor(LCD_COLOR_WHITE);
+ lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"TOUCHSCREEN", CENTER_MODE);
+ lcd.DisplayStringAt(0, LINE(6), (uint8_t *)"INIT FAIL", CENTER_MODE);
+ }
+ else
+ {
+ lcd.Clear(LCD_COLOR_GREEN);
+ lcd.SetBackColor(LCD_COLOR_GREEN);
+ lcd.SetTextColor(LCD_COLOR_WHITE);
+ lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"TOUCHSCREEN", CENTER_MODE);
+ lcd.DisplayStringAt(0, LINE(6), (uint8_t *)"INIT OK", CENTER_MODE);
+ }
+
+ wait(1);
+ lcd.Clear(LCD_COLOR_BLUE);
+ lcd.SetBackColor(LCD_COLOR_BLUE);
+ lcd.SetTextColor(LCD_COLOR_WHITE);
+
+ while(1)
+ {
+
+ ts.GetState(&TS_State);
+ if (TS_State.TouchDetected)
+ {
+ x = TS_State.X;
+ y = TS_State.Y;
+ sprintf((char*)text, "x=%d y=%d ", x, y);
+ lcd.DisplayStringAt(0, LINE(0), (uint8_t *)&text, LEFT_MODE);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Dec 18 12:58:41 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4336505e4b1c \ No newline at end of file