root / branches / encoders / docs / libdragonfly / group__time.html @ 856
History | View | Annotate | Download (13.2 KB)
1 | 41 | bcoltin | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|---|---|---|
2 | 855 | justin | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
3 | 41 | bcoltin | <title>libdragonfly: Time</title> |
4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
||
5 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
||
6 | </head><body> |
||
7 | 855 | justin | <!-- Generated by Doxygen 1.5.4 -->
|
8 | 41 | bcoltin | <div class="tabs"> |
9 | <ul>
|
||
10 | <li><a href="index.html"><span>Main Page</span></a></li> |
||
11 | <li><a href="modules.html"><span>Modules</span></a></li> |
||
12 | <li><a href="files.html"><span>Files</span></a></li> |
||
13 | 855 | justin | <li><a href="pages.html"><span>Related Pages</span></a></li> |
14 | </ul>
|
||
15 | </div>
|
||
16 | 41 | bcoltin | <h1>Time</h1>Time functions. |
17 | <a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0"> |
||
18 | <tr><td></td></tr> |
||
19 | <tr><td colspan="2"><br><h2>Defines</h2></td></tr> |
||
20 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gd271145628da4e0e85e3e2486d117713"></a><!-- doxytag: member="time::SIXTEENTH_SECOND" ref="gd271145628da4e0e85e3e2486d117713" args="" --> |
||
21 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__time.html#gd271145628da4e0e85e3e2486d117713">SIXTEENTH_SECOND</a> 1</td></tr> |
||
22 | |||
23 | <tr><td class="mdescLeft"> </td><td class="mdescRight">A sixteenth of a second. <br></td></tr> |
||
24 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g7bdae984203001070e9abeb3190f844a"></a><!-- doxytag: member="time::EIGTH_SECOND" ref="g7bdae984203001070e9abeb3190f844a" args="" --> |
||
25 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__time.html#g7bdae984203001070e9abeb3190f844a">EIGTH_SECOND</a> 2</td></tr> |
||
26 | |||
27 | <tr><td class="mdescLeft"> </td><td class="mdescRight">An eighth of a second. <br></td></tr> |
||
28 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g0b2a348d9afca1f1182bc2bb2aa6a3d1"></a><!-- doxytag: member="time::QUARTER_SECOND" ref="g0b2a348d9afca1f1182bc2bb2aa6a3d1" args="" --> |
||
29 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__time.html#g0b2a348d9afca1f1182bc2bb2aa6a3d1">QUARTER_SECOND</a> 4</td></tr> |
||
30 | |||
31 | <tr><td class="mdescLeft"> </td><td class="mdescRight">A quarter of a second. <br></td></tr> |
||
32 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gf95f27544f39827250d6bef6fa5fe18e"></a><!-- doxytag: member="time::HALF_SECOND" ref="gf95f27544f39827250d6bef6fa5fe18e" args="" --> |
||
33 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__time.html#gf95f27544f39827250d6bef6fa5fe18e">HALF_SECOND</a> 8</td></tr> |
||
34 | |||
35 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Half of a second. <br></td></tr> |
||
36 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g94212be2394d2d37d9dfd33d07d82dba"></a><!-- doxytag: member="time::SECOND" ref="g94212be2394d2d37d9dfd33d07d82dba" args="" --> |
||
37 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__time.html#g94212be2394d2d37d9dfd33d07d82dba">SECOND</a> 16</td></tr> |
||
38 | |||
39 | <tr><td class="mdescLeft"> </td><td class="mdescRight">One second. <br></td></tr> |
||
40 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g4c2dc0c899e1571596205f29fcc35cd6"></a><!-- doxytag: member="time::TWO_SECOND" ref="g4c2dc0c899e1571596205f29fcc35cd6" args="" --> |
||
41 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__time.html#g4c2dc0c899e1571596205f29fcc35cd6">TWO_SECOND</a> 32</td></tr> |
||
42 | |||
43 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Two seconds. <br></td></tr> |
||
44 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g335312d1eed285bbc48a7f383ad78d97"></a><!-- doxytag: member="time::FOUR_SECOND" ref="g335312d1eed285bbc48a7f383ad78d97" args="" --> |
||
45 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__time.html#g335312d1eed285bbc48a7f383ad78d97">FOUR_SECOND</a> 64</td></tr> |
||
46 | |||
47 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Four seconds. <br></td></tr> |
||
48 | <tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
||
49 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__time.html#g8aa473f8ae9a91df4bc9ea700983c72d">delay_ms</a> (int ms)</td></tr> |
||
50 | |||
51 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Delay execution for the specified time. <a href="#g8aa473f8ae9a91df4bc9ea700983c72d"></a><br></td></tr> |
||
52 | 855 | justin | <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__time.html#ge93857794a06e7ab645347df06d6d640">rtc_multi_init</a> (int *prescale_opt, void(*rtc_fun[])(void), int argc)</td></tr> |
53 | 41 | bcoltin | |
54 | 855 | justin | <tr><td class="mdescLeft"> </td><td class="mdescRight">Enable the realtime clock. <a href="#ge93857794a06e7ab645347df06d6d640"></a><br></td></tr> |
55 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g45e2784ce997ebe9ab21a0816a013e2f"></a><!-- doxytag: member="time::rtc_add_function" ref="g45e2784ce997ebe9ab21a0816a013e2f" args="(void(*rtc_func)(void), int prescale_opt)" --> |
||
56 | int </td><td class="memItemRight" valign="bottom"><b>rtc_add_function</b> (void(*rtc_func)(void), int prescale_opt)</td></tr> |
||
57 | |||
58 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gdad2598c41e11c8f371c100f6771e450"></a><!-- doxytag: member="time::rtc_remove_function" ref="gdad2598c41e11c8f371c100f6771e450" args="(void(*rtc_func)(void))" --> |
||
59 | int </td><td class="memItemRight" valign="bottom"><b>rtc_remove_function</b> (void(*rtc_func)(void))</td></tr> |
||
60 | |||
61 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gbbee5f702a86163310621b45222a9be5"></a><!-- doxytag: member="time::rtc_get_function_count" ref="gbbee5f702a86163310621b45222a9be5" args="()" --> |
||
62 | int </td><td class="memItemRight" valign="bottom"><b>rtc_get_function_count</b> ()</td></tr> |
||
63 | |||
64 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g11c009f469ddfe98e67f6739e3a99680"></a><!-- doxytag: member="time::rtc_init" ref="g11c009f469ddfe98e67f6739e3a99680" args="(int prescale_opt, void(*rtc_func)(void))" --> |
||
65 | int </td><td class="memItemRight" valign="bottom"><b>rtc_init</b> (int prescale_opt, void(*rtc_func)(void))</td></tr> |
||
66 | |||
67 | 41 | bcoltin | <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__time.html#g5c7f2bf39314463dd5f4913e05ca991d">rtc_get</a> (void)</td></tr> |
68 | |||
69 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the value of the realtime clock. <a href="#g5c7f2bf39314463dd5f4913e05ca991d"></a><br></td></tr> |
||
70 | 855 | justin | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g970eb088e505275af967d3c675efbdd4"></a><!-- doxytag: member="time::rtc_get_pos" ref="g970eb088e505275af967d3c675efbdd4" args="(int pos)" --> |
71 | int </td><td class="memItemRight" valign="bottom"><b>rtc_get_pos</b> (int pos)</td></tr> |
||
72 | |||
73 | 41 | bcoltin | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__time.html#g83ae542199d1c0e964aff89537d686a3">rtc_reset</a> (void)</td></tr> |
74 | |||
75 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Reset the counter of the realtime clock. <a href="#g83ae542199d1c0e964aff89537d686a3"></a><br></td></tr> |
||
76 | 855 | justin | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g5bfa1dec778ee0198ea3e61a81041561"></a><!-- doxytag: member="time::rtc_reset_all" ref="g5bfa1dec778ee0198ea3e61a81041561" args="(void)" --> |
77 | void </td><td class="memItemRight" valign="bottom"><b>rtc_reset_all</b> (void)</td></tr> |
||
78 | |||
79 | 41 | bcoltin | </table>
|
80 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
||
81 | Time functions. |
||
82 | <p>
|
||
83 | Functions dealing with time. <hr><h2>Function Documentation</h2> |
||
84 | 855 | justin | <a class="anchor" name="g8aa473f8ae9a91df4bc9ea700983c72d"></a><!-- doxytag: member="time.c::delay_ms" ref="g8aa473f8ae9a91df4bc9ea700983c72d" args="(int ms)" --> |
85 | <div class="memitem"> |
||
86 | <div class="memproto"> |
||
87 | <table class="memname"> |
||
88 | 41 | bcoltin | <tr>
|
89 | 855 | justin | <td class="memname">void delay_ms </td> |
90 | <td>(</td> |
||
91 | <td class="paramtype">int </td> |
||
92 | <td class="paramname"> <em>ms</em> </td> |
||
93 | <td> ) </td> |
||
94 | <td width="100%"></td> |
||
95 | 41 | bcoltin | </tr>
|
96 | </table>
|
||
97 | 855 | justin | </div>
|
98 | <div class="memdoc"> |
||
99 | 41 | bcoltin | |
100 | <p>
|
||
101 | Delay execution for the specified time. |
||
102 | <p>
|
||
103 | Delays for the specified number of milliseconds. The accuracy of this function is unknown.<p>
|
||
104 | <dl compact><dt><b>Parameters:</b></dt><dd> |
||
105 | <table border="0" cellspacing="2" cellpadding="0"> |
||
106 | <tr><td valign="top"></td><td valign="top"><em>ms</em> </td><td>the number of milliseconds to delay for </td></tr> |
||
107 | </table>
|
||
108 | </dl>
|
||
109 | 855 | justin | |
110 | </div>
|
||
111 | </div><p> |
||
112 | <a class="anchor" name="g5c7f2bf39314463dd5f4913e05ca991d"></a><!-- doxytag: member="time.c::rtc_get" ref="g5c7f2bf39314463dd5f4913e05ca991d" args="(void)" --> |
||
113 | <div class="memitem"> |
||
114 | <div class="memproto"> |
||
115 | <table class="memname"> |
||
116 | 41 | bcoltin | <tr>
|
117 | 855 | justin | <td class="memname">int rtc_get </td> |
118 | <td>(</td> |
||
119 | <td class="paramtype">void </td> |
||
120 | <td class="paramname"> </td> |
||
121 | <td> ) </td> |
||
122 | <td width="100%"></td> |
||
123 | 41 | bcoltin | </tr>
|
124 | </table>
|
||
125 | 855 | justin | </div>
|
126 | <div class="memdoc"> |
||
127 | 41 | bcoltin | |
128 | <p>
|
||
129 | Get the value of the realtime clock. |
||
130 | <p>
|
||
131 | Returns the time elapsed in seconds since the last call to rtc_init or rtc_reset.<p>
|
||
132 | 855 | justin | <dl class="return" compact><dt><b>Returns:</b></dt><dd>the number of seconds since the last call to rtc_init or rtc_reset</dd></dl> |
133 | <dl class="see" compact><dt><b>See also:</b></dt><dd>rtc_init, <a class="el" href="group__time.html#g83ae542199d1c0e964aff89537d686a3" title="Reset the counter of the realtime clock.">rtc_reset</a> </dd></dl> |
||
134 | |||
135 | </div>
|
||
136 | </div><p> |
||
137 | <a class="anchor" name="ge93857794a06e7ab645347df06d6d640"></a><!-- doxytag: member="time.c::rtc_multi_init" ref="ge93857794a06e7ab645347df06d6d640" args="(int *prescale_opt, void(*rtc_fun[])(void), int argc)" --> |
||
138 | <div class="memitem"> |
||
139 | <div class="memproto"> |
||
140 | <table class="memname"> |
||
141 | 41 | bcoltin | <tr>
|
142 | 855 | justin | <td class="memname">int rtc_multi_init </td> |
143 | <td>(</td> |
||
144 | <td class="paramtype">int * </td> |
||
145 | <td class="paramname"> <em>prescale_opt</em>, </td> |
||
146 | 41 | bcoltin | </tr>
|
147 | <tr>
|
||
148 | 855 | justin | <td class="paramkey"></td> |
149 | <td></td> |
||
150 | <td class="paramtype">void(*[])(void) </td> |
||
151 | <td class="paramname"> <em>rtc_func</em>, </td> |
||
152 | 41 | bcoltin | </tr>
|
153 | <tr>
|
||
154 | 855 | justin | <td class="paramkey"></td> |
155 | <td></td> |
||
156 | <td class="paramtype">int </td> |
||
157 | <td class="paramname"> <em>argc</em></td><td> </td> |
||
158 | 41 | bcoltin | </tr>
|
159 | 855 | justin | <tr>
|
160 | <td></td> |
||
161 | <td>)</td> |
||
162 | <td></td><td></td><td width="100%"></td> |
||
163 | </tr>
|
||
164 | 41 | bcoltin | </table>
|
165 | 855 | justin | </div>
|
166 | <div class="memdoc"> |
||
167 | 41 | bcoltin | |
168 | <p>
|
||
169 | Enable the realtime clock. |
||
170 | <p>
|
||
171 | 855 | justin | Initializes the real time clock. Prescales are defined in <a class="el" href="time_8h.html" title="Contains time-related functions and definitions.">time.h</a>. For example, SECOND will give 1 second. The specified function is called every clock tick. For the real time clock to activate, interrupts must be enabled. (through sei() )<p> |
172 | 41 | bcoltin | <dl compact><dt><b>Parameters:</b></dt><dd> |
173 | <table border="0" cellspacing="2" cellpadding="0"> |
||
174 | <tr><td valign="top"></td><td valign="top"><em>prescale_opt</em> </td><td>the period with which the timer is triggered </td></tr> |
||
175 | <tr><td valign="top"></td><td valign="top"><em>rtc_func</em> </td><td>the function called when the timer is triggered</td></tr> |
||
176 | </table>
|
||
177 | </dl>
|
||
178 | 855 | justin | <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__time.html#g5c7f2bf39314463dd5f4913e05ca991d" title="Get the value of the realtime clock.">rtc_get</a>, <a class="el" href="group__time.html#g83ae542199d1c0e964aff89537d686a3" title="Reset the counter of the realtime clock.">rtc_reset</a> </dd></dl> |
179 | |||
180 | </div>
|
||
181 | </div><p> |
||
182 | <a class="anchor" name="g83ae542199d1c0e964aff89537d686a3"></a><!-- doxytag: member="time.c::rtc_reset" ref="g83ae542199d1c0e964aff89537d686a3" args="(void)" --> |
||
183 | <div class="memitem"> |
||
184 | <div class="memproto"> |
||
185 | <table class="memname"> |
||
186 | 41 | bcoltin | <tr>
|
187 | 855 | justin | <td class="memname">void rtc_reset </td> |
188 | <td>(</td> |
||
189 | <td class="paramtype">void </td> |
||
190 | <td class="paramname"> </td> |
||
191 | <td> ) </td> |
||
192 | <td width="100%"></td> |
||
193 | 41 | bcoltin | </tr>
|
194 | </table>
|
||
195 | 855 | justin | </div>
|
196 | <div class="memdoc"> |
||
197 | 41 | bcoltin | |
198 | <p>
|
||
199 | Reset the counter of the realtime clock. |
||
200 | <p>
|
||
201 | Resets the real time clock counter to 0.<p>
|
||
202 | 855 | justin | <dl class="see" compact><dt><b>See also:</b></dt><dd>rtc_init, <a class="el" href="group__time.html#g5c7f2bf39314463dd5f4913e05ca991d" title="Get the value of the realtime clock.">rtc_get</a> </dd></dl> |
203 | |||
204 | </div>
|
||
205 | </div><p> |
||
206 | 856 | justin | <hr size="1"><address style="text-align: right;"><small>Generated on Mon Sep 22 22:30:16 2008 for libdragonfly by |
207 | 41 | bcoltin | <a href="http://www.doxygen.org/index.html"> |
208 | 855 | justin | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address> |
209 | 41 | bcoltin | </body>
|
210 | </html> |