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

📄 windows ce下驱动程序开发基础_技术_1.htm

📁 wince 电池电源管理文件集 wince 电池电源管理文件集
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<!-- SUDA_CODE_END -->
<CENTER><!--导航start-->
<STYLE>.h3 {
	FONT-SIZE: 7px; COLOR: #ffbd00
}
</STYLE>

<TABLE cellSpacing=0 cellPadding=0 width=750 border=0>
  <TBODY>
  <TR>
    <TD>
      <SCRIPT>
function getCookie(name) {

  var search;

  search = name + "="
  offset = document.cookie.indexOf(search) 
  if (offset != -1) {
    offset += search.length ;
    end = document.cookie.indexOf(";", offset) ;
    if (end == -1)
      end = document.cookie.length;
    return document.cookie.substring(offset, end);
  }
  else
    return "";
}

function unipro_clearCookie(name ) {
	document.cookie=name+"=; " + "domain=sina.com.cn; path=/; ";     
	//bites = document.cookie.split("; ");
} 

function getMobileNum(ckName){
var userInfo = getCookie(ckName).split(":");
	return userInfo[2];
}

function unipro_UniProLogout() {
	unipro_clearCookie("SINAPRO");
	unipro_clearCookie("SINA-AVATAR");
	unipro_clearCookie("SINAPROC");
	unipro_clearCookie("nick");
	unipro_clearCookie("SINA_NU");      
	unipro_clearCookie("SINA_OU");
	unipro_clearCookie("appmask");
	unipro_clearCookie("gender");
	unipro_clearCookie("UNIPROTM");
	unipro_clearCookie("UNIPROU");
	unipro_clearCookie("SINA_USER");
	unipro_clearCookie("SMS_COOKIE");
	return true;
}

function getUniproUrl_stand(){
	window.location='http://unipro.sina.com.cn/';
	return false;
}

function getUniproUrl_welcome(){
	unipro_UniProLogout();
	window.location='http://unipro.sina.com.cn';
	return false;	
}

function print_stand_unipro_head()
{
	document.write("<table border=0 cellpadding=0 cellspacing=0><tr align=center><td><a href=http://www.sina.com.cn class=a01>首页</a></td><td width=14></td><td><a href=http://news.sina.com.cn class=a01>新闻</a></td><td width=14></td><td><a href=http://sports.sina.com.cn class=a01>体育</a></td><td width=14></td><td><a href=http://ent.sina.com.cn class=a01>娱乐</a></td><td width=14></td><td><a href=http://bn.sina.com.cn/ class=a01>视频</a></td><td width=14></td><td><a href=http://finance.sina.com.cn/ class=a01>财经</a></td><td width=14></td><td><a href=http://tech.sina.com.cn/ class=a01>科技</a></td><td width=14></td><td><a href=http://auto.sina.com.cn/ class=a01>汽车</a></td><td width=14></td><td><a href=http://house.sina.com.cn/ class=a01><font color=red>房产</font></a></td><td width=14></td><td><a href=http://games.sina.com.cn class=a01>游戏</a></td><td width=14></td><td><a href=http://eladies.sina.com.cn/ class=a01>女性</a></td><td width=14></td><td><a href=http://book.sina.com.cn/ class=a01>读书</a><td width=14></td><td><a href=http://y.sina.com.cn/ class=a01>校园</a></td><td width=14></td><td><a href=http://weather.sina.com.cn/ class=a01>天气</a></td><td width=14></td><td><a href=http://sms.sina.com.cn class=a01>短信</a></td><td width=14></td><td><a href=http://mail.sina.com.cn class=a01>邮箱</a></td><td width=14></td><td><a href=http://search.sina.com.cn class=a01>搜索</a></td><td width=14></td><td><a href=http://news.sina.com.cn/guide/ class=a01>导航</a></td><td width=14></td></tr></table>");
	
	document.write("</td><td align=right>");
	
	document.write("<table height=25 border=0 cellpadding=0 cellspacing=0>");	
	document.write("<tr><td><td align=right> <a href=# onClick='return getUniproUrl_stand()'>通行证登录</a></td></tr>");	
	document.write("</table>");	
	
}

function print_stand_unipro_welcome()
{
	var unipro_login_nickname = getCookie( "nick" );
	var unipro_login_pos = unipro_login_nickname.indexOf( "(" );
	if ( unipro_login_pos != -1 )
	{
		unipro_login_nickname = unipro_login_nickname.substr( 0, unipro_login_pos );
	}
	
	document.write("<table border=0 cellpadding=0 cellspacing=0><tr align=center><td><a href=http://www.sina.com.cn class=a01>首页</a></td><td width=14></td><td><a href=http://news.sina.com.cn class=a01>新闻</a></td><td width=14></td><td><a href=http://sports.sina.com.cn class=a01>体育</a></td><td width=14></td><td><a href=http://ent.sina.com.cn class=a01>娱乐</a></td><td width=14></td><td><a href=http://bn.sina.com.cn/ class=a01>视听</a></td><td width=14></td><td><a href=http://finance.sina.com.cn/ class=a01>财经</a></td><td width=14></td><td><a href=http://tech.sina.com.cn/ class=a01>科技</a></td><td width=14></td><td><a href=http://auto.sina.com.cn/ class=a01>汽车</a></td><td width=14></td><td><a href=http://house.sina.com.cn/ class=a01><font color=red>房产</font></a></td><td width=14></td><td><a href=http://games.sina.com.cn class=a01>游戏</a></td><td width=14></td><td><a href=http://weather.sina.com.cn/ class=a01>天气</a></td><td width=14></td><td><a href=http://sms.sina.com.cn class=a01>短信</a></td><td width=14></td><td><a href=http://mail.sina.com.cn class=a01>邮箱</a></td><td width=14></td><td><a href=http://search.sina.com.cn class=a01>搜索</a></td><td width=14></td><td><a href=http://news.sina.com.cn/guide/ class=a01>导航</a></td><td width=14></td><td></td></tr></table>");
	
	document.write("</td><td align=right>");
	
	document.write("<table border=0 cellpadding=0 cellspacing=0>");
	document.write("<tr>");
	
	if ( unipro_login_nickname!="" && unipro_login_nickname!="null" && unipro_login_nickname!=null && unipro_login_nickname!="undefined" ) {
		document.write("<td align=right> "+unipro_login_nickname+"</td><td width=4></td><td><a href=# onClick='return getUniproUrl_welcome()'><font color=#0000ff>安全退出</font></a>");
	} else {
		document.write( "<td align=right> 新浪过客" +"</td><td width=4></td><td><a href=# onClick='return getUniproUrl_welcome()'><font color=#0000ff>安全退出</font></a>");
	}
	document.write("</td></tr>");
	document.write("</table>");
}
</SCRIPT>

      <SCRIPT language=javascript>
if (getCookie("SINAPRO") == "") {
	print_stand_unipro_head();

} else {

	print_stand_unipro_welcome();

}
</SCRIPT>
    </TD></TR></TBODY></TABLE><!--导航end--><!--头部结束--><!--科技新闻内页顶部通栏开始--><!--6793569021D5--><A 
href="http://ad.cn.doubleclick.net/clk;14775613;10960139;g?http://www-900.ibm.com/cn/software/tivoli/" 
target=_blank><IMG height=80 src="Windows CE下驱动程序开发基础_技术_1.files/12499.gif" 
width=750 border=0></A><!--$$ weixing/2005-3-25 ~ 2005-3-25/B $--> <!--科技新闻内页顶部通栏结束-->
<TABLE cellSpacing=0 cellPadding=0 width=750 border=0>
  <TBODY>
  <TR>
    <TD width=150 height=34><A href="http://tech.sina.com.cn/"><IMG height=34 
      alt=科技时代 src="Windows CE下驱动程序开发基础_技术_1.files/sina_kjsd.gif" width=144 
      border=0></A></TD>
    <TD vAlign=bottom width=440><FONT color=#0000ff><A class=a02 
      href="http://home.sina.com.cn/">新浪首页</A> &gt; <A class=a02 
      href="http://tech.sina.com.cn/">科技时代</A> &gt; <FONT class=a02>技术</FONT> 
      &gt; 正文</FONT></TD>
    <TD vAlign=bottom align=right width=150><A href="http://www.yesky.com/" 
      target=_blank><IMG height=28 
      src="Windows CE下驱动程序开发基础_技术_1.files/U1084P2T50D213F629DT20041213105743.gif" 
      border=0></A></TD>
    <TD width=10></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=750 border=0>
  <TBODY>
  <TR>
    <TD height=8></TD></TR>
  <TR>
    <TD bgColor=#747474 height=1><IMG height=1 
      src="Windows CE下驱动程序开发基础_技术_1.files/c.gif" width=1></TD></TR></TBODY></TABLE>
