]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - doc/html/tep102.html
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / doc / html / tep102.html
index c9d0985a80c13b359f247d68f647a09779ecc0cb..3e7e8dc2773dda5cf73bf2f514d259b906d7a76c 100644 (file)
@@ -3,7 +3,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
 <title>Timers</title>
 <meta name="author" content="Cory Sharp, Martin Turon, David Gay" />
 <style type="text/css">
@@ -41,11 +41,6 @@ blockquote.epigraph {
 dd {
   margin-bottom: 0.5em }
 
-/* Uncomment (& remove this text!) to get bold-faced definition list terms
-dt {
-  font-weight: bold }
-*/
-
 div.abstract {
   margin: 2em 5em }
 
@@ -296,19 +291,11 @@ ul.auto-toc {
 <tr class="field"><th class="docinfo-name">Type:</th><td class="field-body">Documentary</td>
 </tr>
 <tr><th class="docinfo-name">Status:</th>
-<td>Draft</td></tr>
+<td>Final</td></tr>
 <tr class="field"><th class="docinfo-name">TinyOS-Version:</th><td class="field-body">2.x</td>
 </tr>
 <tr><th class="docinfo-name">Author:</th>
 <td>Cory Sharp, Martin Turon, David Gay</td></tr>
-<tr class="field"><th class="docinfo-name">Draft-Created:</th><td class="field-body">22-Sep-2004</td>
-</tr>
-<tr class="field"><th class="docinfo-name">Draft-Version:</th><td class="field-body">1.8</td>
-</tr>
-<tr class="field"><th class="docinfo-name">Draft-Modified:</th><td class="field-body">2007-05-23</td>
-</tr>
-<tr class="field"><th class="docinfo-name">Draft-Discuss:</th><td class="field-body">TinyOS Developer List &lt;tinyos-devel at mail.millennium.berkeley.edu&gt;</td>
-</tr>
 </tbody>
 </table>
 <div class="note">
@@ -375,11 +362,10 @@ reasonably accommodating other precisions. The use of &quot;binary&quot; units
 is motivated by the common availability of hardware clocks driven
 by a 32768Hz crystal.</p>
 <p>Examples of widths are 8-bit, 16-bit, 32-bit, and 64-bit.  The width
-for timer interfaces and components SHOULD be 32-bits.  That is, for
-lack of a good reason, timer interfaces should expose a 32-bit
-interface.  In a number of circumstances there are good reasons not
-to expose a 32-bit interface.  This TEP emphasizes 32-bit widths
-while reasonably accommodating other widths.</p>
+for timer interfaces and components SHOULD be 32-bits.  This TEP
+emphasizes 32-bit widths while reasonably accommodating other widths -
+a particular platform may have good reasons not to expose a 32-bit
+interface.</p>
 <p>Accuracy reflects how closely a component conforms to the precision it
 claims to provide. Accuracy is affected by issues such as clock drift (much
 higher for internal vs crystal oscillators) and hardware limitations. As an
@@ -482,7 +468,7 @@ stop.</dd>
 <dt>stop()</dt>
 <dd>cancel any previously running alarm.</dd>
 <dt>fired()</dt>
-<dd>signals that the alarm has occurred.</dd>
+<dd>signals that the alarm has expired.</dd>
 <dt>isRunning()</dt>
 <dd>return TRUE if the alarm has been started and has not been cancelled
 or has not yet fired.  FALSE is returned otherwise.</dd>
@@ -517,7 +503,7 @@ reasonably efficient or accurate.  The BusyWait interface replaces
 the TOSH_uwait macro from TinyOS 1.x.</p>
 <p>BusyWait blocks for no less than the specified amount of time.  No
 explicit upper bound is imposed on the enacted delay, though it is
-expected the underlying implementation spins in a busy loop until
+expected that the underlying implementation spins in a busy loop until
 the specified amount of time has elapsed.</p>
 <pre class="literal-block">
 interface BusyWait&lt;precision_tag,size_type&gt;
@@ -583,10 +569,10 @@ stop.</dd>
 <dt>stop()</dt>
 <dd>cancel any previously running timer.</dd>
 <dt>fired()</dt>
-<dd>signals that the timer has occurred.</dd>
+<dd>signals that the timer has expired (one-shot) or repeated (periodic).</dd>
 <dt>isRunning()</dt>
 <dd>return TRUE if the timer has been started and has not been cancelled
-and has not fired for the case of one-shot timers.  One a periodic
+and has not fired for the case of one-shot timers.  Once a periodic
 timer is started, isRunning will return TRUE until it is cancelled.</dd>
 <dt>isOneShot()</dt>
 <dd>return TRUE if the timer is a one-shot timer.  Return FALSE
@@ -655,18 +641,22 @@ generic configuration Alarm32khz8C()
   provides interface Alarm&lt; T32khz, uint8_t &gt;;
 }
 </pre>
-<p>This pattern MAY be used to defined components for the platform that
-are mutually incompatible in single application.  Incompatible
+<p>This pattern MAY be used to define components for the platform that
+are mutually incompatible in single application.  Incompatible
 components SHOULD produce compile-time errors when compiled
 together.</p>
 </div>
 <div class="section">
 <h1><a id="hil-requirements" name="hil-requirements">4. HIL requirements</a></h1>
-<dl class="docutils">
-<dt>The following component MUST be provided on all platforms::</dt>
-<dd>HilTimerMilliC
-BusyWaitMicroC</dd>
-</dl>
+<p>The following component MUST be provided on all platforms</p>
+<pre class="literal-block">
+HilTimerMilliC
+BusyWaitMicroC
+</pre>
+<p>Both of these components use &quot;binary&quot; units, i.e., 1/1024s for
+HilTimerMilliC and 1/1048576s for BusyWaitMicroC. Components using
+other precisions (e.g., regular, non-binary milliseconds) MAY also be
+provided.</p>
 <div class="section">
 <h2><a id="hiltimermillic" name="hiltimermillic">HilTimerMilliC</a></h2>
 <pre class="literal-block">
@@ -851,7 +841,7 @@ generic component VirtualizeTimerC( typedef precision_tag, int max_timers )
 <li><tt class="docutils literal"><span class="pre">VirtualizeTimerC.nc</span></tt></li>
 </ul>
 </blockquote>
-<p>The implementation of Timers for the MSP430 is in
+<p>The implementation of timers for the MSP430 is in
 <tt class="docutils literal"><span class="pre">tinyos-2.x/tos/chips/msp430/timer</span></tt>:</p>
 <blockquote>
 <ul class="simple">
@@ -895,6 +885,9 @@ capture/compare special function registers</li>
 special function registers</li>
 </ul>
 </blockquote>
+<p>Implementation of timers for the ATmega128 and PXA27x may be found in
+<tt class="docutils literal"><span class="pre">tinyos-2.x/tos/chips/atm128/timer</span></tt> and
+<tt class="docutils literal"><span class="pre">tinyos-2.x/tos/chips/pxa27x/timer</span></tt> respectively.</p>
 </div>
 <div class="section">
 <h1><a id="author-s-address" name="author-s-address">7. Author's Address</a></h1>