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

📄 uclinux 的framebuffer简介-如何配置framebufferuclinuxframebuffer.htm

📁 S3C44B0X下的LCD (framebuffer)驱动资料与相关代码
💻 HTM
📖 第 1 页 / 共 2 页
字号:
            <P></P>
            <P align=left>第三个结构定义了当前图形卡framebuffer 
            设备的独立状态,一个图形卡可能有两个framebuffer, 在这种情况下,就需要两个fb_info 
            结构。这个结构是唯一在内核空间可见的。 
            <P></P>
            <P></P>
            <P align=left><B>设计自己的</B><B><FONT 
            face="Times New Roman">framebuffer </FONT></B><B>设备驱动 
            <P></P></B>
            <P></P>
            <P align=left>用户首先需要添加下面的代码到fbmem.c 
            <P></P>
            <P></P>
            <P align=left>static struct { 
            <P></P>
            <P></P>
            <P align=left>const char *name; 
            <P></P>
            <P></P>
            <P align=left>int (*init)(void); 
            <P></P>
            <P></P>
            <P align=left>int (*setup)(char*); 
            <P></P>
            <P></P>
            <P align=left>} fb_drivers[] __initdata = { 
            <P></P>
            <P></P>
            <P align=left>#ifdef CONFIG_FB_YOURCARD 
            <P></P>
            <P></P>
            <P align=left>{ "driver_name", xxxfb_init, xxxfb_setup }, 
            <P></P>
            <P></P>
            <P align=left>#endif 
            <P></P>
            <P></P>
            <P align=left>其次在xxfb.c 中根据自己的需要重新分配显存大小。例如: #define 
            <P></P>
            <P></P>
            <P align=left>VIDEOMEMSIZE (1*1024*1024) /* 1 MB */ 
            <P></P>
            <P></P>
            <P align=left>再次根据自己的硬件设备修改相应的var 信息。主要修改xxfb_set_var(struct 
            <P></P>
            <P></P>
            <P align=left>fb_var_screeninfo *var, int con, struct fb_info 
            *info)函数。 
            <P></P>
            <P></P>
            <P align=left><B>如何添加</B><B><FONT face="Times New Roman">framebuffer 
            </FONT></B><B>设备驱动 
            <P></P></B>
            <P></P>
            <P align=left>在make menuconfig 的时候首先进入Character 
            devices,选中里面的Virtualterminal.如果希望控制台在液晶上输出,则选中Support for console on 
            virtual terminal<FONT color=#3c3cc4>。( 在用户配置中,shell<FONT 
            size=3><FONT size=2>选用<FONT face="Times New Roman">msh</FONT>(<FONT 
            face="Times New Roman">minix shell),</FONT>在<FONT 
            face="Times New Roman">rc</FONT>中放入一条<FONT face="Times New Roman">sh 
            &lt; /dev/ttyS0</FONT>,当console起来后,就可以通过串口输入的键值,输入会显示输出在<FONT 
            face="Times New Roman">LCD</FONT>上了。)</FONT> </FONT></FONT>
            <P><FONT size=3></FONT></P>
            <P></P>
            <P align=left>退到上一层界面我们就可以看到Console device 的选项,进入后将光标落在Framebuffer 
            Support 上,按回车键进入,在里面选择自己所需要的framebuffer设备即可。自己所添加的设备驱动的类型(如果在uclinux 
            下,应该以*选中,而不是M 选中),在编译的时候就会产生相应的.o 文件。 
            <P></P>
            <P></P>
            <P align=left>在Advanced low level 中可以配置bpp packed pixel 
            support,根据你的屏进行选择,例如256色STN屏选择8 bpp,16级灰度屏选择4 bpp等。然后选中Select 
            compiled-in fonts 即可。 
            <P></P>
            <P></P>
            <P align=left>操作系统运行以后就会在/dev 下面看到fb这个设备。它的major 
            设备号应该是29,第一个设备的minor应该是0。 
            <P></P>
            <P></P>
            <P align=left><B>如何使用</B><B><FONT face="Times New Roman">framebuffer 
            </FONT></B><B>设备 
            <P></P></B>
            <P></P>
            <P 
            align=left>我们可以在几个支持图形显示的平台上开发一些图形界面。例如microwindows,minigui,Qtembed,等等。</P></TD></TR>
        <TR>
          <TD>
            <DIV class=info><IMG title=本贴被加为精华 
            src="uClinux&nbsp;的framebuffer简介-如何配置framebufferuclinuxframebuffer.files/2005121414811734.gif" 
            align=absMiddle border=0>&nbsp;&nbsp;</DIV></TD></TR></TBODY></TABLE></P>
      <P></P>
      <P></P></TD></TR></TBODY></TABLE>
<DIV 
style="BORDER-TOP: #000000 1px solid; FONT-SIZE: 12px; MARGIN: 0px auto; WIDTH: 800px; COLOR: #000000; FONT-FAMILY: '宋体'; HEIGHT: 28px; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center"><!--上一篇-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A 
title=在uClinux下添加SL811HS的硬件底层驱动 
href="http://www.armsystem.com.cn/article/ARM7-artilcle/cphelp/20061013383.html">上一篇:在uClinux下添加SL811HS的硬件底层驱动</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A 
title=如何在44B0开发板ARMSYS上建立基于Nandflash的JFFS2文件系统 
href="http://www.armsystem.com.cn/article/ARM7-artilcle/cphelp/20061013386.html">下一篇:如何在44B0开发板ARMSYS上建立基于Nandflash的JFFS2文件系统</A> 
</DIV><!--下一篇-->
<TABLE style="BORDER-TOP: #000000 1px solid" cellSpacing=0 cellPadding=0 
width=800 align=center bgColor=#ffffff border=0>
  <TBODY>
  <TR>
    <TD vAlign=top align=left width=400 height=124>
      <TABLE style="BORDER-BOTTOM: #666666 1px solid" cellSpacing=0 
      cellPadding=0 width=400 border=0>
        <TBODY>
        <TR>
          <TD style="BACKGROUND: #898888; HEIGHT: 28px" width=400 
            height=21>&nbsp;&nbsp;<FONT class=menufont>■ 
        相关文章</FONT></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width=400>
        <TBODY>
        <TR>
          <TD height=8></TD></TR>
        <TR>
          <TD style="BORDER-BOTTOM: #cccccc 1px dotted" vAlign=top 
            align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-无相关文章</TD></TR>
        <TR>
          <TD height=6></TD></TR></TBODY></TABLE></TD>
    <TD vAlign=top align=left width=400>
      <TABLE style="BORDER-BOTTOM: #666666 1px solid" cellSpacing=0 
      cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD style="BACKGROUND: #898888; HEIGHT: 28px" width=400 
            height=21>&nbsp;&nbsp;<FONT class=menufont>■ 
        相关产品</FONT></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width="100%">
        <TBODY>
        <TR>
          <TD height=8></TD></TR>
        <TR>
          <TD style="BORDER-BOTTOM: #cccccc 1px dotted" vAlign=top 
            align=left>&nbsp;<IMG 
            src="uClinux&nbsp;的framebuffer简介-如何配置framebufferuclinuxframebuffer.files/dian3.gif">&nbsp;<A 
            title=ARMSYS44B0-C开发板 
            href="http://www.armsystem.com.cn/product/ARM7/sys44B0/2006101120.html" 
            target=_blank>ARMSYS44B0-C开发板</A><BR></TD></TR>
        <TR>
          <TD style="BORDER-BOTTOM: #cccccc 1px dotted" vAlign=top 
            align=left>&nbsp;<IMG 
            src="uClinux&nbsp;的framebuffer简介-如何配置framebufferuclinuxframebuffer.files/dian3.gif">&nbsp;<A 
            title=ARMSYS44B0-P开发板 
            href="http://www.armsystem.com.cn/product/ARM7/sys44B0/2006101122.html" 
            target=_blank>ARMSYS44B0-P开发板</A><BR></TD></TR>
        <TR>
          <TD style="BORDER-BOTTOM: #cccccc 1px dotted" vAlign=top 
            align=left>&nbsp;<IMG 
            src="uClinux&nbsp;的framebuffer简介-如何配置framebufferuclinuxframebuffer.files/dian3.gif">&nbsp;<A 
            title=ARMSYS44B0套餐3 
            href="http://www.armsystem.com.cn/product/ARM7/sys44B0/2006101123.html" 
            target=_blank>ARMSYS44B0套餐3</A><BR></TD></TR>
        <TR>
          <TD style="BORDER-BOTTOM: #cccccc 1px dotted" vAlign=top 
            align=left>&nbsp;<IMG 
            src="uClinux&nbsp;的framebuffer简介-如何配置framebufferuclinuxframebuffer.files/dian3.gif">&nbsp;<A 
            title=ARMSYS44B0套餐1 
            href="http://www.armsystem.com.cn/product/ARM7/sys44B0/2006101124.html" 
            target=_blank>ARMSYS44B0套餐1</A><BR></TD></TR>
        <TR>
          <TD style="BORDER-BOTTOM: #cccccc 1px dotted" vAlign=top 
            align=left>&nbsp;<IMG 
            src="uClinux&nbsp;的framebuffer简介-如何配置framebufferuclinuxframebuffer.files/dian3.gif">&nbsp;<A 
            title=ARMSYS44B0套餐2 
            href="http://www.armsystem.com.cn/product/ARM7/sys44B0/2006101125.html" 
            target=_blank>ARMSYS44B0套餐2</A><BR></TD></TR>
        <TR>
          <TD style="BORDER-BOTTOM: #cccccc 1px dotted" vAlign=top 
            align=left>&nbsp;<IMG 
            src="uClinux&nbsp;的framebuffer简介-如何配置framebufferuclinuxframebuffer.files/dian3.gif">&nbsp;<A 
            title=ARMSys-I型嵌入式系统教学实验平台 
            href="http://www.armsystem.com.cn/product/KF/SYJX/20061120219460.html" 
            target=_blank>ARMSys-I型嵌入式系统教学实验平台</A><BR></TD></TR>
        <TR>
          <TD style="BORDER-BOTTOM: #cccccc 1px dotted" vAlign=top 
            align=left>&nbsp;<IMG 
            src="uClinux&nbsp;的framebuffer简介-如何配置framebufferuclinuxframebuffer.files/dian3.gif">&nbsp;<A 
            title=ARMSYS-II教学实验平台 
            href="http://www.armsystem.com.cn/product/KF/SYJX/2006112116970.html" 
            target=_blank>ARMSYS-II教学实验平台</A><BR></TD></TR>
        <TR>
          <TD height=6></TD></TR></TBODY></TABLE><!-- end --></TD></TR></TBODY></TABLE>
<DIV id=center>
<DIV id=center style="CLEAR: both">
<DIV id=footer>
<DIV id=copyright>
<DIV class=COPY1 style="TEXT-ALIGN: center"><A title=关于我们 
href="http://www.armsystem.com.cn/about.html" target=_blank>关于我们</A>|<A 
title=网站地图 href="http://www.armsystem.com.cn/map.html" target=_blank>网站地图</A>|<A 
title=ARM论坛 href="http://www.hzlitai.com.cn/bbs" target=_blank>ARM论坛</A>|<A 
title=友情链接 href="http://www.armsystem.com.cn/lytlink/linkall.asp" 
target=_blank>友情链接</A></DIV>版权所有-杭州立宇泰电子有限公司
<SCRIPT language=JavaScript 
src="uClinux&nbsp;的framebuffer简介-如何配置framebufferuclinuxframebuffer.files/stat.htm" 
charset=gb2312></SCRIPT>
 </DIV></DIV></DIV>
<SCRIPT language=javascript 
src="uClinux&nbsp;的framebuffer简介-如何配置framebufferuclinuxframebuffer.files/blog.Js"></SCRIPT>
</DIV></BODY></HTML>

⌨️ 快捷键说明

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