<DIV id=outer style="WIDTH: 750px; POSITION: relative">
<TABLE cellSpacing=0 cellPadding=0 width=750 border=0>
  <TBODY>
  <TR>
    <TD vAlign=top align=middle width=620 bgColor=#edf0f5 rowSpan=2><BR>
      <DIV id=article>
      <TABLE cellSpacing=0 cellPadding=0 width=560 border=0>
        <TBODY>
        <TR>
          <TH class=f24><FONT color=#05006c>
            <H1>Windows CE下驱动程序开发基础</H1></FONT></TH></TR>
        <TR>
          <TD>
            <HR SIZE=1 bgcolor="#d9d9d9">
          </TD></TR>
        <TR>
          <TD align=middle height=20>http://www.sina.com.cn 
            2005年03月25日&nbsp;18:21 <FONT color=#a20010>天极yesky</FONT></TD></TR>
        <TR>
          <TD height=15></TD></TR>
        <TR>
          <TD class=l17><FONT class=f14 id=zoom><!-- 正文内部文字导航 : begin --><!-- 正文内部文字导航 : end -->
            <P>  文/付林林</P>
            <P><SPAN 
            class=f14>  这是我从1月6日开始主持天极网论坛嵌入式开发版以来第一次发表文章,加上以前琐碎的文章共计30篇。研究的越多就越感觉自己懂的太少,其实在驱动开发方面我还是个菜鸟,我是想再次抛砖引玉,让做驱动有N年经验的人奉献一点出来,让大家减少一些研究驱动源码而又缺少注释所带来的痛苦。 
            <BR><BR>  我想即使读者看过<A class=akey 
            href="http://www.microsoft.com/china" 
            target=_blank>微软</A>的关于驱动开发的培训教材和CE帮助文档中的驱动部分,头脑中仍然一片茫然。要想真正了解驱动程序必须结合一些驱动程序源码,在此我以<A 
            class=akey 
            href="http://tech.sina.com.cn/n/2005-01-26/1410515629.shtml" 
            target=_blank>串口</A>驱动程序(COM16550)中初始化过程为线索简单讲一讲驱动开发的基础知识。<BR><BR>  Windows 
            CE下的串口驱动程序能够处理所有<A class=akey 
            href="http://tech.sina.com.cn/n/2005-01-26/1404515618.shtml" 
            target=_blank>I/O</A>行为类似串口的设备,包括基于16450、16550 
            UART(通用异步收发芯片)的设备和一些采用DMA的设备,常见的有9针串口、<A class=akey 
            href="http://tech.sina.com.cn/mobile/n/2004-06-26/1328380357.shtml" 
            target=_blank><A class=akey 
            href="http://tech.sina.com.cn/n/2005-01-26/1412515632.shtml" 
            target=_blank>红外</A></A>I/O口、<A class=akey 
            href="http://tech.sina.com.cn/n/2005-01-26/1418515641.shtml" 
            target=_blank>Modem</A>等。在%_WINCEROOT%\Public\Common\<A class=akey 
            href="http://tech.sina.com.cn/it/2004-08-19/1139408191.shtml" 
            target=_blank>OA</A>K\Drivers\Serial目录下,COM_MDD2子目录包含新的串口驱动MDD层函数代码。COM16550子目录包含串口驱动PDD层代码。SER16550子目录包含的一系列函数专用于控制与16550兼容的UART,这样PDD层的主要工作就是调用SER16550中的函数。还有一个ISR16550子目录包含的是串口驱动程序专用的可安装ISR(中断服务例程),而很多<A 
            class=akey href="http://tech.sina.com.cn/hardware/" 
            target=_blank>硬件</A>设备驱动程序采用CE默认的可安装ISR 
            giisr.dll。一般串口设备相应的注册表设置例子及意义如下:<BR><BR>
            <P>
            <P>
            <TABLE borderColor=#ffcc66 width="90%" align=center bgColor=#dadacf 
            border=1>
              <TBODY>
              <TR>
                <TD>[HKEY_LO<A class=akey 
                  href="http://finance.sina.com.cn/110/2004-10-20/575.html" 
                  target=_blank>CA</A>L_MACHINE\Drivers\BuiltIn\Serial_1]</TD></TR></TBODY></TABLE>
            <P>
            <P><BR>
            <P>
            <P>
            <TABLE cellSpacing=0 cellPadding=2 width="90%" align=center 
border=1>
              <TBODY>
              <TR>
                <TD>键</TD>
                <TD>意义</TD></TR>
              <TR>
                <TD>"SysIntr"=dword:13</TD>
                <TD>串口1的中断ID为十进制13</TD></TR>
              <TR>
                <TD>"IoBase"=dword:02F8</TD>
                <TD>串口1的IO空间首地址为十六进制2F8</TD></TR>
              <TR>
                <TD>"IoLen"=dword:8 </TD>
                <TD>串口1的IO空间长度为8个字节</TD></TR>
              <TR>
                <TD>"DeviceArrayIndex"=dword:0</TD>
                <TD>串口1的索引,是1的由来</TD></TR>
              <TR>
                <TD>"Order"=dword:0</TD>
                <TD>串口1驱动的加载顺序</TD></TR>
              <TR>
                <TD>"DeviceType"=dword:0</TD>
                <TD>串口1的设备类型</TD></TR>
              <TR>
                <TD>"DevConfig"=hex: 10,00 ....</TD>
                <TD>串口1在与Modem设备通讯时的配置,如波特率、奇偶校检等</TD></TR>
              <TR>
                <TD>"FriendlyName"="COM1:"</TD>
                <TD>串口1在拨号程序中显示的名字</TD></TR>
              <TR>
                <TD>"Tsp"="Unimodem.dll"</TD>
                <TD>串口1 被用于与Modem设备通讯的时候要加载的TSP(TAPI Service 
provider)DLL</TD></TR>
              <TR>
                <TD>"Prefix"="COM"</TD>

⌨️ 快捷键说明

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