<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>

新聞中心

EEPW首頁(yè) > 嵌入式系統 > 設計應用 > S5PV210(TQ210)學(xué)習筆記——LCD驅動(dòng)編寫(xiě)

S5PV210(TQ210)學(xué)習筆記——LCD驅動(dòng)編寫(xiě)

作者: 時(shí)間:2016-11-28 來(lái)源:網(wǎng)絡(luò ) 收藏

鑒于上面兩個(gè)原因,我們需要配置內核支持Frame buffer和列舉出的三個(gè)函數,另外,內核中并沒(méi)有直接配置支持這三個(gè)函數的選項,權宜之計,修改下drivers/video目錄下的Kconfig文件,在config FB項中添加

  1. selectFB_CFB_FILLRECT
  2. selectFB_CFB_COPYAREA
  3. selectFB_CFB_IMAGEBLIT
添加時(shí)一定保證格式正確,參考下該文件下的其他配置項即可。配置完成后執行make menuconfig作如下配置:
  1. DeviceDrivers--->
  2. Graphicssupport--->
  3. <*>Supportforframebufferdevices--->
配置后保存配置,編譯內核并將編譯好的內核下載到開(kāi)發(fā)板或者NFS運行,同時(shí)將編譯好的LCD驅動(dòng)程序拷貝到開(kāi)發(fā)板運行環(huán)境中進(jìn)行安裝,如果驅動(dòng)文件名為lcd.ko,則執行:
  1. insmodlcd.ko
這時(shí),你可以看到屏幕被重新初始化了。雖然LCD已經(jīng)初始化了,但是不知道如何進(jìn)行測試,可以按照韋東山老師視頻中講述的方法進(jìn)行LCD驅動(dòng)測試,但是我們移植的3.8.3內核默認不支持字庫,還需要作其他配置,我是用畫(huà)線(xiàn)的方式測試的屏幕,這里我講一下我用的測試方法:

(1) 在Linux主機上編譯下面的C++程序

  1. #include
  2. unsignedlongbuffer[480][800]={0};
  3. voidput_long_hex(unsignedlongv){
  4. for(inti=0;i!=4;++i){
  5. std::cout.put(static_cast(0xff&(v>>(8*(3-i)))));
  6. }
  7. }
  8. intmain(){
  9. for(inti=0;i!=480;++i){
  10. buffer[i][0]=0x00ff0000;
  11. buffer[i][799]=0x0000ff00;
  12. }
  13. for(inti=0;i!=800;++i){
  14. buffer[0][i]=0xff000000;
  15. buffer[479][i]=0x00ffff00;
  16. }
  17. for(inti=0;i!=480;++i){
  18. for(intj=0;j!=800;++j){
  19. put_long_hex(buffer[i][j]);
  20. }
  21. }
  22. }
編譯指令如下:
  1. g++-omainmain.cpp
然后如下方式執行程序:
  1. ./main>/nfsroot/rootfs/test.img
我是直接將文件生成在NFS的根文件系統下了,你也可以用其他方式將生成的文件拷貝到開(kāi)發(fā)板運行環(huán)境內,然后執行如下指令:
  1. cattest.img>/dev/fb0
這時(shí),就可以在屏幕上看到一個(gè)矩形且矩形的四條邊顏色不相同。

如果想將驅動(dòng)編譯進(jìn)內核,并在啟動(dòng)時(shí)可以看到小企鵝,可以將上面的驅動(dòng)拷貝到內核的drivers/video/目錄下,命名為tq210_fb.c,然后在該目錄下做如下修改:

(1)修改Kconfig,添加TQ210的LCD驅動(dòng)配置選項

在config FB_S4C項的后面添加如下內容:

  1. configFB_TQ210
  2. tristate"TQ210lcdsupport"
  3. dependsonFB
  4. selectFB_CFB_FILLRECT
  5. selectFB_CFB_COPYAREA
  6. selectFB_CFB_IMAGEBLIT
  7. ---help---
  8. CurrentlythesuportisonlyfortheTQ210
(2)修改Makefile,添加如下內容:
  1. obj-$(CONFIG_FB_TQ210)+=tq210_fb.o

(3)退回到內核根目錄下,執行make menuconfig并按如下方式配置內核

  1. DeviceDrivers--->
  2. Graphicssupport--->
  3. <*>Supportforframebufferdevices--->
  4. <*>TQ210lcdsupport
  5. [*]Bootuplogo--->
  6. [*]StandardblackandwhiteLinuxlogo
  7. [*]Standard16-colorLinuxlogo
  8. [*]Standard224-colorLinuxlogo

然后執行指令make zImage或者make uImage來(lái)編譯內核,將編譯好的內核燒寫(xiě)到開(kāi)發(fā)板或者是放到NFS下即可正常運行。

如果您在開(kāi)發(fā)或配置過(guò)程遇到什么問(wèn)題可以留言討論。


上一頁(yè) 1 2 3 下一頁(yè)

關(guān)鍵詞: S5PV210LCD驅動(dòng)編

評論


技術(shù)專(zhuān)區

關(guān)閉
国产精品自在自线亚洲|国产精品无圣光一区二区|国产日产欧洲无码视频|久久久一本精品99久久K精品66|欧美人与动牲交片免费播放
<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>