⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 2_6内核lcd驱动移植 - 我的文章 - we need more tips.htm

📁 友善臂开发板上使用的S3C2410
💻 HTM
📖 第 1 页 / 共 3 页
字号:
            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>&nbsp;.regs&nbsp;= {<BR>&nbsp;&nbsp;.lcdcon1 
                              =&nbsp;S3C2410_LCDCON1_TFT16BPP | 
                              \<BR>&nbsp;&nbsp;&nbsp;&nbsp;S3C2410_LCDCON1_TFT | 
                              \<BR>&nbsp;&nbsp;&nbsp;&nbsp;S3C2410_LCDCON1_CLKVAL(0x03),</DIV>
                              <DIV>&nbsp;&nbsp;.lcdcon2 
                              =&nbsp;S3C2410_LCDCON2_VBPD(3) | 
                              \<BR>&nbsp;&nbsp;&nbsp;&nbsp;S3C2410_LCDCON2_LINEVAL(239) 
                              | 
                              \<BR>&nbsp;&nbsp;&nbsp;&nbsp;S3C2410_LCDCON2_VFPD(5) 
                              | 
                              \<BR>&nbsp;&nbsp;&nbsp;&nbsp;S3C2410_LCDCON2_VSPW(15),</DIV>
                              <DIV>&nbsp;&nbsp;.lcdcon3 
                              =&nbsp;S3C2410_LCDCON3_HBPD(5) | 
                              \<BR>&nbsp;&nbsp;&nbsp;&nbsp;S3C2410_LCDCON3_HOZVAL(319) 
                              | 
                              \<BR>&nbsp;&nbsp;&nbsp;&nbsp;S3C2410_LCDCON3_HFPD(15),</DIV>
                              <DIV>&nbsp;&nbsp;.lcdcon4 
                              =&nbsp;S3C2410_LCDCON4_MVAL(13) | 
                              \<BR>&nbsp;&nbsp;&nbsp;&nbsp;S3C2410_LCDCON4_HSPW(8),</DIV>
                              <DIV>&nbsp;&nbsp;.lcdcon5 
                              =&nbsp;S3C2410_LCDCON5_FRM565 
                              |<BR>&nbsp;&nbsp;&nbsp;&nbsp;S3C2410_LCDCON5_INVVLINE 
                              |<BR>&nbsp;&nbsp;&nbsp;&nbsp;S3C2410_LCDCON5_INVVFRAME 
                              |<BR>&nbsp;&nbsp;&nbsp;&nbsp;S3C2410_LCDCON5_PWREN 
                              |<BR>&nbsp;&nbsp;&nbsp;&nbsp;S3C2410_LCDCON5_HWSWP,<BR>&nbsp;},</DIV>
                              <DIV>&nbsp;.lpcsel =&nbsp;0xf82,</DIV>
                              <DIV>&nbsp;.gpccon 
                              =&nbsp;0xaa955699,<BR>&nbsp;.gpccon_mask 
                              =&nbsp;0xffc003cc,<BR>&nbsp;.gpcup 
                              =&nbsp;0x0000ffff,<BR>&nbsp;.gpcup_mask 
                              =&nbsp;0xffffffff,</DIV>
                              <DIV>&nbsp;.gpdcon 
                              =&nbsp;0xaa95aaa1,<BR>&nbsp;.gpdcon_mask 
                              =&nbsp;0xffc0fff0,<BR>&nbsp;.gpdup 
                              =&nbsp;0x0000faff,<BR>&nbsp;.gpdup_mask 
                              =&nbsp;0xffffffff,</DIV>
                              <DIV>&nbsp;.fixed_syncs 
                              =&nbsp;1,<BR>&nbsp;.width&nbsp; 
                              =&nbsp;320,<BR>&nbsp;.height =&nbsp;240,</DIV>
                              <DIV>&nbsp;.xres&nbsp;= {<BR>&nbsp;&nbsp;.min 
                              =&nbsp;&nbsp;320,<BR>&nbsp;&nbsp;.max 
                              =&nbsp;&nbsp;320,<BR>&nbsp;&nbsp;.defval 
                              =&nbsp;320,<BR>&nbsp;},</DIV>
                              <DIV>&nbsp;.yres&nbsp;= {<BR>&nbsp;&nbsp;.max 
                              =&nbsp;&nbsp;240,<BR>&nbsp;&nbsp;.min 
                              =&nbsp;&nbsp;240,<BR>&nbsp;&nbsp;.defval&nbsp;=&nbsp;240,<BR>&nbsp;},</DIV>
                              <DIV>&nbsp;.bpp&nbsp;= {<BR>&nbsp;&nbsp;.min 
                              =&nbsp;&nbsp;16,<BR>&nbsp;&nbsp;.max 
                              =&nbsp;&nbsp;16,<BR>&nbsp;&nbsp;.defval 
                              =&nbsp;16,<BR>&nbsp;},<BR>};</DIV>
                              <DIV>然后在static void __init 
                              smdk2410_map_io(void)中添加 </DIV>
                              <DIV>set_s3c2410fb_info(&amp;smdk2410_lcdcfg); 
                              </DIV>
                              <DIV>添加头文件</DIV>
                              <DIV>#include 
                              &lt;asm/arch/regs-gpio.h&gt;<BR>#include 
                              &lt;asm/arch/regs-lcd.h&gt;<BR>#include 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -