📄 2_6内核lcd驱动移植 - 我的文章 - we need more tips.htm
字号:
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/mdate.js"></SCRIPT>
<SCRIPT language=javascript>var arrArtdate=new Array('20070129','20070130','20070131','20070201','20070206','20070208','20070209','20070316','20070417','20070607','20070707','20070717','20070814','20070815');initial("ttdiv");</SCRIPT>
</TD></TR>
<TR>
<TD bgColor=#d2dee2 height=1></TD></TR>
<TR>
<TD bgColor=#ffffff height=1></TD></TR>
<TR>
<TD align=middle bgColor=#edf2f2 height=25>
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#111111
cellSpacing=0 cellPadding=0 width=200 border=0>
<TBODY>
<TR>
<TD align=middle width=180><FONT style="FONT-SIZE: 10pt"
color=#1f72d0><B>我的分类</B></FONT></TD>
<TD width=20><IMG title=收起
onclick="ShowHideDiv('lefttree',this);return false;"
src="C:\Documents and Settings\tip\桌面\新建文件夹\2_6内核LCD驱动移植 - 我的文章 - we need more tips.files\dot2(1).gif"
border=0></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD bgColor=#d2dee2 height=1></TD></TR>
<TR>
<TD bgColor=#ffffff height=1></TD></TR>
<TR>
<TD style="COLOR: #02368d" bgColor=#f3f6f6>
<SCRIPT
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/tree.js"></SCRIPT>
<DIV id=lefttree
style="SCROLLBAR-FACE-COLOR: #eeeeee; SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; OVERFLOW: auto; SCROLLBAR-SHADOW-COLOR: #cccccc; SCROLLBAR-3DLIGHT-COLOR: #d1d7dc; SCROLLBAR-ARROW-COLOR: #006699; SCROLLBAR-TRACK-COLOR: #cccccc; SCROLLBAR-DARKSHADOW-COLOR: #eedfe7"></DIV>
<SCRIPT language=javascript>ContentsTree = new CTree("ContentsTree");ContentsTree.bAutoClose = false;ContentsTree.stTarget = "";a0 = ContentsTree.AddNode(null, "我的文章分类", "article.html");a0.bOpen=true;p0 = ContentsTree.AddNode(null, "我的图片分类", "photo.html");p0.bOpen=true;f0 = ContentsTree.AddNode(null, "我的链接分类", "links.html");f0.bOpen=true;m0 = ContentsTree.AddNode(null, "我的音乐分类", "music.html");m0.bOpen=true; //document.write(ContentsTree.GetHTMLCode());document.getElementById("lefttree").innerHTML=ContentsTree.GetHTMLCode();</SCRIPT>
</TD></TR>
<TR>
<TD bgColor=#d2dee2 height=1></TD></TR>
<TR>
<TD bgColor=#ffffff height=1></TD></TR>
<TR>
<TD><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/left_bg_bottom.gif"
border=0></TD></TR></TBODY></TABLE></TD>
<TD width=10></TD>
<TD vAlign=top align=middle><BR>
<TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0
width="100%" border=0>
<TBODY>
<TR>
<TD width=11 height=11><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/g_left_top.gif"
border=0></TD>
<TD width="99%" bgColor=#dddddd height=11></TD>
<TD width=11 height=11><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/g_right_top.gif"
border=0></TD></TR>
<TR>
<TD vAlign=top align=middle width="100%" bgColor=#dddddd
colSpan=3><BR>
<TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0
width="96%" border=0>
<TBODY>
<TR>
<TD width=7 height=7><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/w_left_top.gif"
border=0></TD>
<TD width="100%" bgColor=#f3f3f3></TD>
<TD width=7 height=7><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/w_right_top.gif"
border=0></TD></TR>
<TR>
<TD align=middle bgColor=#f3f3f3 colSpan=3>
<TABLE
style="BORDER-COLLAPSE: collapse; WORD-WRAP: break-word"
cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD align=middle height=25><FONT style="FONT-SIZE: 14pt"
color=#02368d><B>2.6内核LCD驱动移植</B></FONT></B></FONT><BR></TD></TR>
<TR>
<TD bgColor=#d2dee2 height=1></TD></TR>
<TR>
<TD bgColor=#ffffff height=1></TD></TR>
<TR>
<TD align=middle>
<TABLE
style="BORDER-COLLAPSE: collapse; WORD-WRAP: break-word"
cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width="100%">
<DIV id=art style="MARGIN: 15px" width="100%">
<DIV>
<TABLE style="BORDER-COLLAPSE: collapse"
borderColor=#dddddd cellSpacing=0 cellPadding=0
width=360 align=center border=1>
<TBODY>
<TR height=60>
<TD align=middle width=60><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/rar.gif"
border=0></TD>
<TD>
<TABLE style="BORDER-COLLAPSE: collapse"
cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR height=20>
<TD align=middle width=40>文件:</TD>
<TD>s3c2410fb_driver.rar</TD></TR>
<TR height=20>
<TD align=middle width=40>大小:</TD>
<TD>7KB</TD></TR>
<TR height=20>
<TD align=middle width=40>下载:</TD>
<TD><A
href="http://blog.chinaunix.net/upfile/070815002732.rar">下载</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV>
<DIV>开发板nano2410上带了一块三星的LTV350QV-F05触摸屏,之前已经把触摸屏的驱动移植上去了,并能在</DIV>
<DIV>MINICOM上显示调试信息,x,y的坐标。后来移植qtopia的时候才弄明白,触摸驱动和LCD驱动是两回事,都</DIV>
<DIV>需要移植。原来开发板上带的驱动是针对2.4内核,现在使用2.6内核,这款lcd的特点是驱动ic内置在lcd模</DIV>
<DIV>块上,所以不用外接lpc3600等驱动ic.它提供一个60
pin的软平线接口出来.这个接口和2410可以直接连</DIV>
<DIV>接.接口内包含一个spi口,用来给lcd模块写寄存器,初始化lcd模块.因此,2.6.14的驱动内需要加上一些代</DIV>
<DIV>码来完成这项工作.可能某些lcd是不需要这个初始化的,那样的话移植会更简单.<BR>下面是需要修改的文件:</DIV>
<DIV>在/linux/arch/arm/mach-s3c2410/mach-smdk2410.c中添加如下内容。</DIV>
<DIV>static struct s3c2410fb_mach_info
smdk2410_lcdcfg __initdata =
{<BR> .regs = {<BR> .lcdcon1
= S3C2410_LCDCON1_TFT16BPP |
\<BR> S3C2410_LCDCON1_TFT |
\<BR> S3C2410_LCDCON1_CLKVAL(0x03),</DIV>
<DIV> .lcdcon2
= S3C2410_LCDCON2_VBPD(3) |
\<BR> S3C2410_LCDCON2_LINEVAL(239)
|
\<BR> S3C2410_LCDCON2_VFPD(5)
|
\<BR> S3C2410_LCDCON2_VSPW(15),</DIV>
<DIV> .lcdcon3
= S3C2410_LCDCON3_HBPD(5) |
\<BR> S3C2410_LCDCON3_HOZVAL(319)
|
\<BR> S3C2410_LCDCON3_HFPD(15),</DIV>
<DIV> .lcdcon4
= S3C2410_LCDCON4_MVAL(13) |
\<BR> S3C2410_LCDCON4_HSPW(8),</DIV>
<DIV> .lcdcon5
= S3C2410_LCDCON5_FRM565
|<BR> S3C2410_LCDCON5_INVVLINE
|<BR> S3C2410_LCDCON5_INVVFRAME
|<BR> S3C2410_LCDCON5_PWREN
|<BR> S3C2410_LCDCON5_HWSWP,<BR> },</DIV>
<DIV> .lpcsel = 0xf82,</DIV>
<DIV> .gpccon
= 0xaa955699,<BR> .gpccon_mask
= 0xffc003cc,<BR> .gpcup
= 0x0000ffff,<BR> .gpcup_mask
= 0xffffffff,</DIV>
<DIV> .gpdcon
= 0xaa95aaa1,<BR> .gpdcon_mask
= 0xffc0fff0,<BR> .gpdup
= 0x0000faff,<BR> .gpdup_mask
= 0xffffffff,</DIV>
<DIV> .fixed_syncs
= 1,<BR> .width
= 320,<BR> .height = 240,</DIV>
<DIV> .xres = {<BR> .min
= 320,<BR> .max
= 320,<BR> .defval
= 320,<BR> },</DIV>
<DIV> .yres = {<BR> .max
= 240,<BR> .min
= 240,<BR> .defval = 240,<BR> },</DIV>
<DIV> .bpp = {<BR> .min
= 16,<BR> .max
= 16,<BR> .defval
= 16,<BR> },<BR>};</DIV>
<DIV>然后在static void __init
smdk2410_map_io(void)中添加 </DIV>
<DIV>set_s3c2410fb_info(&smdk2410_lcdcfg);
</DIV>
<DIV>添加头文件</DIV>
<DIV>#include
<asm/arch/regs-gpio.h><BR>#include
<asm/arch/regs-lcd.h><BR>#include
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -