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

📄 windows ce下驱动程序开发基础(5)_5.htm

📁 wince 电池电源管理文件集 wince 电池电源管理文件集
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<SCRIPT type=text/javascript>//<!--_S_pSt("");//--></SCRIPT>
<!-- 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下驱动程序开发基础(5)_5.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下驱动程序开发基础(5)_5.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; <A class=a02 
      href="http://tech.sina.com.cn/s_h/news/">软件</A> &gt; 正文</FONT></TD>
    <TD vAlign=bottom align=right width=150><A href="http://www.yesky.com/" 
      target=_blank><IMG height=28 
      src="Windows CE下驱动程序开发基础(5)_5.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下驱动程序开发基础(5)_5.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下驱动程序开发基础(5)</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></P>
            <P>  映射硬件寄存器当然PAGE_NOCACHE是必须加的。TransBusAddrToStatic函数负责将物理地址映射到ISR能够访问的静态虚拟地址空间中,当出现中断共享时,ISR要负责访问硬件设备的某一个寄存器来判断中断源,所以将寄存器的物理地址映射到静态虚拟地址空间中是必要的(ISR只能访问静态的虚拟地址空间)。所谓静态虚拟地址空间是指在OEMAddressTable中定义的虚拟地址空间(当然是0x80000000以上)。在x86平台一般这个表只定义RAM的物理地址与虚拟地址对应关系,而硬件设备的寄存器地址并不在该表中定义,所以如果要创建一块静态的虚拟地址空间供ISR访问,必须在此之前调用CreateStaticMapping函数在0xC4000000到0xE0000000虚拟地址空间中分配。TransBusAddrToStatic函数在内部就是调用了CreateStaticMapping函数。注:硬件设备的寄存器地址也可以在OEMAddressTable中定义。<BR><BR></P>
            <P>
            <TABLE borderColor=#ffcc66 width="90%" align=center bgColor=#dadacf 
            border=1>
              <TBODY>
              <TR>
                <TD>////如果地址属于IO空间<BR><BR>ioPortBase = 
                  (PUCHAR)ioPhysicalBase.LowPart;<BR>*ppStaticAddress=ioPortBase</TD></TR></TBODY></TABLE></P>
            <P><BR>  这种情况只属于x86平台,是IO空间就可以直接访问,即使是用户模式。<BR><BR>  SerInit函数接着初始化SER_INFO结构体成员,之后调用SL_Init函数,这个函数在ser16550中定义,负责初始化SER16550_INFO结构体,在这个结构体中保存串口8个寄存器的地址。SerInit函数执行完毕后COM_Init函数创建接收缓冲区,然后调用StartDispatchThread函数初始化中断并且创建IST。StartDispatchThread函数在内部调用InterruptInitialize函数关联SysIntr和Event,然后调用InterruptDone函数告诉内核当前串口可以中断处理,接着调用CreateThread函数创建IST线程。(over吧,再往下说就和串口硬件有关了,看多了没注释的代码我也烦!!)</SPAN></P>
            <P align=right><A style="FONT-SIZE: 14px" 
            href="http://tech.sina.com.cn/s/s/2005-03-25/1821562036.shtml">[上一页]</A>&nbsp;&nbsp;<A 
            href="http://tech.sina.com.cn/s/s/2005-03-25/1821562033.shtml">[1]</A>&nbsp;&nbsp;<A 
            href="http://tech.sina.com.cn/s/s/2005-03-25/1821562034.shtml">[2]</A>&nbsp;&nbsp;<A 
            href="http://tech.sina.com.cn/s/s/2005-03-25/1821562035.shtml">[3]</A>&nbsp;&nbsp;<A 
            href="http://tech.sina.com.cn/s/s/2005-03-25/1821562036.shtml">[4]</A>&nbsp;&nbsp;[5]</P>
            <TABLE width="90%" align=center border=0>
              <TBODY>
              <TR></TR></TBODY></TABLE><BR clear=all>
            <TABLE cellSpacing=0 cellPadding=0 width=565 border=0>
              <TBODY>
              <TR>
                <TD class=f14 vAlign=top height=30>  点击此处查询<A 
                  href="http://chanews.sina.com.cn/s.cgi?k=keyword&amp;c=2&amp;k=Windows" 
                  target=_blank CE>全部<FONT color=red>Windows CE</FONT>新闻</A> 
              </TD></TR></TBODY></TABLE></FONT></TD></TR></TBODY></TABLE></DIV><BR>
      <TABLE cellSpacing=0 cellPadding=0 width=560 border=0>
        <TBODY>
        <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=0 width=565 border=0>
              <TBODY>
              <TR>
                <TD>
                  <FORM name=from_ 
                  action=http://mms.sina.com.cn/xmlmms/xmlmmsQue.php method=post 
                  target=_blank><INPUT type=hidden 
                  value=http://rss.sina.com.cn/mms/tech/93/67/56/2-1-562037.xml 
                  name=xmlCfg> <INPUT type=hidden value=100001 name=sourceFrom> 
                  <INPUT type=hidden value=442 name=from> <INPUT style="WIDTH: 120px" type=submit value=多种方式看新闻 name=submit_> 
                  </FORM></TD>
                <TD align=right>【<A 
                  href="http://comment.news.sina.com.cn/cgi-bin/comment/comment.cgi?channel=kj&amp;newsid=562033">评论</A>】【<A 
                  href="http://forum.tech.sina.com.cn/cgi-bin/tree.cgi?gid=23&amp;fid=288">应用软件</A>】【<A 
                  href="http://stat.sina.com.cn/cgi-bin/sms/edit_sms.cgi?title=Windows%20CE%CF%C2%C7%FD%B6%AF%B3%CC%D0%F2%BF%AA%B7%A2%BB%F9%B4%A1%285%29&amp;url=tech.sina.com.cn/s/s/2005-03-25/1821562037.shtml">推荐</A>】【<A 
                  href="javascript:doZoom(16)">大</A> <A 
                  href="javascript:doZoom(14)">中</A> <A 
                  href="javascript:doZoom(12)">小</A>】【<A 
                  href="javascript:doPrint()">打印</A>】【<A 
                  href="http://www.sina.com.cn/ddt/" target=_blank>下载点点通</A>】【<A 
                  href="javascript:window.close()">关闭</A>】</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>&nbsp;<BR>
      <TABLE cellSpacing=0 cellPadding=0 width=560 border=0>
        <TBODY>
        <TR>
          <TD><!-- 正文底部小通栏 -->
            <TABLE cellSpacing=0 cellPadding=0 width=585 align=center 
              border=0><TBODY>
              <TR>
                <TD><!--科技频道内页底部小通栏开始--><!--CD81E99758B2-->
                  <OBJECT 
                  codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 

⌨️ 快捷键说明

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