亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? bitbuf_8c-source.html

?? ATMEL的AVR單片機(jī)庫文件
?? HTML
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Procyon AVRlib: bitbuf.c Source File</title><link href="dox.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.6 --><div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div><h1>bitbuf.c</h1><a href="bitbuf_8c.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*! \file bitbuf.c \brief Multipurpose bit buffer structure and methods. */</span>00002 <span class="comment">//*****************************************************************************</span>00003 <span class="comment">//</span>00004 <span class="comment">// File Name    : 'bitbuf.c'</span>00005 <span class="comment">// Title        : Multipurpose bit buffer structure and methods</span>00006 <span class="comment">// Author       : Pascal Stang - Copyright (C) 2001-2002</span>00007 <span class="comment">// Created      : 7/10/2002</span>00008 <span class="comment">// Revised      : 7/10/2002</span>00009 <span class="comment">// Version      : 0.5</span>00010 <span class="comment">// Target MCU   : any</span>00011 <span class="comment">// Editor Tabs  : 4</span>00012 <span class="comment">//</span>00013 <span class="comment">// This code is distributed under the GNU Public License</span>00014 <span class="comment">//      which can be found at http://www.gnu.org/licenses/gpl.txt</span>00015 <span class="comment">//</span>00016 <span class="comment">//*****************************************************************************</span>00017 00018 <span class="preprocessor">#include "<a class="code" href="bitbuf_8h.html">bitbuf.h</a>"</span>00019 00020 <span class="comment">// global variables</span>00021 <span class="comment"></span>00022 <span class="comment">//! Initialize the bit buffer</span>00023 <span class="comment"></span><span class="comment">//  sets the start location and size of the buffer in memory</span><a name="l00024"></a><a class="code" href="bitbuf_8h.html#a1">00024</a> <span class="keywordtype">void</span> <a class="code" href="bitbuf_8h.html#a1">bitbufInit</a>(BitBuf* bitBuffer, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *start, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> bytesize)00025 {00026     <span class="comment">// set start pointer of the buffer</span>00027     bitBuffer-&gt;dataptr = start;00028     bitBuffer-&gt;size = bytesize;00029     <span class="comment">// initialize indexing and length</span>00030     bitBuffer-&gt;dataindex = 0;00031     <a class="code" href="bitbuf_8h.html#a7">bitbufFlush</a>(bitBuffer);00032 }00033 00034 <span class="comment">// access routines</span>00035 <span class="comment"></span>00036 <span class="comment">//! Get a bit from the current position in the buffer</span>00037 <span class="comment"></span><span class="comment">//  returns the bit at the current position in the buffer</span>00038 <span class="comment">//  and increments the bit position</span><a name="l00039"></a><a class="code" href="bitbuf_8h.html#a2">00039</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="bitbuf_8h.html#a2">bitbufGet</a>(BitBuf* bitBuffer)00040 {00041     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> byte;00042     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> bit;00043     00044     <span class="comment">// get current working byte</span>00045     byte = bitBuffer-&gt;dataptr[bitBuffer-&gt;bytePos];00046     <span class="comment">// read data bit</span>00047     bit = (byte &amp; (1&lt;&lt;bitBuffer-&gt;bitPos))?(1):(0);00048 00049     <span class="comment">// increment bit counter</span>00050     <span class="keywordflow">if</span>(bitBuffer-&gt;bitPos &lt; 7)00051     {00052         bitBuffer-&gt;bitPos++;00053     }00054     <span class="keywordflow">else</span>00055     {00056         <span class="comment">// increment byte counter</span>00057         bitBuffer-&gt;bitPos = 0;00058         bitBuffer-&gt;bytePos++;00059     }00060 00061     <span class="comment">// return bit value</span>00062     <span class="keywordflow">return</span> bit;00063 }00064 <span class="comment"></span>00065 <span class="comment">//! Get a bit from a given index into the buffer</span>00066 <span class="comment"></span><span class="comment">//  returns the bit at position [bitIndex] in the buffer</span><a name="l00067"></a><a class="code" href="bitbuf_8h.html#a3">00067</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="bitbuf_8h.html#a3">bitbufGetAtIndex</a>(BitBuf* bitBuffer, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> bitIndex)00068 {00069     <span class="comment">// return bit at index in buffer</span>00070     <span class="keywordflow">return</span> (bitBuffer-&gt;dataptr[bitIndex&gt;&gt;3] &amp; (1&lt;&lt;(bitIndex &amp; 0x07)))?(1):(0);00071 }00072 <span class="comment"></span>00073 <span class="comment">//! Store a bit at the current position in the buffer</span>00074 <span class="comment"></span><span class="comment">//  stores the bit at the current position in the buffer</span>00075 <span class="comment">//  and increments the bit position</span><a name="l00076"></a><a class="code" href="bitbuf_8h.html#a4">00076</a> <span class="keywordtype">void</span> <a class="code" href="bitbuf_8h.html#a4">bitbufStore</a>(BitBuf* bitBuffer, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> bit)00077 {00078     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> byte;00079     <span class="comment">// get current working byte</span>00080     byte = bitBuffer-&gt;dataptr[bitBuffer-&gt;bytePos];00081     <span class="comment">// apply data bit</span>00082     <span class="keywordflow">if</span>(bit)00083         byte |=  (1&lt;&lt;bitBuffer-&gt;bitPos);00084     <span class="keywordflow">else</span>00085         byte &amp;= ~(1&lt;&lt;bitBuffer-&gt;bitPos);00086     <span class="comment">// store data</span>00087     bitBuffer-&gt;dataptr[bitBuffer-&gt;bytePos] = byte;00088     bitBuffer-&gt;datalength++;00089 00090     <span class="comment">// increment bit counter</span>00091     <span class="keywordflow">if</span>(bitBuffer-&gt;bitPos &lt; 7)00092     {00093         bitBuffer-&gt;bitPos++;00094     }00095     <span class="keywordflow">else</span>00096     {00097         <span class="comment">// increment byte counter</span>00098         bitBuffer-&gt;bitPos = 0;00099         bitBuffer-&gt;bytePos++;00100     }00101 }00102 <a name="l00103"></a><a class="code" href="bitbuf_8h.html#a6">00103</a> <span class="keywordtype">void</span> <a class="code" href="bitbuf_8h.html#a6">bitbufReset</a>(BitBuf* bitBuffer)00104 {00105     <span class="comment">// reset counters</span>00106     bitBuffer-&gt;bytePos = 0;00107     bitBuffer-&gt;bitPos = 0;00108 }00109 <a name="l00110"></a><a class="code" href="bitbuf_8h.html#a7">00110</a> <span class="keywordtype">void</span> <a class="code" href="bitbuf_8h.html#a7">bitbufFlush</a>(BitBuf* bitBuffer)00111 {00112     <span class="comment">// flush contents of the buffer</span>00113     bitBuffer-&gt;datalength = 0;00114     <span class="comment">// reset indexing</span>00115     <a class="code" href="bitbuf_8h.html#a6">bitbufReset</a>(bitBuffer);00116 }00117 <a name="l00118"></a><a class="code" href="bitbuf_8h.html#a5">00118</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="bitbuf_8h.html#a5">bitbufGetDataLength</a>(BitBuf* bitBuffer)00119 {00120     <span class="keywordflow">return</span> bitBuffer-&gt;datalength;00121 }00122 00123 <span class="comment">/*</span>00124 <span class="comment">unsigned char bitbufIsNotFull(cBuffer* buffer)</span>00125 <span class="comment">{</span>00126 <span class="comment">    // check to see if the buffer has room</span>00127 <span class="comment">    // return true if there is room</span>00128 <span class="comment">    return (buffer-&gt;datalength &lt; buffer-&gt;size);</span>00129 <span class="comment">}</span>00130 <span class="comment">*/</span>00131 </pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 15 03:50:21 2004 for Procyon AVRlib by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.6 </small></address></body></html>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人欧美一区二区三区黑人麻豆| 欧美视频一区在线观看| 精品日韩成人av| 国产一区二区精品久久91| 久久久久久久久久看片| 风间由美性色一区二区三区| 一区在线观看免费| 欧美在线综合视频| 久久精品国产77777蜜臀| 国产亚洲精品资源在线26u| 成人三级在线视频| 一区二区三区在线看| 欧美一二三四在线| 国产精品99久久久久久久女警| 国产精品国产三级国产aⅴ入口| 色综合久久中文综合久久97| 日韩精品乱码免费| 久久精品视频一区| 在线精品视频免费播放| 久久超级碰视频| 中文字幕在线播放不卡一区| 欧美日韩国产天堂| 国产乱子轮精品视频| 亚洲欧美日韩在线不卡| 日韩欧美精品三级| 播五月开心婷婷综合| 日韩成人免费看| 国产精品嫩草影院av蜜臀| 欧美高清一级片在线| 国产suv精品一区二区6| 亚洲影视在线播放| 亚洲精品一线二线三线无人区| 99久久99精品久久久久久| 日本欧美肥老太交大片| 国产精品午夜电影| 日韩欧美一区中文| bt欧美亚洲午夜电影天堂| 亚洲国产精品久久人人爱| 欧美sm美女调教| 91一区二区三区在线观看| 久久aⅴ国产欧美74aaa| 国产欧美视频一区二区三区| 欧美人与性动xxxx| 波多野结衣欧美| 国产一区二区三区最好精华液| 一区二区三区欧美视频| 国产亚洲一区二区三区四区| 91精品国产欧美一区二区| 99国产欧美另类久久久精品| 韩国理伦片一区二区三区在线播放 | 国产精品欧美一区二区三区| 欧美一激情一区二区三区| 91年精品国产| 成人美女视频在线观看| 国产中文字幕一区| 久久99精品久久只有精品| 亚洲成av人片观看| 亚洲欧美日韩久久精品| 欧美国产亚洲另类动漫| 久久综合九色综合欧美就去吻| 欧美精品久久99| 欧洲一区在线电影| 91麻豆.com| 国产69精品久久777的优势| 黄页网站大全一区二区| 美女视频一区在线观看| 日本不卡一二三| 亚洲成人1区2区| 午夜影视日本亚洲欧洲精品| 亚洲综合在线五月| 一区二区三区四区激情| 亚洲美女电影在线| 一区二区三区四区国产精品| 一区二区三区美女| 曰韩精品一区二区| 一区二区三区四区亚洲| 亚洲人吸女人奶水| 亚洲精品第1页| 一区二区三区高清| 亚洲一区二区三区四区五区黄 | 国产精品五月天| 中文字幕精品—区二区四季| 中文子幕无线码一区tr | 国产精品久久久久aaaa樱花 | 欧美中文字幕亚洲一区二区va在线 | av福利精品导航| www.一区二区| 一本一本久久a久久精品综合麻豆| av中文字幕不卡| 色猫猫国产区一区二在线视频| 色老头久久综合| 欧美精品黑人性xxxx| 日韩精品一区二区三区老鸭窝| 精品国产伦一区二区三区观看方式| 日韩免费高清视频| 国产色91在线| 亚洲视频每日更新| 亚洲va韩国va欧美va精品 | 国产日韩欧美激情| 亚洲欧美偷拍卡通变态| 午夜精品视频在线观看| 麻豆成人在线观看| a级精品国产片在线观看| 欧美三级在线视频| 亚洲精品在线电影| 亚洲男人天堂一区| 麻豆精品在线视频| 成人高清在线视频| 欧美日韩激情一区二区三区| 精品国产乱子伦一区| 亚洲欧美怡红院| 视频一区二区三区在线| 国产精品资源网站| 欧美午夜精品久久久久久孕妇 | 精品欧美一区二区久久| ...中文天堂在线一区| 天堂一区二区在线免费观看| 国产剧情一区二区| 精品视频在线免费看| 国产欧美精品区一区二区三区| 亚洲线精品一区二区三区八戒| 韩国一区二区三区| 在线国产亚洲欧美| 国产日韩欧美精品在线| 日韩精品乱码免费| 色av综合在线| 久久久不卡网国产精品一区| 亚洲国产人成综合网站| 成人美女在线视频| 日韩一级免费一区| 夜夜嗨av一区二区三区四季av | 欧美美女直播网站| 国产精品护士白丝一区av| 蜜臀av一区二区在线免费观看| 91影院在线免费观看| 久久亚洲精华国产精华液| 五月婷婷久久综合| 色94色欧美sute亚洲13| 久久精品夜色噜噜亚洲a∨| 日韩国产成人精品| 在线免费不卡视频| 国产精品久久影院| 国产一区二区三区高清播放| 6080亚洲精品一区二区| 一区二区三区国产精品| 99re视频精品| 国产精品日韩成人| 国产伦精品一区二区三区在线观看| 91精品久久久久久蜜臀| 亚洲大型综合色站| 欧美在线影院一区二区| 亚洲精品福利视频网站| 99精品视频一区二区三区| 欧美国产精品劲爆| 粉嫩蜜臀av国产精品网站| 久久久久久麻豆| 国产在线精品视频| 精品久久人人做人人爽| 久久99国内精品| 精品久久久网站| 激情图片小说一区| 日韩欧美一级二级三级久久久| 日日噜噜夜夜狠狠视频欧美人| 欧美日韩电影在线播放| 亚洲成人先锋电影| 在线不卡a资源高清| 偷窥国产亚洲免费视频| 9191久久久久久久久久久| 亚洲va天堂va国产va久| 欧美精品少妇一区二区三区| 日产国产高清一区二区三区 | 91福利资源站| 亚洲国产一区二区三区| 欧美日韩精品高清| 久久精品国产免费看久久精品| 日韩精品一区二区在线| 国产精品自在欧美一区| 国产精品区一区二区三区| 99re视频精品| 偷偷要91色婷婷| 欧美成人a视频| 国产成人免费网站| 1000精品久久久久久久久| 欧美性videosxxxxx| 婷婷中文字幕一区三区| 欧美精品一区二区三区很污很色的| 国精产品一区一区三区mba视频 | 精品国产乱码久久久久久1区2区| 精品写真视频在线观看| 国产人妖乱国产精品人妖| 91香蕉视频污在线| 天天操天天综合网| 久久久精品2019中文字幕之3| 91视视频在线直接观看在线看网页在线看| 国产精品久久久爽爽爽麻豆色哟哟 | 成人h精品动漫一区二区三区| 亚洲欧美日韩国产另类专区| 这里只有精品免费| 国产福利一区二区| 亚洲午夜久久久久久久久电影院|