Project

General

Profile

Revision 862

Added by Kevin Woo over 15 years ago

Updated analog.c and analog.h documentation and regenerated the docs. No need to remake the library as its just comments.

View differences:

group__time.html
4 4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5 5
<link href="tabs.css" rel="stylesheet" type="text/css">
6 6
</head><body>
7
<!-- Generated by Doxygen 1.5.3 -->
8
<div class="tabs">
9
  <ul>
10
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
11
    <li><a href="modules.html"><span>Modules</span></a></li>
12
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
13
    <li><a href="files.html"><span>Files</span></a></li>
14
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
15
  </ul>
7
<!-- Generated by Doxygen 1.5.5 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
13
      <li><a href="modules.html"><span>Modules</span></a></li>
14
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
15
      <li><a href="files.html"><span>Files</span></a></li>
16
    </ul>
17
  </div>
16 18
</div>
19
<div class="contents">
17 20
<h1>Time</h1>Time functions.  
18 21
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
19 22
<tr><td></td></tr>
......
83 86
<p>
84 87
Delay execution for the specified time. 
85 88
<p>
86
Delays for the specified number of milliseconds. The accuracy of this function is unknown.<p>
89
Delays for the specified number of milliseconds. It depends on F_CPU to be defined in order to calculate how many cycles it should delay. If it is not defined, a default clock of 8MHz is assumed.<p>
90
We use _delay_loop_2 which will run assembly instructions that should be 4 cycles long. Optimizations must be enabled for this to be true. That function is called to ensure around 1ms per execution. To generate multiple ms we run a for loop of how many milliseconds are desired.<p>
91
The error should be just the skew on the oscillator as the formula to calculate delay cycles should always be a whole number. The is some skew in practice though it is unavoidable. Delaying for less than 1s should make the error negligable.<p>
87 92
<dl compact><dt><b>Parameters:</b></dt><dd>
88 93
  <table border="0" cellspacing="2" cellpadding="0">
89 94
    <tr><td valign="top"></td><td valign="top"><em>ms</em>&nbsp;</td><td>the number of milliseconds to delay for </td></tr>
90 95
  </table>
91 96
</dl>
92 97

  
98
<p>Referenced by <a class="el" href="dio_8c-source.html#l00251">button1_wait()</a>, <a class="el" href="dio_8c-source.html#l00294">button2_wait()</a>, <a class="el" href="buzzer_8c-source.html#l00115">buzzer_chirp()</a>, and <a class="el" href="lcd_8c-source.html#l00173">lcd_init()</a>.</p>
99

  
93 100
</div>
94 101
</div><p>
95 102
<a class="anchor" name="g5c7f2bf39314463dd5f4913e05ca991d"></a><!-- doxytag: member="time.c::rtc_get" ref="g5c7f2bf39314463dd5f4913e05ca991d" args="(void)" -->
......
180 187

  
181 188
</div>
182 189
</div><p>
183
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Feb 6 20:27:39 2008 for libdragonfly by&nbsp;
190
</div>
191
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Sep 26 13:39:28 2008 for libdragonfly by&nbsp;
184 192
<a href="http://www.doxygen.org/index.html">
185
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
193
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
186 194
</body>
187 195
</html>

Also available in: Unified diff