<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_shootingstars</title><subtitle type="text">菩提本无树，明镜亦非台。本来无一物，何处惹尘埃。尘埃乃虚幻，亦何惧之来？</subtitle><id>http://feed.cnblogs.com/blog/u/2333/rss</id><updated>2011-04-15T03:15:59Z</updated><author><name>shootingstars</name><uri>http://www.cnblogs.com/shootingstars/</uri></author><generator>CNBlogs BlogServer</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shootingstars/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/2333/rss"/><entry><id>http://www.cnblogs.com/shootingstars/archive/2010/07/30/1788968.html</id><title type="text">硬件相关概念</title><summary type="text">GPIO：与单片机类似，GPIO就是芯片的引脚，管脚是可编程的 可对引脚的工作模式进行设置：输入模式(检测输入信号)，输出模式(输出0或1)，（通过寄存器）高阻状态(常用于AD转换)，还有禁止或允许上内部下拉电阻(上拉：管脚通过电阻接高电平，下拉：管脚通过电阻接地，也可以外部接上拉或下拉电阻)，还要管脚复用等功能，即通过对内部寄存器的设置使引脚既可以工作在一般模式，作为普通的GPIO口使用，也可已...</summary><published>2010-07-30T10:12:00Z</published><updated>2010-07-30T10:12:00Z</updated><author><name>shootingstars</name><uri>http://www.cnblogs.com/shootingstars/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shootingstars/archive/2010/07/30/1788968.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shootingstars/archive/2010/07/30/1788968.html"/><content type="html">&lt;p&gt;&lt;strong style="color: red; "&gt;GPIO：&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;与单片机类似，GPIO就是芯片的引脚，管脚是可编程的&lt;/p&gt; &lt;span  style="font-family: simsun; line-height: 23px; "&gt;可对引脚的工作模式进行设置：输入模式(检测输入信号)，输出模式(输出0或1)，（通过寄存器）&lt;br /&gt;高阻状态(常用于AD转换)，还有禁止或允许上内部下拉电阻(上拉：管脚通过电阻接高电平，&lt;br /&gt;下拉：管脚通过电阻接地，也可以外部接上拉或下拉电阻)，还要管脚复用等功能，即通过&lt;br /&gt;对内部寄存器的设置使引脚既可以工作在一般模式，作为普通的GPIO口使用，&lt;br /&gt;也可已工作在特殊模式，比如作为外部中断信号输入引脚等等。如果不设置GPIO引脚，CPU&lt;br /&gt;&lt;p&gt;工作时有一个初始化模式，可以从datasheet上了解。&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong style="color: red; "&gt;I2C:&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span  style="font-family: arial; line-height: 22px; "&gt;I2C(Inter－Integrated Circuit)总线是一种由PHILIPS公司开发的两线式串行总线，用于连接微控制器及其外围设备。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;同时，它也是一种协议，我们可以通过其他手段模拟出I2C协议来（比如GPIO）。&lt;/p&gt;&lt;p&gt;&lt;a href="http://files.cnblogs.com/shootingstars/I2CProtocol.pdf" title="相关附件"&gt;相关附件&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong style="color: red; "&gt;PWM：&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span  style="font-family: Simsun; line-height: 25px; "&gt;PWM（Pulse Width Modulation）&amp;#8212;&amp;#8212;脉宽调制，是一种开关式稳压电源应用，是利用微处理器的数字输出来对模拟电路进行控制的一种非常有效的技术。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span  style="font-family: Arial; line-height: 22px; white-space: pre-wrap; "&gt;简而言之，PWM是一种对模拟信号电平进行数字编码的方法。通过高分辨率计数器的使用，方波的占空比被调制用来对一个具体模拟信号的电平进行编码。PWM信号仍然是数字的，因为在给定的任何时刻，满幅值的直流供电要么完全有(ON)，要么完全无(OFF)。电压或电流源是以一种通(ON)或断(OFF)的重复脉冲序列被加到模拟负载上去的。通的时候即是直流供电被加到负载上的时候，断的时候即是供电被断开的时候。只要带宽足够，任何模拟值都可以使用PWM进行编码。&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a title="相关链接" href="http://zhidao.baidu.com/question/15438897"&gt;相关链接&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/span&gt;&lt;img src="http://www.cnblogs.com/shootingstars/aggbug/1788968.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/shootingstars/archive/2010/07/30/1788968.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/shootingstars/archive/2010/01/11/1644312.html</id><title type="text">我的Function</title><summary type="text">我们有些时候需要存储一些函数以备后用，最常用的就是C中的Callback。。。但是到了C++年代，函数都放到了类中，想要Callback就有些复杂了。Boost::function封装了一个模版库，它可以接受静态函数，普通函数以及仿函数，为了了解它的原理，我自己试图写一个简单的类。。。我们先看boost中function的使用boost::function&amp;lt;int(int)&amp;gt; func...</summary><published>2010-01-11T10:10:00Z</published><updated>2010-01-11T10:10:00Z</updated><author><name>shootingstars</name><uri>http://www.cnblogs.com/shootingstars/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shootingstars/archive/2010/01/11/1644312.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shootingstars/archive/2010/01/11/1644312.html"/></entry><entry><id>http://www.cnblogs.com/shootingstars/archive/2010/01/08/1642027.html</id><title type="text">C的可变参数</title><summary type="text">C可以支持可变参数，所有才会有printf一类的神奇函数。问题是它是怎么实现的？其实看完了va_list/va_start等宏的定义后，才会猛然知道，原来它是这么的简单。其实就是C把所有变量压入一个堆栈，在函数中再按前面的format的指示从堆栈中取出对应的值而已。相关网页：http://ipe.gzu.edu.cn/kszx/jsj/jyjl1/200910/33758.html 上述网页中提到的一个问题是关于可变参数的传递问题，其实它并没有解决。（不可能把printf的所有解析过程重写一遍）这个问题其实非常常见，比如我们的Log想支持可变参数的时候，就很有可能需要传递可变参数Log(con</summary><published>2010-01-08T03:29:00Z</published><updated>2010-01-08T03:29:00Z</updated><author><name>shootingstars</name><uri>http://www.cnblogs.com/shootingstars/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shootingstars/archive/2010/01/08/1642027.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shootingstars/archive/2010/01/08/1642027.html"/></entry><entry><id>http://www.cnblogs.com/shootingstars/archive/2009/12/30/1636251.html</id><title type="text">C++概念网摘</title><summary type="text">SFINAE(匹配失败不是错误) 当模版函数匹配失败时，如果还有其他选择，就选择其他的重载函数，并且忽略这个编译错误。相关的有boost::enable_if相关网页：http://www.cnblogs.com/coolzgx/archive/2009/12/16/1625425.html</summary><published>2009-12-30T09:51:00Z</published><updated>2009-12-30T09:51:00Z</updated><author><name>shootingstars</name><uri>http://www.cnblogs.com/shootingstars/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shootingstars/archive/2009/12/30/1636251.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shootingstars/archive/2009/12/30/1636251.html"/></entry><entry><id>http://www.cnblogs.com/shootingstars/archive/2009/12/15/1624839.html</id><title type="text">Mifare 串行读取协议</title><summary type="text">Mifare卡是一种非接触式的智能卡，我们了解他们的相关协议。表一 命令格式如下：协议头（Head）：2字节，固定填充0xAA,0xBB长度（Length）：2字节，从此列后的所有有效字节数（包含XOR） 节点ID（Node ID）：2字节，目标节点地址数函数码（Function code）：2字节，函数功能码，另见表三数据（Data）：00~D0字节，数据位异或（XOR）：1字节，从节点ID到最...</summary><published>2009-12-15T07:18:00Z</published><updated>2009-12-15T07:18:00Z</updated><author><name>shootingstars</name><uri>http://www.cnblogs.com/shootingstars/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shootingstars/archive/2009/12/15/1624839.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shootingstars/archive/2009/12/15/1624839.html"/></entry><entry><id>http://www.cnblogs.com/shootingstars/archive/2009/12/14/1623952.html</id><title type="text">韦根协议</title><summary type="text">一、前言：Wiegand（韦根）协议是由摩托罗拉公司制定的一种通讯协议，它适用于涉及门禁控制系统的读卡器和卡片的许多特性；其协议并没有定义通讯的波特率、也没有定义数据长度韦根格式主要定义是数据传输方式:Data0 和 Data1 两根数据线分别传输 0 和 1.现在应用最多的是 26bit,34bit等等。二、韦根数据输出的基本概念：韦根数据输出由二根线组成，分别是 DATA0 和 DATA1 ；...</summary><published>2009-12-14T09:34:00Z</published><updated>2009-12-14T09:34:00Z</updated><author><name>shootingstars</name><uri>http://www.cnblogs.com/shootingstars/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shootingstars/archive/2009/12/14/1623952.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shootingstars/archive/2009/12/14/1623952.html"/></entry><entry><id>http://www.cnblogs.com/shootingstars/archive/2008/07/30/1256410.html</id><title type="text">学习C的可变参数</title><summary type="text">1 使用：一直以来习惯了使用printf函数，但是对于可变参数没有深入研究过，觉得可变参数是一个神奇的技术^0^。。。工作闲下来的时候，想研究研究看可变参数的使用和原理。目前C提供的可变参数的申明为void function(const char *format, ...);这样就可以在function中使用可变参数C提供了几个宏用于使用可变参数va_listva_startva_argva_en...</summary><published>2008-07-30T06:05:00Z</published><updated>2008-07-30T06:05:00Z</updated><author><name>shootingstars</name><uri>http://www.cnblogs.com/shootingstars/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shootingstars/archive/2008/07/30/1256410.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shootingstars/archive/2008/07/30/1256410.html"/></entry><entry><id>http://www.cnblogs.com/shootingstars/archive/2008/07/22/1248670.html</id><title type="text">关于汇编程序调用各种C函数的例子</title><summary type="text">[代码]</summary><published>2008-07-22T05:52:00Z</published><updated>2008-07-22T05:52:00Z</updated><author><name>shootingstars</name><uri>http://www.cnblogs.com/shootingstars/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shootingstars/archive/2008/07/22/1248670.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shootingstars/archive/2008/07/22/1248670.html"/></entry><entry><id>http://www.cnblogs.com/shootingstars/archive/2008/06/02/1211867.html</id><title type="text">如何移植Java的类中的super到C++代码中</title><summary type="text">在Java中，继承类可以使用super访问基类中的数据变量Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--&amp;gt;classA{inti=-1;}classBextendsA{voidprintSuperI(){System.out.println(super...</summary><published>2008-06-02T01:23:00Z</published><updated>2008-06-02T01:23:00Z</updated><author><name>shootingstars</name><uri>http://www.cnblogs.com/shootingstars/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shootingstars/archive/2008/06/02/1211867.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shootingstars/archive/2008/06/02/1211867.html"/></entry><entry><id>http://www.cnblogs.com/shootingstars/archive/2008/05/07/1187269.html</id><title type="text">编译原理学习</title><summary type="text">编译程序一般划分为1 词法分析 -- 输入源程序，对源程序的字符串进行扫描和分解，得到一个个单词（token）2 语法分析 -- 按照语法规则，确定输入串是否符合此规则3 语义分析及中间代码产生 -- 在语法分析的基础上分析含义，并且进行相关的翻译（中间代码）。如很多编译器采用&amp;#8220;四元式&amp;#8221;作为中间代码，四元式如下所示： 算符 左操作数 右操作数 结果4 优化 -- 优化以上产...</summary><published>2008-05-07T10:43:00Z</published><updated>2008-05-07T10:43:00Z</updated><author><name>shootingstars</name><uri>http://www.cnblogs.com/shootingstars/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shootingstars/archive/2008/05/07/1187269.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shootingstars/archive/2008/05/07/1187269.html"/></entry></feed>
