LCD demo using ST BSP driver

Dependencies:   BSP_DISCO_L496AG

Committer:
bcostm
Date:
Mon Mar 26 11:16:09 2018 +0200
Revision:
0:378633dfeb25
Child:
3:ff6ab501ecb0
add main.cpp

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bcostm 0:378633dfeb25 1 #include "mbed.h"
bcostm 0:378633dfeb25 2 #include "stm32l496g_discovery_lcd.h"
bcostm 0:378633dfeb25 3
bcostm 0:378633dfeb25 4 int main()
bcostm 0:378633dfeb25 5 {
bcostm 0:378633dfeb25 6 BSP_LCD_Init();
bcostm 0:378633dfeb25 7
bcostm 0:378633dfeb25 8 /* Clear the LCD */
bcostm 0:378633dfeb25 9 BSP_LCD_Clear(LCD_COLOR_WHITE);
bcostm 0:378633dfeb25 10
bcostm 0:378633dfeb25 11 BSP_LCD_DisplayStringAt(0, LINE(1), (uint8_t *)"MBED EXAMPLE", CENTER_MODE);
bcostm 0:378633dfeb25 12 wait(2);
bcostm 0:378633dfeb25 13 BSP_LCD_Clear(LCD_COLOR_GREEN);
bcostm 0:378633dfeb25 14 BSP_LCD_SetBackColor(LCD_COLOR_GREEN);
bcostm 0:378633dfeb25 15 BSP_LCD_SetTextColor(LCD_COLOR_BLACK);
bcostm 0:378633dfeb25 16 BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"DISCO_L496AG", CENTER_MODE);
bcostm 0:378633dfeb25 17
bcostm 0:378633dfeb25 18 while(1) {
bcostm 0:378633dfeb25 19 }
bcostm 0:378633dfeb25 20 }