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

📄 timer_8h-source.html

📁 方便飞利浦arm7tdmi 处理器lpc2100开发的C函数库 Procyon ARMlib-LPC2100 C-Language Function Library for Philips LPC21
💻 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 ARMlib-LPC2100: 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="files.html">File&nbsp;List</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 Timer Support Library for LPC2100. */</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        : Timer Support Library for LPC2100</span>00006 <span class="comment">// Author       : Pascal Stang - Copyright (C) 2004</span>00007 <span class="comment">// Created      : 2004.05.05</span>00008 <span class="comment">// Revised      : 2004.07.12</span>00009 <span class="comment">// Version      : 0.1</span>00010 <span class="comment">// Target MCU   : ARM processors</span>00011 <span class="comment">// Editor Tabs  : 4</span>00012 <span class="comment">//</span>00013 <span class="comment">// NOTE: This code is currently below version 1.0, and therefore is considered</span>00014 <span class="comment">// to be lacking in some functionality or documentation, or may not be fully</span>00015 <span class="comment">// tested.  Nonetheless, you can expect most functions to work.</span>00016 <span class="comment">//</span>00017 <span class="comment">// This code is distributed under the GNU Public License</span>00018 <span class="comment">//      which can be found at http://www.gnu.org/licenses/gpl.txt</span>00019 <span class="comment">//</span>00020 <span class="comment">//*****************************************************************************</span>00021 00022 <span class="preprocessor">#ifndef TIMER_H</span>00023 <span class="preprocessor"></span><span class="preprocessor">#define TIMER_H</span>00024 <span class="preprocessor"></span>00025 <span class="preprocessor">#include "<a class="code" href="global_8h.html">global.h</a>"</span>00026 00027 <span class="comment">// defines</span>00028 <span class="preprocessor">#define TIMER0MATCH0_INT        0</span>00029 <span class="preprocessor"></span><span class="preprocessor">#define TIMER0MATCH1_INT        1</span>00030 <span class="preprocessor"></span><span class="preprocessor">#define TIMER0MATCH2_INT        2</span>00031 <span class="preprocessor"></span><span class="preprocessor">#define TIMER0MATCH3_INT        3</span>00032 <span class="preprocessor"></span><span class="preprocessor">#define TIMER0CAPTURE0_INT      4</span>00033 <span class="preprocessor"></span><span class="preprocessor">#define TIMER0CAPTURE1_INT      5</span>00034 <span class="preprocessor"></span><span class="preprocessor">#define TIMER0CAPTURE2_INT      6</span>00035 <span class="preprocessor"></span><span class="comment">//#define TIMER0CAPTURE3_INT    7</span>00036 <span class="preprocessor">#define TIMER1MATCH0_INT        8</span>00037 <span class="preprocessor"></span><span class="preprocessor">#define TIMER1MATCH1_INT        9</span>00038 <span class="preprocessor"></span><span class="preprocessor">#define TIMER1MATCH2_INT        10</span>00039 <span class="preprocessor"></span><span class="preprocessor">#define TIMER1MATCH3_INT        11</span>00040 <span class="preprocessor"></span><span class="preprocessor">#define TIMER1CAPTURE0_INT      12</span>00041 <span class="preprocessor"></span><span class="preprocessor">#define TIMER1CAPTURE1_INT      13</span>00042 <span class="preprocessor"></span><span class="preprocessor">#define TIMER1CAPTURE2_INT      14</span>00043 <span class="preprocessor"></span><span class="preprocessor">#define TIMER1CAPTURE3_INT      15</span>00044 <span class="preprocessor"></span>00045 <span class="preprocessor">#define TIMER_NUM_INTERRUPTS    16</span>00046 <span class="preprocessor"></span>00047 00048 <span class="comment">// functions</span>00049 <span class="keywordtype">void</span> delay(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> d);00050 00051 <span class="keywordtype">void</span> timerInit(<span class="keywordtype">void</span>);00052 <span class="keywordtype">void</span> timer0Init(<span class="keywordtype">void</span>);00053 <span class="keywordtype">void</span> timer1Init(<span class="keywordtype">void</span>);00054 <span class="comment"></span>00055 <span class="comment">//! Attach a user function to a timer interrupt</span>00056 <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="timer_8h.html#a20">timerAttach</a>(u08 interruptNum, <span class="keywordtype">void</span> (*userFunc)(<span class="keywordtype">void</span>) );<span class="comment"></span>00057 <span class="comment">//! Detach a user function from a timer interrupt</span>00058 <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="timer_8h.html#a21">timerDetach</a>(u08 interruptNum);00059 00060 00061 <span class="keywordtype">void</span> timer0PrescalerSet(u32 clockDiv);00062 <span class="keywordtype">void</span> timer1PrescalerSet(u32 clockDiv);00063 00064 <span class="keywordtype">void</span> timerPause(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> pause_ms);00065 00066 <span class="keywordtype">void</span> timer0ClearOverflowCount(<span class="keywordtype">void</span>);00067 u32 timer0GetOverflowCount(<span class="keywordtype">void</span>);00068 <span class="keywordtype">void</span> timer1ClearOverflowCount(<span class="keywordtype">void</span>);00069 u32 timer1GetOverflowCount(<span class="keywordtype">void</span>);00070 00071 00072 <span class="keywordtype">void</span> timer0Match0Set(u32 value);00073 <span class="keywordtype">void</span> timer0Match1Set(u32 value);00074 00075 <span class="keywordtype">void</span> timer1Match0Set(u32 value);00076 <span class="keywordtype">void</span> timer1Match1Set(u32 value);00077 00078 <span class="keywordtype">void</span> timer0Capture0Init(<span class="keywordtype">int</span> on);00079 <span class="keywordtype">void</span> timer0Capture1Init(<span class="keywordtype">int</span> on);00080 00081 <span class="keywordtype">void</span> timer0Service(<span class="keywordtype">void</span>) __attribute__((naked));00082 <span class="keywordtype">void</span> timer1Service(<span class="keywordtype">void</span>) __attribute__((naked));00083 00084 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Jul 13 03:38:12 2004 for Procyon ARMlib-LPC2100 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>

⌨️ 快捷键说明

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