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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? timer_8h-source.html

?? ATMEL的AVR單片機庫文件
?? HTML
?? 第 1 頁 / 共 2 頁
字號:
<!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: timer.h 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>timer.h</h1><a href="timer_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*! \file timer.h \brief System Timer function library. */</span>00002 <span class="comment">//*****************************************************************************</span>00003 <span class="comment">//</span>00004 <span class="comment">// File Name    : 'timer.h'</span>00005 <span class="comment">// Title        : System Timer function library</span>00006 <span class="comment">// Author       : Pascal Stang - Copyright (C) 2000-2002</span>00007 <span class="comment">// Created      : 11/22/2000</span>00008 <span class="comment">// Revised      : 02/10/2003</span>00009 <span class="comment">// Version      : 1.1</span>00010 <span class="comment">// Target MCU   : Atmel AVR Series</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 <span class="comment">// Notes:   The Atmel AVR Series Processors each contain at least one</span>00018 <span class="comment">//          hardware timer/counter.  Many of the processors contain 2 or 3</span>00019 <span class="comment">//          timers.  Generally speaking, a timer is a hardware counter inside</span>00020 <span class="comment">//          the processor which counts at a rate related to the main CPU clock</span>00021 <span class="comment">//          frequency.  Because the counter value increasing (counting up) at</span>00022 <span class="comment">//          a precise rate, we can use it as a timer to create or measure </span>00023 <span class="comment">//          precise delays, schedule events, or generate signals of a certain</span>00024 <span class="comment">//          frequency or pulse-width.</span>00025 <span class="comment">//              As an example, the ATmega163 processor has 3 timer/counters.</span>00026 <span class="comment">//          Timer0, Timer1, and Timer2 are 8, 16, and 8 bits wide respectively.</span>00027 <span class="comment">//          This means that they overflow, or roll over back to zero, at a</span>00028 <span class="comment">//          count value of 256 for 8bits or 65536 for 16bits.  A prescaler is</span>00029 <span class="comment">//          avaiable for each timer, and the prescaler allows you to pre-divide</span>00030 <span class="comment">//          the main CPU clock rate down to a slower speed before feeding it to</span>00031 <span class="comment">//          the counting input of a timer.  For example, if the CPU clock</span>00032 <span class="comment">//          frequency is 3.69MHz, and Timer0's prescaler is set to divide-by-8,</span>00033 <span class="comment">//          then Timer0 will "tic" at 3690000/8 = 461250Hz.  Because Timer0 is</span>00034 <span class="comment">//          an 8bit timer, it will count to 256 in just 256/461250Hz = 0.555ms.</span>00035 <span class="comment">//          In fact, when it hits 255, it will overflow and start again at</span>00036 <span class="comment">//          zero.  In this case, Timer0 will overflow 461250/256 = 1801.76</span>00037 <span class="comment">//          times per second.</span>00038 <span class="comment">//              Timer0 can be used a number of ways simultaneously.  First, the</span>00039 <span class="comment">//          value of the timer can be read by accessing the CPU register TCNT0.</span>00040 <span class="comment">//          We could, for example, figure out how long it takes to execute a</span>00041 <span class="comment">//          C command by recording the value of TCNT0 before and after</span>00042 <span class="comment">//          execution, then subtract (after-before) = time elapsed.  Or we can</span>00043 <span class="comment">//          enable the overflow interrupt which goes off every time T0</span>00044 <span class="comment">//          overflows and count out longer delays (multiple overflows), or</span>00045 <span class="comment">//          execute a special periodic function at every overflow.</span>00046 <span class="comment">//              The other timers (Timer1 and Timer2) offer all the abilities of</span>00047 <span class="comment">//          Timer0 and many more features.  Both T1 and T2 can operate as</span>00048 <span class="comment">//          general-purpose timers, but T1 has special hardware allowing it to</span>00049 <span class="comment">//          generate PWM signals, while T2 is specially designed to help count</span>00050 <span class="comment">//          out real time (like hours, minutes, seconds).  See the</span>00051 <span class="comment">//          Timer/Counter section of the processor datasheet for more info.</span>00052 <span class="comment">//</span>00053 <span class="comment">//*****************************************************************************</span>00054 00055 <span class="preprocessor">#ifndef TIMER_H</span>00056 <span class="preprocessor"></span><span class="preprocessor">#define TIMER_H</span>00057 <span class="preprocessor"></span>00058 <span class="preprocessor">#include "<a class="code" href="global_8h.html">global.h</a>"</span>00059 00060 <span class="comment">// constants/macros/typdefs</span>00061 00062 <span class="comment">// processor compatibility fixes</span>00063 <span class="preprocessor">#ifdef __AVR_ATmega323__</span>00064 <span class="preprocessor"></span>    <span class="comment">// redefinition for the Mega323</span>00065 <span class="preprocessor">    #define CTC1    CTC10</span>00066 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00067 <span class="preprocessor"></span><span class="preprocessor">#ifndef PWM10</span>00068 <span class="preprocessor"></span>    <span class="comment">// mega128 PWM bits</span>00069 <span class="preprocessor">    #define PWM10   WGM10</span>00070 <span class="preprocessor"></span><span class="preprocessor">    #define PWM11   WGM11</span>00071 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00072 <span class="preprocessor"></span>00073 <span class="comment">// Timer/clock prescaler values and timer overflow rates</span>00074 <span class="comment">// tics = rate at which the timer counts up</span>00075 <span class="comment">// 8bitoverflow = rate at which the timer overflows 8bits (or reaches 256)</span>00076 <span class="comment">// 16bit [overflow] = rate at which the timer overflows 16bits (65536)</span>00077 <span class="comment">// </span>00078 <span class="comment">// overflows can be used to generate periodic interrupts</span>00079 <span class="comment">//</span>00080 <span class="comment">// for 8MHz crystal</span>00081 <span class="comment">// 0 = STOP (Timer not counting)</span>00082 <span class="comment">// 1 = CLOCK        tics= 8MHz          8bitoverflow= 31250Hz       16bit= 122.070Hz</span>00083 <span class="comment">// 2 = CLOCK/8      tics= 1MHz          8bitoverflow= 3906.25Hz     16bit=  15.259Hz</span>00084 <span class="comment">// 3 = CLOCK/64     tics= 125kHz        8bitoverflow=  488.28Hz     16bit=   1.907Hz</span>00085 <span class="comment">// 4 = CLOCK/256    tics= 31250Hz       8bitoverflow=  122.07Hz     16bit=  0.477Hz</span>00086 <span class="comment">// 5 = CLOCK/1024   tics= 7812.5Hz      8bitoverflow=   30.52Hz     16bit=   0.119Hz</span>00087 <span class="comment">// 6 = External Clock on T(x) pin (falling edge)</span>00088 <span class="comment">// 7 = External Clock on T(x) pin (rising edge)</span>00089 00090 <span class="comment">// for 4MHz crystal</span>00091 <span class="comment">// 0 = STOP (Timer not counting)</span>00092 <span class="comment">// 1 = CLOCK        tics= 4MHz          8bitoverflow= 15625Hz       16bit=  61.035Hz</span>00093 <span class="comment">// 2 = CLOCK/8      tics= 500kHz        8bitoverflow= 1953.125Hz    16bit=   7.629Hz</span>00094 <span class="comment">// 3 = CLOCK/64     tics= 62500Hz       8bitoverflow=  244.141Hz    16bit=   0.954Hz</span>00095 <span class="comment">// 4 = CLOCK/256    tics= 15625Hz       8bitoverflow=   61.035Hz    16bit=   0.238Hz</span>00096 <span class="comment">// 5 = CLOCK/1024   tics= 3906.25Hz     8bitoverflow=   15.259Hz    16bit=   0.060Hz</span>00097 <span class="comment">// 6 = External Clock on T(x) pin (falling edge)</span>00098 <span class="comment">// 7 = External Clock on T(x) pin (rising edge)</span>00099 00100 <span class="comment">// for 3.69MHz crystal</span>00101 <span class="comment">// 0 = STOP (Timer not counting)</span>00102 <span class="comment">// 1 = CLOCK        tics= 3.69MHz       8bitoverflow= 14414Hz       16bit=  56.304Hz</span>00103 <span class="comment">// 2 = CLOCK/8      tics= 461250Hz      8bitoverflow= 1801.758Hz    16bit=   7.038Hz</span>00104 <span class="comment">// 3 = CLOCK/64     tics= 57625.25Hz    8bitoverflow=  225.220Hz    16bit=   0.880Hz</span>00105 <span class="comment">// 4 = CLOCK/256    tics= 14414.063Hz   8bitoverflow=   56.305Hz    16bit=   0.220Hz</span>00106 <span class="comment">// 5 = CLOCK/1024   tics=  3603.516Hz   8bitoverflow=   14.076Hz    16bit=   0.055Hz</span>00107 <span class="comment">// 6 = External Clock on T(x) pin (falling edge)</span>00108 <span class="comment">// 7 = External Clock on T(x) pin (rising edge)</span>00109 00110 <span class="comment">// for 32.768KHz crystal on timer 2 (use for real-time clock)</span>00111 <span class="comment">// 0 = STOP</span>00112 <span class="comment">// 1 = CLOCK        tics= 32.768kHz     8bitoverflow= 128Hz</span>00113 <span class="comment">// 2 = CLOCK/8      tics= 4096kHz       8bitoverflow=  16Hz</span>00114 <span class="comment">// 3 = CLOCK/32     tics= 1024kHz       8bitoverflow=   4Hz</span>00115 <span class="comment">// 4 = CLOCK/64     tics= 512Hz         8bitoverflow=   2Hz</span>00116 <span class="comment">// 5 = CLOCK/128    tics= 256Hz         8bitoverflow=   1Hz</span>00117 <span class="comment">// 6 = CLOCK/256    tics= 128Hz         8bitoverflow=   0.5Hz</span>00118 <span class="comment">// 7 = CLOCK/1024   tics= 32Hz          8bitoverflow=   0.125Hz</span>00119 <a name="l00120"></a><a class="code" href="timer_8h.html#a2">00120</a> <span class="preprocessor">#define TIMER_CLK_STOP          0x00    </span><span class="comment">///&lt; Timer Stopped</span><a name="l00121"></a><a class="code" href="timer_8h.html#a3">00121</a> <span class="comment"></span>#define TIMER_CLK_DIV1          0x01    <span class="comment">///&lt; Timer clocked at F_CPU</span><a name="l00122"></a><a class="code" href="timer_8h.html#a4">00122</a> <span class="comment"></span>#define TIMER_CLK_DIV8          0x02    <span class="comment">///&lt; Timer clocked at F_CPU/8</span><a name="l00123"></a><a class="code" href="timer_8h.html#a5">00123</a> <span class="comment"></span>#define TIMER_CLK_DIV64         0x03    <span class="comment">///&lt; Timer clocked at F_CPU/64</span><a name="l00124"></a><a class="code" href="timer_8h.html#a6">00124</a> <span class="comment"></span>#define TIMER_CLK_DIV256        0x04    <span class="comment">///&lt; Timer clocked at F_CPU/256</span><a name="l00125"></a><a class="code" href="timer_8h.html#a7">00125</a> <span class="comment"></span>#define TIMER_CLK_DIV1024       0x05    <span class="comment">///&lt; Timer clocked at F_CPU/1024</span><a name="l00126"></a><a class="code" href="timer_8h.html#a8">00126</a> <span class="comment"></span>#define TIMER_CLK_T_FALL        0x06    <span class="comment">///&lt; Timer clocked at T falling edge</span><a name="l00127"></a><a class="code" href="timer_8h.html#a9">00127</a> <span class="comment"></span>#define TIMER_CLK_T_RISE        0x07    <span class="comment">///&lt; Timer clocked at T rising edge</span><a name="l00128"></a><a class="code" href="timer_8h.html#a10">00128</a> <span class="comment"></span>#define TIMER_PRESCALE_MASK     0x07    <span class="comment">///&lt; Timer Prescaler Bit-Mask</span>00129 <span class="comment"></span><a name="l00130"></a><a class="code" href="timer_8h.html#a11">00130</a> <span class="preprocessor">#define TIMERRTC_CLK_STOP       0x00    </span><span class="comment">///&lt; RTC Timer Stopped</span><a name="l00131"></a><a class="code" href="timer_8h.html#a12">00131</a> <span class="comment"></span>#define TIMERRTC_CLK_DIV1       0x01    <span class="comment">///&lt; RTC Timer clocked at F_CPU</span><a name="l00132"></a><a class="code" href="timer_8h.html#a13">00132</a> <span class="comment"></span>#define TIMERRTC_CLK_DIV8       0x02    <span class="comment">///&lt; RTC Timer clocked at F_CPU/8</span><a name="l00133"></a><a class="code" href="timer_8h.html#a14">00133</a> <span class="comment"></span>#define TIMERRTC_CLK_DIV32      0x03    <span class="comment">///&lt; RTC Timer clocked at F_CPU/32</span><a name="l00134"></a><a class="code" href="timer_8h.html#a15">00134</a> <span class="comment"></span>#define TIMERRTC_CLK_DIV64      0x04    <span class="comment">///&lt; RTC Timer clocked at F_CPU/64</span><a name="l00135"></a><a class="code" href="timer_8h.html#a16">00135</a> <span class="comment"></span>#define TIMERRTC_CLK_DIV128     0x05    <span class="comment">///&lt; RTC Timer clocked at F_CPU/128</span><a name="l00136"></a><a class="code" href="timer_8h.html#a17">00136</a> <span class="comment"></span>#define TIMERRTC_CLK_DIV256     0x06    <span class="comment">///&lt; RTC Timer clocked at F_CPU/256</span><a name="l00137"></a><a class="code" href="timer_8h.html#a18">00137</a> <span class="comment"></span>#define TIMERRTC_CLK_DIV1024    0x07    <span class="comment">///&lt; RTC Timer clocked at F_CPU/1024</span><a name="l00138"></a><a class="code" href="timer_8h.html#a19">00138</a> <span class="comment"></span>#define TIMERRTC_PRESCALE_MASK  0x07    <span class="comment">///&lt; RTC Timer Prescaler Bit-Mask</span>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人精品免费一区二区| 午夜av区久久| 美女免费视频一区| 91丝袜呻吟高潮美腿白嫩在线观看| 精品少妇一区二区三区在线播放| 五月天欧美精品| 色婷婷av一区二区三区软件 | 亚洲乱码国产乱码精品精可以看 | 最新国产の精品合集bt伙计| 国产成人一区在线| 亚洲色图欧洲色图婷婷| 懂色av一区二区夜夜嗨| 精品播放一区二区| 国模套图日韩精品一区二区| 欧美大胆人体bbbb| 精彩视频一区二区| 欧美韩日一区二区三区四区| 日韩 欧美一区二区三区| 制服丝袜中文字幕一区| 日本系列欧美系列| 久久综合视频网| www.日韩精品| 亚洲婷婷综合色高清在线| 91网站在线观看视频| 免费高清视频精品| 精品久久久久一区二区国产| 国产精品中文字幕日韩精品| 国产精品久久久久久久浪潮网站| 99re热这里只有精品视频| 亚洲已满18点击进入久久| 精品国产一区二区三区av性色| 久久精品国产77777蜜臀| 久久午夜老司机| 91久久精品一区二区三区| 亚洲成av人片一区二区| 精品人伦一区二区色婷婷| 久久精品99国产精品| 欧美日韩中文字幕精品| 欧美va亚洲va香蕉在线| 国产精品网站在线观看| 亚洲一区在线播放| 国产一区二区精品久久99| thepron国产精品| 欧美日韩免费观看一区三区| 欧美一区二区在线观看| 七七婷婷婷婷精品国产| 欧美国产精品一区二区| 亚洲一区二区视频| 国产精品系列在线观看| 精品精品国产高清a毛片牛牛| 丝袜美腿亚洲一区| 欧美大白屁股肥臀xxxxxx| 水蜜桃久久夜色精品一区的特点| 欧美三级中文字幕| 国产福利一区二区三区在线视频| 亚洲欧洲精品一区二区三区不卡| 欧美精品v日韩精品v韩国精品v| 精品一区二区三区在线观看 | 一区二区三区在线视频观看58| 欧美亚洲动漫精品| 午夜精品福利在线| 91久久久免费一区二区| 久久综合久久综合九色| 美日韩黄色大片| 国产欧美日本一区视频| 99re热这里只有精品视频| 男人的j进女人的j一区| 日韩电影在线观看电影| 欧美精品黑人性xxxx| 99久久99久久久精品齐齐| 另类中文字幕网| 亚洲高清久久久| 亚洲伦理在线精品| 亚洲特级片在线| 欧美婷婷六月丁香综合色| 不卡一卡二卡三乱码免费网站| 免费在线观看日韩欧美| 午夜精品在线视频一区| 亚洲成av人片在线观看无码| 日韩精品一区二区三区四区视频 | 免费成人在线视频观看| 一区二区欧美国产| 久久免费看少妇高潮| 欧洲亚洲国产日韩| 日韩精品三区四区| 国产日韩欧美麻豆| 欧美一二三四在线| 欧美亚洲图片小说| av成人动漫在线观看| 精东粉嫩av免费一区二区三区| 精品1区2区在线观看| 欧美日韩中文一区| 欧美午夜不卡视频| 成人免费av在线| 成人av在线观| 欧美亚洲综合色| 欧美一级日韩免费不卡| 日韩免费视频一区| 久久欧美一区二区| 国产精品国产三级国产普通话99| 亚洲国产激情av| 亚洲三级理论片| 亚洲国产日日夜夜| 国产精品一区二区久久不卡 | 51精品久久久久久久蜜臀| 欧美日韩一区二区三区视频 | 日本不卡的三区四区五区| 国内精品嫩模私拍在线| 欧美日本韩国一区二区三区视频 | 日韩精品电影在线| 国产伦精品一区二区三区免费| 不卡在线视频中文字幕| 欧美精品 日韩| 亚洲欧洲三级电影| 久久99精品国产.久久久久久| 成人国产一区二区三区精品| 欧美一级免费观看| 亚洲精品亚洲人成人网 | 宅男在线国产精品| 亚洲一区在线观看视频| 波多野结衣中文字幕一区二区三区| 欧美午夜电影网| 亚洲欧美色一区| 91女人视频在线观看| 日本一区二区动态图| 国产精品中文欧美| 日韩欧美一区中文| 亚洲成精国产精品女| 色综合久久久久综合体桃花网| 国产亚洲精品bt天堂精选| 久久99这里只有精品| 日韩精品在线网站| 蜜桃一区二区三区在线观看| 日韩欧美亚洲国产精品字幕久久久| 亚洲综合在线视频| 欧美日韩国产综合久久 | 成人少妇影院yyyy| 中文字幕在线免费不卡| 91猫先生在线| 午夜av区久久| 日本一区免费视频| 色婷婷精品久久二区二区蜜臂av | 91在线看国产| 一区二区三区成人| 日韩一区二区精品在线观看| 精品一区二区精品| 精品成人一区二区三区四区| 国产成人高清在线| 亚洲日本青草视频在线怡红院| 欧美视频三区在线播放| 视频一区二区国产| 国产蜜臀av在线一区二区三区| 色丁香久综合在线久综合在线观看| 天堂资源在线中文精品| 国产三级精品三级| 91精品国产入口在线| av在线不卡电影| 激情综合色综合久久综合| 一区二区三区欧美视频| 久久久不卡影院| 日韩午夜激情av| 在线观看91精品国产麻豆| 国产成人精品影院| 久久99久久99| 久久aⅴ国产欧美74aaa| 天堂va蜜桃一区二区三区漫画版| 中文欧美字幕免费| 久久亚区不卡日本| 亚洲精品一区二区三区蜜桃下载| 欧美视频完全免费看| 欧美亚洲高清一区| 欧美揉bbbbb揉bbbbb| 在线免费观看日本欧美| 在线观看中文字幕不卡| 色乱码一区二区三区88| 91成人免费网站| 色视频一区二区| 欧美日韩免费观看一区二区三区 | 在线不卡免费欧美| 色综合久久88色综合天天免费| 成人黄页毛片网站| 91丨porny丨蝌蚪视频| 欧美在线不卡一区| 日韩视频国产视频| 国产欧美日韩视频一区二区| 国产日韩高清在线| 中文字幕一区二区三中文字幕| 亚洲精品乱码久久久久久日本蜜臀| 亚洲一区二区三区三| 久久机这里只有精品| 成人av小说网| 欧美日韩精品久久久| 日韩精品一区二区三区视频播放| 欧美精品一区二区三区在线播放| 国产色婷婷亚洲99精品小说| 日韩久久一区二区| 奇米在线7777在线精品| 色哟哟一区二区在线观看| 日韩欧美不卡在线观看视频| 亚洲码国产岛国毛片在线|