二.LCD测试
程序目录stm32cubef4\STM32Cube_FW_F4_V1.10.0\Projects\STM32469I-Discovery\Examples\DMA2D\DMA2D_MemToMemWithBlending\Src\main.c
部分参考代码如下:
/*##-1- Initialize the SDRAM ##############################################*/
BSP_SDRAM_Init();
/*##-2- Initialize the LCD #################################################*/
/* Proceed to LTDC, DSI initialization and LCD screen initialization
* with the configuration filled in above */
lcd_status = BSP_LCD_Init();
BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS);
OnError_Handler(lcd_status != LCD_OK);
/* Prepare using DMA2D the 800x480 LCD frame buffer to display background color black */
/* and title of the example */
BSP_LCD_Clear(LCD_COLOR_BLUE);///屏幕清屏颜色
BSP_LCD_SetTextColor(LCD_COLOR_WHITE);///字符颜色
BSP_LCD_SetBackColor(LCD_COLOR_BLUE);///背景颜色
BSP_LCD_SetFont(&Font24);/// 字符大小
/* Print example description */
BSP_LCD_DisplayStringAt(0, 100, (uint8_t *)"bbs.21ic.com", CENTER_MODE);///字符串显示,网站
BSP_LCD_DisplayStringAt(0, 200, (uint8_t *)"yang96381@163.com", CENTER_MODE);///字符串显示,邮箱
BSP_LCD_FillCircle(400, 360, 90);///画圆
BSP_LCD_DrawHLine(0, 0, 800);///画线
HAL_Delay(100);
while(1);
|