此文基於stm32f429原子的例程,stm32f429自帶ltdc
液晶控制器,底層驅動在"ltdc.c"中配置。
1. 在不用emwin顯示的情況下,如果想任意設定螢幕的顯示方向,則應該更改檔案"ltdc.c"中的打點函式,想怎麼顯示修改**
lcdltdc.pixsize*(lcdltdc.pwidth*y+x)
lcdltdc.pixsize*(lcdltdc.pwidth*(lcdltdc.pheight-x)+y)
lcdltdc.pixsize*(lcdltdc.pwidth*(272-y)+(480-x))
lcdltdc.pixsize*(lcdltdc.pwidth*(lcdltdc.pheight-x-1)+y)
//畫點函式
//x,y:座標
//color:顏色值
void ltdc_draw_point(u16 x,u16 y,u32 color)
else //豎屏
#else
if(lcdltdc.dir) //橫屏
else //豎屏
#endif
}
2.使用emwin時,應該在emwin的相應的lcd配置檔案lcdconf_中修改lcd_x_config()函式,參考emwin5手冊中的「顯示驅動」一章節中的「通過函式配置顯示方向」這一節,大概在800多頁。
修改**
gui_setorientation(gui_swap_xy|gui_mirror_y);
gui_setorientation(gui_mirror_x|gui_mirror_y);
//配置程式,用於建立顯示驅動器件,設定顏色轉換程式和顯示尺寸
void lcd_x_config(void)
else //橫屏
gui_touch_calibrate(gui_coord_x,0,lcddev.width,0,lcddev.width-1);
gui_touch_calibrate(gui_coord_y,0,lcddev.height,0,lcddev.height-1);
#if (gui_num_layers>1)
//設定第二層
gui_device_createandlink(display_driver_1,color_conversion_1,0,1);
gui_selectlayer(1); //選中第1層
if(lcddev.dir==0)//豎屏
else //橫屏
gui_touch_calibrate(gui_coord_x,0,lcddev.width,0,lcddev.width-1);
gui_touch_calibrate(gui_coord_y,0,lcddev.height,0,lcddev.height-1);
#endif
layer_prop[0].address=lcd_layer0_frame_buffer; //緩衝區
#if (gui_num_layers>1)
layer_prop[1].address=lcd_layer1_frame_buffer;
#endif
for (i=0;i> 3;
lcd_setdevfunc(i,lcd_devfunc_copybuffer,(void(*)(void))custom_copybuffer);
lcd_setdevfunc(i,lcd_devfunc_copyrect,(void(*)(void))custom_copyrect);
if (lcd_ll_getpixelformat(i)<=ltdc_pixel_format_argb4444)
if(lcd_ll_getpixelformat(i)==ltdc_pixel_format_rgb565)
guicc_m1555i_setcustcolorconv(color2indexbulk_m1555idma2d,index2colorbulk_m1555idma2d);
//guicc_m565_setcustcolorconv(color2indexbulk_m565dma2d,index2colorbulk_m565dma2d);
guicc_m4444i_setcustcolorconv(color2indexbulk_m4444idma2d,index2colorbulk_m4444idma2d);
guicc_m888_setcustcolorconv(color2indexbulk_m888dma2d,index2colorbulk_m888dma2d);
guicc_m8888i_setcustcolorconv(color2indexbulk_m8888idma2d,index2colorbulk_m8888idma2d);
gui_setfuncalphablending(dma2d_alphablending);
gui_setfuncgetppalconvtable(_lcd_getppalconvtable);
gui_setfuncmixcolors(dma2d_mixcolors);
gui_setfuncmixcolorsbulk(lcd_mixcolorsbulk);
}}
人屏互動是LED顯示屏未來發展的重要方向
隨著小間距的興起,驅動ic的重要性進一步凸顯,其引發的關注度也越來越高,驅動ic又該如何調整適應新的角色?幕前幕後 的真正內涵 其次,小間距的興起引發的是與lcd液晶 dlp背投等傳統室內拼接大屏的直面競爭,但是目前來講,無論是技術 點間距 lcd液晶點間距可以做到 p0.6 還是成本,小間距都是處...
Winform多顯示屏顯示
一台主機連線了2臺顯示器 2個顯示卡 要求乙個程式的兩個窗體在不同的顯示器上顯示 顯示器1 顯示from1,顯示器2 顯示from2。及說明如下 form1不需要變更 from2新增如下 方法一 from2 frm2 new from2 if screen.allscreens.count 1 方法...
筆記 顯示屏LCD
之前有個屏廠家講過背光液晶屏的原理,液晶是特殊狀態。可能不太記得講了什麼,也沒留下ppt,遺憾。後來有一樣機,裝過,觸控螢幕是薄薄一層,下面是顯示屏,從物理上是分離的。這次從網上收集資料,先學習一下顯示屏是什麼。現在,pc顯示屏已經有led 發光方式 屏了。但是貌似手機都是lcd 背光方式 lcd ...