LTDC_Layer_InitTypeDef LTDC_Layer_InitStruct;
LTDC_Layer_InitStruct.LTDC_HorizontalStart = HBP+1 +x ;
LTDC_Layer_InitStruct.LTDC_HorizontalStop = HBP +x+w; //ÏÔê¾»o′æÇø′óD¡ XÖá
LTDC_Layer_InitStruct.LTDC_VerticalStart = VBP+1 +y;
LTDC_Layer_InitStruct.LTDC_VerticalStop = VBP +y+h; //ÏÔê¾»o′æÇø′óD¡ YÖá
LTDC_Layer_InitStruct.LTDC_PixelFormat = LTDC_Pixelformat_RGB565; //í¼Æ¬ààDí Y
LTDC_Layer_InitStruct.LTDC_ConstantAlpha = 255; //í¸Ã÷¶è ×î′ó255
LTDC_Layer_InitStruct.LTDC_BlendingFactor_1 = LTDC_BlendingFactor1_CA;
LTDC_Layer_InitStruct.LTDC_BlendingFactor_2 = LTDC_BlendingFactor2_CA;
LTDC_Layer_InitStruct.LTDC_DefaultColorBlue = 0;
LTDC_Layer_InitStruct.LTDC_DefaultColorGreen = 0;
LTDC_Layer_InitStruct.LTDC_DefaultColorRed = 0;
LTDC_Layer_InitStruct.LTDC_DefaultColorAlpha = 0;
//ÿ¸ölayer¶¼óDò»¸öÏÔê¾»o3åÇøframebuffer
LTDC_Layer_InitStruct.LTDC_CFBLineLength = ((w * 2) + 3); //Ëù¶Ôó|μÄ»o3åÇø¿í¶è £¬òÔ×Ö½úÎaμ¥λ
LTDC_Layer_InitStruct.LTDC_CFBPitch = (LCDX * 2); //′óÕaò»DDÆeê¼μ½ÏÂò»DDÆeê¼Ëù¾-1yμÄ×Ö½úêyyD Dèòa¸ÄÎaw
LTDC_Layer_InitStruct.LTDC_CFBLineNumber = h; //¶Ôó|μÄ»o3åÇø¸ß¶è
LTDC_Layer_InitStruct.LTDC_CFBStartAdress = (uint32_t)name; //ÕaêÇμúò»2ãμÄí¼Æ¬êy×é gImage_gg
LTDC_LayerInit(LTDC_Layer1, <DC_Layer_InitStruct); //3õê¼»ˉí¼2ã1
LTDC_LayerCmd(LTDC_Layer1, ENABLE); //í¼2ãò»ê1Äü
LTDC_ReloadConfig(LTDC_IMReload); 执行这个函数图片就直接显示出来了。
一周热门 更多>