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
Diff: fonctions.cpp
- Revision:
- 1:80d2a1719d10
- Child:
- 2:3070bad3789b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fonctions.cpp Wed Oct 21 14:22:59 2020 +0000
@@ -0,0 +1,67 @@
+#include "mbed.h"
+#include "stm32746g_discovery_lcd.h"
+#include "stm32746g_discovery_ts.h"
+#include "fonctions.h"
+
+
+void Page1()
+{
+ BSP_LCD_Clear(LCD_COLOR_WHITE);
+ BSP_LCD_SetBackColor(LCD_COLOR_WHITE);
+ BSP_LCD_SetTextColor(LCD_COLOR_BLACK);
+ BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"Page1", CENTER_MODE);
+}
+
+
+void Page2()
+{
+ BSP_LCD_Clear(LCD_COLOR_ORANGE);
+ BSP_LCD_SetBackColor(LCD_COLOR_GREEN);
+ BSP_LCD_SetTextColor(LCD_COLOR_BLACK);
+ BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"Page2", CENTER_MODE);
+
+}
+
+void Bienvenue()
+{
+ BSP_LCD_Clear(LCD_COLOR_WHITE);
+ BSP_LCD_Clear(LCD_COLOR_WHITE);
+ BSP_LCD_SetTextColor(LCD_COLOR_BLACK);
+ BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"Bienvenue", CENTER_MODE);
+
+}
+
+void AfficherPage(int NumeroPage)
+{
+
+ switch(NumeroPage) {
+ case 0 :
+ Bienvenue();
+
+ break;
+ case 1 :
+ Page1();
+
+ break;
+ case 2 :
+ Page2();
+ printf("Affichage page %d\n", NumeroPage);
+
+ break;
+
+ //case 4 :
+ // printf("Affichage page %d\n", NumeroPage);
+ // break;
+ default :
+ PageErreur();
+ printf("erreur appel AfficherPage %d", NumeroPage);
+
+ }
+}
+
+void PageErreur(){
+ BSP_LCD_Clear(LCD_COLOR_BLUE);
+ BSP_LCD_SetBackColor(LCD_COLOR_BLUE);
+ BSP_LCD_SetTextColor(LCD_COLOR_BLACK);
+ BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"ERREUR", CENTER_MODE);
+ }
\ No newline at end of file