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: BSP_DISCO_L496AG
main.cpp
00001 #include "mbed.h" 00002 #include "stm32l496g_discovery_lcd.h" 00003 00004 int main() 00005 { 00006 printf("\nSTART DISCO L496AG LCD EXAMPLE\n"); 00007 00008 BSP_LCD_Init(); 00009 00010 while(1) { 00011 BSP_LCD_SetFont(&Font12); 00012 BSP_LCD_Clear(LCD_COLOR_MAGENTA); 00013 BSP_LCD_SetBackColor(LCD_COLOR_MAGENTA); 00014 BSP_LCD_SetTextColor(LCD_COLOR_ORANGE); 00015 BSP_LCD_DisplayStringAt(0, LINE(4), (uint8_t *)"DISCO_L496AG", CENTER_MODE); 00016 BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"LCD DEMO", CENTER_MODE); 00017 BSP_LCD_DisplayStringAt(0, LINE(6), (uint8_t *)"FONT12", CENTER_MODE); 00018 ThisThread::sleep_for(2000); 00019 00020 BSP_LCD_SetFont(&Font16); 00021 BSP_LCD_Clear(LCD_COLOR_RED); 00022 BSP_LCD_SetBackColor(LCD_COLOR_RED); 00023 BSP_LCD_SetTextColor(LCD_COLOR_YELLOW); 00024 BSP_LCD_DisplayStringAt(0, LINE(4), (uint8_t *)"DISCO_L496AG", CENTER_MODE); 00025 BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"LCD DEMO", CENTER_MODE); 00026 BSP_LCD_DisplayStringAt(0, LINE(6), (uint8_t *)"FONT16", CENTER_MODE); 00027 ThisThread::sleep_for(2000); 00028 00029 BSP_LCD_SetFont(&Font20); 00030 BSP_LCD_Clear(LCD_COLOR_GREEN); 00031 BSP_LCD_SetBackColor(LCD_COLOR_GREEN); 00032 BSP_LCD_SetTextColor(LCD_COLOR_BLACK); 00033 BSP_LCD_DisplayStringAt(0, LINE(4), (uint8_t *)"DISCO_L496AG", CENTER_MODE); 00034 BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"LCD DEMO", CENTER_MODE); 00035 BSP_LCD_DisplayStringAt(0, LINE(6), (uint8_t *)"FONT20", CENTER_MODE); 00036 ThisThread::sleep_for(2000); 00037 00038 BSP_LCD_Clear(LCD_COLOR_BLUE); 00039 BSP_LCD_SetBackColor(LCD_COLOR_BLUE); 00040 BSP_LCD_SetTextColor(LCD_COLOR_WHITE); 00041 BSP_LCD_SetFont(&Font24); 00042 BSP_LCD_DisplayStringAt(0, LINE(4), (uint8_t *)"DISCO_L496AG", CENTER_MODE); 00043 BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"LCD DEMO", CENTER_MODE); 00044 BSP_LCD_DisplayStringAt(0, LINE(6), (uint8_t *)"FONT24", CENTER_MODE); 00045 ThisThread::sleep_for(2000); 00046 } 00047 }
Generated on Tue Jul 19 2022 01:25:43 by
1.7.2