
Premier TD presentiel
Dependencies: mbed BSP_DISCO_F746NG
Diff: fonctions.cpp
- Revision:
- 2:3070bad3789b
- Parent:
- 1:80d2a1719d10
--- a/fonctions.cpp Wed Oct 21 14:22:59 2020 +0000 +++ b/fonctions.cpp Wed Nov 04 14:42:33 2020 +0000 @@ -2,8 +2,23 @@ #include "stm32746g_discovery_lcd.h" #include "stm32746g_discovery_ts.h" #include "fonctions.h" +#include "image.h" +void AfficheImage(uint32_t Xpos, uint32_t Ypos, uint32_t Largeur, uint32_t Hauteur, const unsigned long *img){ + + uint8_t i=0; + uint8_t j=0; + for (i=0; i<=Hauteur; i++){ + for (j=0; j<= Largeur; j++){ + + BSP_LCD_DrawPixel(Xpos + j, Ypos + i, img[j + i*Largeur] + 0xFF000000); //j + i*Largeur + } + + } + + } + void Page1() { BSP_LCD_Clear(LCD_COLOR_WHITE); @@ -29,6 +44,8 @@ BSP_LCD_SetTextColor(LCD_COLOR_BLACK); BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"Bienvenue", CENTER_MODE); + AfficheImage(10, 10, 200, 124, image); + } void AfficherPage(int NumeroPage)