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: mbed BSP_DISCO_F746NG
Revision 0:816f0e6362c5, committed 2020-10-14
- Comitter:
- valentin__
- Date:
- Wed Oct 14 16:11:49 2020 +0000
- Child:
- 1:80d2a1719d10
- Commit message:
- Premier TD presentiel
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BSP_DISCO_F746NG.lib Wed Oct 14 16:11:49 2020 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/teams/ST/code/BSP_DISCO_F746NG/#85dbcff443aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Oct 14 16:11:49 2020 +0000
@@ -0,0 +1,41 @@
+#include "mbed.h"
+#include "stm32746g_discovery_lcd.h"
+#include "stm32746g_discovery_ts.h"
+
+int main() {
+ uint8_t status;
+ uint16_t x, y;
+ BSP_LCD_Init();
+ BSP_LCD_LayerDefaultInit(LTDC_ACTIVE_LAYER, LCD_FB_START_ADDRESS);
+ BSP_LCD_SelectLayer(LTDC_ACTIVE_LAYER);
+
+ BSP_LCD_Clear(LCD_COLOR_RED);
+ BSP_LCD_SetBackColor(LCD_COLOR_WHITE);
+ BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"BIENVENUE", CENTER_MODE);
+ TS_StateTypeDef TS_State;
+
+ status = BSP_TS_Init(BSP_LCD_GetXSize(), BSP_LCD_GetYSize());
+ while (1){
+ BSP_TS_GetState(&TS_State);
+ if (TS_State.touchDetected) {
+
+ BSP_LCD_Clear(LCD_COLOR_BLACK);
+ BSP_LCD_SetBackColor(LCD_COLOR_WHITE);
+ BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"PAGE1", CENTER_MODE);
+ x = TS_State.touchX[0];
+ y = TS_State.touchY[0];
+ if (x<= 237){
+ BSP_LCD_Clear(LCD_COLOR_BLACK);
+ BSP_LCD_SetBackColor(LCD_COLOR_WHITE);
+ BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"BIENVENU", CENTER_MODE);
+ }
+ else{
+ BSP_LCD_Clear(LCD_COLOR_BLACK);
+ BSP_LCD_SetBackColor(LCD_COLOR_WHITE);
+ BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"PAGE2", CENTER_MODE);
+ }
+
+ }
+
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Oct 14 16:11:49 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file