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 11:0fac3f2241c1, committed 2020-10-21
- Comitter:
- mylene
- Date:
- Wed Oct 21 14:53:21 2020 +0000
- Parent:
- 10:52e9c3c1f118
- Commit message:
- m;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BSP_DISCO_F746NG.lib Wed Oct 21 14:53:21 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/fonctions.h Wed Oct 21 14:53:21 2020 +0000 @@ -0,0 +1,8 @@ +#include "mbed.h" +#include "stm32746g_discovery_lcd.h" +#include "stm32746g_discovery_ts.h" + +void AfficherPage(int); +void Page1(void); +void Page2(void); +void PageErreur(void); \ No newline at end of file
--- a/main.cpp Wed Oct 14 14:29:50 2020 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -//test modif Valentin 2 -//test modif Emile -//test modif Quentin -//test modif Mylene \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/testrectangles.cpp Wed Oct 21 14:53:21 2020 +0000
@@ -0,0 +1,97 @@
+#include "mbed.h"
+#include "stm32746g_discovery_lcd.h"
+#include "stm32746g_discovery_ts.h"
+#include "fonctions.h"
+
+void Page1()
+{
+ BSP_LCD_Init(); //initialise l'écran LCD
+ BSP_LCD_LayerDefaultInit(LTDC_ACTIVE_LAYER, LCD_FB_START_ADDRESS);
+ BSP_LCD_SelectLayer(LTDC_ACTIVE_LAYER);
+
+ BSP_LCD_Clear(LCD_COLOR_BLACK); //reset l'écran en fond noir
+ BSP_LCD_SetFont(&LCD_DEFAULT_FONT);
+ BSP_LCD_SetBackColor(LCD_COLOR_BLACK);//fond de l'écriture en noir
+ BSP_LCD_SetTextColor(LCD_COLOR_ORANGE); //couleur de l'écriture
+ BSP_LCD_DisplayStringAt(0, 135, (uint8_t *)"BIENVENUE", CENTER_MODE); //affichage de BIENVENUE
+
+ BSP_LCD_Clear(LCD_COLOR_BLACK);
+ BSP_LCD_SetTextColor(LCD_COLOR_BLUE);
+ BSP_LCD_FillRect(4, 4, 138, 129);
+ BSP_LCD_SetTextColor(LCD_COLOR_BROWN);
+ BSP_LCD_FillRect(146, 4, 138, 129);
+ BSP_LCD_SetTextColor(LCD_COLOR_YELLOW);
+ BSP_LCD_FillRect(288, 4, 138, 129);
+ BSP_LCD_SetTextColor(LCD_COLOR_RED);
+ BSP_LCD_FillRect(4, 137, 138, 129);
+ BSP_LCD_SetTextColor(LCD_COLOR_ORANGE);
+ BSP_LCD_FillRect(146, 137, 138, 129);
+ BSP_LCD_SetTextColor(LCD_COLOR_GREEN);
+ BSP_LCD_FillRect(288, 137, 138, 129);
+
+ BSP_LCD_SetTextColor(LCD_COLOR_GREEN);
+ BSP_LCD_FillRect(435, 5, 45, 50);
+ BSP_LCD_SetTextColor(LCD_COLOR_WHITE);
+ BSP_LCD_FillRect(435, 65, 45, 65);
+ BSP_LCD_SetTextColor(LCD_COLOR_WHITE);
+ BSP_LCD_FillRect(435, 137, 45, 65);
+ BSP_LCD_SetTextColor(LCD_COLOR_BROWN);
+ BSP_LCD_FillRect(435, 215, 45, 50);
+}
+
+
+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