forked from Traumflug/Teacup_Firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
extruder_2timer_8h.html
265 lines (248 loc) · 12.9 KB
/
extruder_2timer_8h.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Teacup: timer.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.2 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="dirs.html"><span>Directories</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<div class="navpath">
<ul>
<li><a class="el" href="dir_cd428104a9d62d6878974cf148a80647.html">extruder</a> </li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Defines</a> |
<a href="#func-members">Functions</a> |
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<h1>extruder/timer.h File Reference</h1> </div>
</div>
<div class="contents">
<code>#include <stdint.h></code><br/>
<code>#include <avr/io.h></code><br/>
<p><a href="extruder_2timer_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="extruder_2timer_8h.html#a89f9bd364d17d48182d34357c3508d05">US</a>   * (F_CPU / 1000000)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="extruder_2timer_8h.html#ab9e061e05d689a5769936b213022102f">MS</a>   * (F_CPU / 1000)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="extruder_2timer_8h.html#abee14b5dfcd2f33cb9f14c2257874f65">CLOCK_FLAG_10MS</a>   1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="extruder_2timer_8h.html#ab57d175075f878301128dd9b08c5e8af">CLOCK_FLAG_250MS</a>   2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="extruder_2timer_8h.html#aff3ca6ecf7a567b64423c07d55ebfced">CLOCK_FLAG_1S</a>   4</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="extruder_2timer_8h.html#abd248d0d70aed8fb8c81c369a113f124">ifclock</a>(F)   for (;<a class="el" href="extruder_2timer_8h.html#a18bf8a50f74f05db364e7747a0e22e26">clock_flag</a> & (F);<a class="el" href="extruder_2timer_8h.html#a18bf8a50f74f05db364e7747a0e22e26">clock_flag</a> &= ~(F))</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="extruder_2timer_8h.html#a892a868eec20f3170fcca8229c8ff39e">timer_init</a> (void) __attribute__((cold))</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">initialise timer and enable system clock interrupt. <a href="#a892a868eec20f3170fcca8229c8ff39e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="extruder_2timer_8h.html#a078a7df1a034381e74f2a49e4c1752b0">setTimer</a> (uint32_t delay)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="extruder_2timer_8h.html#a37980fc313f86d7f40a3d7643861ed29">timer_stop</a> (void)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">volatile uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="extruder_2timer_8h.html#a18bf8a50f74f05db364e7747a0e22e26">clock_flag</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">flags to tell main loop when above have elapsed <a href="#a18bf8a50f74f05db364e7747a0e22e26"></a><br/></td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="abee14b5dfcd2f33cb9f14c2257874f65"></a><!-- doxytag: member="extruder/timer.h::CLOCK_FLAG_10MS" ref="abee14b5dfcd2f33cb9f14c2257874f65" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CLOCK_FLAG_10MS   1</td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="aff3ca6ecf7a567b64423c07d55ebfced"></a><!-- doxytag: member="extruder/timer.h::CLOCK_FLAG_1S" ref="aff3ca6ecf7a567b64423c07d55ebfced" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CLOCK_FLAG_1S   4</td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="ab57d175075f878301128dd9b08c5e8af"></a><!-- doxytag: member="extruder/timer.h::CLOCK_FLAG_250MS" ref="ab57d175075f878301128dd9b08c5e8af" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CLOCK_FLAG_250MS   2</td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="abd248d0d70aed8fb8c81c369a113f124"></a><!-- doxytag: member="extruder/timer.h::ifclock" ref="abd248d0d70aed8fb8c81c369a113f124" args="(F)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ifclock</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">F )</td>
<td>   for (;<a class="el" href="extruder_2timer_8h.html#a18bf8a50f74f05db364e7747a0e22e26">clock_flag</a> & (F);<a class="el" href="extruder_2timer_8h.html#a18bf8a50f74f05db364e7747a0e22e26">clock_flag</a> &= ~(F))</td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="ab9e061e05d689a5769936b213022102f"></a><!-- doxytag: member="extruder/timer.h::MS" ref="ab9e061e05d689a5769936b213022102f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MS   * (F_CPU / 1000)</td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="a89f9bd364d17d48182d34357c3508d05"></a><!-- doxytag: member="extruder/timer.h::US" ref="a89f9bd364d17d48182d34357c3508d05" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define US   * (F_CPU / 1000000)</td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a078a7df1a034381e74f2a49e4c1752b0"></a><!-- doxytag: member="extruder/timer.h::setTimer" ref="a078a7df1a034381e74f2a49e4c1752b0" args="(uint32_t delay)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void setTimer </td>
<td>(</td>
<td class="paramtype">uint32_t </td>
<td class="paramname"> <em>delay</em> )</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="a892a868eec20f3170fcca8229c8ff39e"></a><!-- doxytag: member="extruder/timer.h::timer_init" ref="a892a868eec20f3170fcca8229c8ff39e" args="(void) __attribute__((cold))" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void timer_init </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"> )</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>initialise timer and enable system clock interrupt. </p>
<p>step interrupt is enabled later when we start using it </p>
<p>Referenced by <a class="el" href="extruder_8c.html#a2858154e2009b0e6e616f313177762bc">init()</a>.</p>
</div>
</div>
<a class="anchor" id="a37980fc313f86d7f40a3d7643861ed29"></a><!-- doxytag: member="extruder/timer.h::timer_stop" ref="a37980fc313f86d7f40a3d7643861ed29" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void timer_stop </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"> )</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a18bf8a50f74f05db364e7747a0e22e26"></a><!-- doxytag: member="extruder/timer.h::clock_flag" ref="a18bf8a50f74f05db364e7747a0e22e26" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">volatile uint8_t <a class="el" href="extruder_2timer_8h.html#a18bf8a50f74f05db364e7747a0e22e26">clock_flag</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>flags to tell main loop when above have elapsed </p>
<p>Referenced by <a class="el" href="timer_8c.html#a317c504c8745a1256efed69e0dbf6e66">ISR()</a>.</p>
</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Mon Mar 21 2011 23:43:44 for Teacup by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>