Interfaçage NeoPixel Ring 12, LPRO MECSE, Arnaud A.
Revision 0:8d73f4071c1a, committed 2020-06-17
- Comitter:
- Rhamao
- Date:
- Wed Jun 17 16:34:01 2020 +0000
- Commit message:
- View1 finie
Changed in this revision
lcd.cpp | Show annotated file Show diff for this revision Revisions of this file |
lcd.h | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lcd.cpp Wed Jun 17 16:34:01 2020 +0000 @@ -0,0 +1,24 @@ +#include "lcd.h" + + +LCD::LCD(){ +} + +void LCD::initLCD(){ + uint8_t status; + + BSP_LCD_Init(); //Initialise le LCD + BSP_LCD_LayerDefaultInit(LTDC_ACTIVE_LAYER, LCD_FB_START_ADDRESS); + BSP_LCD_SelectLayer(LTDC_ACTIVE_LAYER); + + status = BSP_TS_Init(BSP_LCD_GetXSize(), BSP_LCD_GetYSize()); + if (status != TS_OK) { + BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"TOUCHSCREEN INIT FAIL", CENTER_MODE); + while (1); + } else { + BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"TOUCHSCREEN INIT OK", CENTER_MODE); + } + + HAL_Delay(100); + BSP_LCD_SetFont(&Font12); +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lcd.h Wed Jun 17 16:34:01 2020 +0000 @@ -0,0 +1,13 @@ +#ifndef LCD_H +#define LCD_H +#include "stm32746g_discovery_lcd.h" +#include "stm32746g_discovery_ts.h" + +class LCD +{ + public: + LCD(); + void initLCD(); +}; + +#endif