Team Projet / Mbed 2 deprecated Projet_Test

Dependencies:   mbed BSP_DISCO_F746NG

Files at this revision

API Documentation at this revision

Comitter:
valentin__
Date:
Wed Oct 14 16:11:49 2020 +0000
Child:
1:80d2a1719d10
Commit message:
Premier TD presentiel

Changed in this revision

BSP_DISCO_F746NG.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /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