root / trunk / docs / libdragonfly / group__buzzer.html @ 1626
History | View | Annotate | Download (16.3 KB)
1 | 41 | bcoltin | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|---|---|---|
2 | 241 | bcoltin | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
3 | 41 | bcoltin | <title>libdragonfly: Buzzer</title> |
4 | 1398 | cmar | <link href="tabs.css" rel="stylesheet" type="text/css"> |
5 | 41 | bcoltin | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
6 | </head><body> |
||
7 | 1398 | cmar | <!-- Generated by Doxygen 1.5.9 -->
|
8 | 1145 | deffi | <div class="navigation" id="top"> |
9 | <div class="tabs"> |
||
10 | <ul>
|
||
11 | <li><a href="index.html"><span>Main Page</span></a></li> |
||
12 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
||
13 | <li><a href="modules.html"><span>Modules</span></a></li> |
||
14 | <li><a href="annotated.html"><span>Data Structures</span></a></li> |
||
15 | <li><a href="files.html"><span>Files</span></a></li> |
||
16 | </ul>
|
||
17 | </div>
|
||
18 | 241 | bcoltin | </div>
|
19 | 1145 | deffi | <div class="contents"> |
20 | 241 | bcoltin | <h1>Buzzer</h1>Functions for controlling the buzzer. Functions for controlling the buzzer. Include <a class="el" href="buzzer_8h.html" title="Contains definitions for using the buzzer.">buzzer.h</a> to access these functions. |
21 | 1398 | cmar | <a href="#_details">More...</a> |
22 | <p>
|
||
23 | <table border="0" cellpadding="0" cellspacing="0"> |
||
24 | 41 | bcoltin | <tr><td></td></tr> |
25 | <tr><td colspan="2"><br><h2>Defines</h2></td></tr> |
||
26 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gcc39015f57b2efb8810b603f188bdf15"></a><!-- doxytag: member="buzzer::C4" ref="gcc39015f57b2efb8810b603f188bdf15" args="" --> |
||
27 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#gcc39015f57b2efb8810b603f188bdf15">C4</a> 260</td></tr> |
||
28 | |||
29 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Middle C. <br></td></tr> |
||
30 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g879790f58417f0986370ddbcda404ed0"></a><!-- doxytag: member="buzzer::C4s" ref="g879790f58417f0986370ddbcda404ed0" args="" --> |
||
31 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#g879790f58417f0986370ddbcda404ed0">C4s</a> 277</td></tr> |
||
32 | |||
33 | <tr><td class="mdescLeft"> </td><td class="mdescRight">C#. <br></td></tr> |
||
34 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g3d9bb178282c3cb69740c94ba1e48fed"></a><!-- doxytag: member="buzzer::D4" ref="g3d9bb178282c3cb69740c94ba1e48fed" args="" --> |
||
35 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#g3d9bb178282c3cb69740c94ba1e48fed">D4</a> 294</td></tr> |
||
36 | |||
37 | <tr><td class="mdescLeft"> </td><td class="mdescRight">D. <br></td></tr> |
||
38 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g33eb0561dd16dd44c7c23519dd22540a"></a><!-- doxytag: member="buzzer::D4s" ref="g33eb0561dd16dd44c7c23519dd22540a" args="" --> |
||
39 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#g33eb0561dd16dd44c7c23519dd22540a">D4s</a> 311</td></tr> |
||
40 | |||
41 | <tr><td class="mdescLeft"> </td><td class="mdescRight">D#. <br></td></tr> |
||
42 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g4c819074c856b4e67fad4875a92cb2e9"></a><!-- doxytag: member="buzzer::E4" ref="g4c819074c856b4e67fad4875a92cb2e9" args="" --> |
||
43 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#g4c819074c856b4e67fad4875a92cb2e9">E4</a> 330</td></tr> |
||
44 | |||
45 | <tr><td class="mdescLeft"> </td><td class="mdescRight">E. <br></td></tr> |
||
46 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g7fd7918aa90b0ce1dc7ca9fe7a00e9fb"></a><!-- doxytag: member="buzzer::F4" ref="g7fd7918aa90b0ce1dc7ca9fe7a00e9fb" args="" --> |
||
47 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#g7fd7918aa90b0ce1dc7ca9fe7a00e9fb">F4</a> 349</td></tr> |
||
48 | |||
49 | <tr><td class="mdescLeft"> </td><td class="mdescRight">F. <br></td></tr> |
||
50 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g93ff98890b28a2833f1152cc95c3e628"></a><!-- doxytag: member="buzzer::F4s" ref="g93ff98890b28a2833f1152cc95c3e628" args="" --> |
||
51 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#g93ff98890b28a2833f1152cc95c3e628">F4s</a> 370</td></tr> |
||
52 | |||
53 | <tr><td class="mdescLeft"> </td><td class="mdescRight">F#. <br></td></tr> |
||
54 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g6f984a8b01aafc34122cc8bc0d9d5691"></a><!-- doxytag: member="buzzer::G4" ref="g6f984a8b01aafc34122cc8bc0d9d5691" args="" --> |
||
55 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#g6f984a8b01aafc34122cc8bc0d9d5691">G4</a> 392</td></tr> |
||
56 | |||
57 | <tr><td class="mdescLeft"> </td><td class="mdescRight">G. <br></td></tr> |
||
58 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gaf8daa589f172256505e028dab2954b2"></a><!-- doxytag: member="buzzer::G4s" ref="gaf8daa589f172256505e028dab2954b2" args="" --> |
||
59 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#gaf8daa589f172256505e028dab2954b2">G4s</a> 415</td></tr> |
||
60 | |||
61 | <tr><td class="mdescLeft"> </td><td class="mdescRight">G#. <br></td></tr> |
||
62 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga0a03ad95ca0cb887a11e321fa1c9519"></a><!-- doxytag: member="buzzer::A4" ref="ga0a03ad95ca0cb887a11e321fa1c9519" args="" --> |
||
63 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#ga0a03ad95ca0cb887a11e321fa1c9519">A4</a> 440</td></tr> |
||
64 | |||
65 | <tr><td class="mdescLeft"> </td><td class="mdescRight">A. <br></td></tr> |
||
66 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g7063c01bf1877119a8aca7049e02a8cb"></a><!-- doxytag: member="buzzer::A4s" ref="g7063c01bf1877119a8aca7049e02a8cb" args="" --> |
||
67 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#g7063c01bf1877119a8aca7049e02a8cb">A4s</a> 466</td></tr> |
||
68 | |||
69 | <tr><td class="mdescLeft"> </td><td class="mdescRight">A#. <br></td></tr> |
||
70 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g0bf59f84e29fb57d27314583365a88d6"></a><!-- doxytag: member="buzzer::B4" ref="g0bf59f84e29fb57d27314583365a88d6" args="" --> |
||
71 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#g0bf59f84e29fb57d27314583365a88d6">B4</a> 494</td></tr> |
||
72 | |||
73 | <tr><td class="mdescLeft"> </td><td class="mdescRight">B. <br></td></tr> |
||
74 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g3b69b61d9deb37b13911faf2cf5cf1d5"></a><!-- doxytag: member="buzzer::C5" ref="g3b69b61d9deb37b13911faf2cf5cf1d5" args="" --> |
||
75 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#g3b69b61d9deb37b13911faf2cf5cf1d5">C5</a> 523</td></tr> |
||
76 | |||
77 | <tr><td class="mdescLeft"> </td><td class="mdescRight">C. <br></td></tr> |
||
78 | <tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
||
79 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#g0cead532fdd0c0de5fa1c1de0f6556bd">buzzer_init</a> (void)</td></tr> |
||
80 | |||
81 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize the buzzer. <a href="#g0cead532fdd0c0de5fa1c1de0f6556bd"></a><br></td></tr> |
||
82 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#g9872f05325dd86a89728d47c8e9158ab">buzzer_set_val</a> (unsigned int buzz_value)</td></tr> |
||
83 | |||
84 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the value the buzzer plays. <a href="#g9872f05325dd86a89728d47c8e9158ab"></a><br></td></tr> |
||
85 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#ga0aba85b0044cb1a44bb28c675d7c193">buzzer_set_freq</a> (unsigned int buzz_freq)</td></tr> |
||
86 | |||
87 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the frequency the buzzer plays. <a href="#ga0aba85b0044cb1a44bb28c675d7c193"></a><br></td></tr> |
||
88 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#ga78239c1255dfea31992f435659df1d7">buzzer_chirp</a> (unsigned int ms, unsigned int buzz_freq)</td></tr> |
||
89 | |||
90 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Play a frequency for a specified time. <a href="#ga78239c1255dfea31992f435659df1d7"></a><br></td></tr> |
||
91 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buzzer.html#g93d07c81691fec7a85ea85117d6eca4f">buzzer_off</a> (void)</td></tr> |
||
92 | |||
93 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Turn the buzzer off. <a href="#g93d07c81691fec7a85ea85117d6eca4f"></a><br></td></tr> |
||
94 | </table>
|
||
95 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
||
96 | 1398 | cmar | Functions for controlling the buzzer. Functions for controlling the buzzer. Include <a class="el" href="buzzer_8h.html" title="Contains definitions for using the buzzer.">buzzer.h</a> to access these functions. <hr><h2>Function Documentation</h2> |
97 | 241 | bcoltin | <a class="anchor" name="ga78239c1255dfea31992f435659df1d7"></a><!-- doxytag: member="buzzer.c::buzzer_chirp" ref="ga78239c1255dfea31992f435659df1d7" args="(unsigned int ms, unsigned int buzz_freq)" --> |
98 | <div class="memitem"> |
||
99 | <div class="memproto"> |
||
100 | <table class="memname"> |
||
101 | 41 | bcoltin | <tr>
|
102 | 241 | bcoltin | <td class="memname">void buzzer_chirp </td> |
103 | <td>(</td> |
||
104 | <td class="paramtype">unsigned int </td> |
||
105 | <td class="paramname"> <em>ms</em>, </td> |
||
106 | 41 | bcoltin | </tr>
|
107 | <tr>
|
||
108 | 241 | bcoltin | <td class="paramkey"></td> |
109 | <td></td> |
||
110 | <td class="paramtype">unsigned int </td> |
||
111 | <td class="paramname"> <em>buzz_freq</em></td><td> </td> |
||
112 | 41 | bcoltin | </tr>
|
113 | <tr>
|
||
114 | 241 | bcoltin | <td></td> |
115 | <td>)</td> |
||
116 | 1398 | cmar | <td></td><td></td><td></td> |
117 | 41 | bcoltin | </tr>
|
118 | </table>
|
||
119 | 241 | bcoltin | </div>
|
120 | <div class="memdoc"> |
||
121 | 41 | bcoltin | |
122 | <p>
|
||
123 | Play a frequency for a specified time. |
||
124 | <p>
|
||
125 | Plays the specified frequency for the specified amount of time. This function blocks execution until the time is completed. buzzer_init must be called before this function can be used.<p>
|
||
126 | <dl compact><dt><b>Parameters:</b></dt><dd> |
||
127 | <table border="0" cellspacing="2" cellpadding="0"> |
||
128 | <tr><td valign="top"></td><td valign="top"><em>ms</em> </td><td>the time in milliseconds to play the frequency </td></tr> |
||
129 | <tr><td valign="top"></td><td valign="top"><em>buzz_freq</em> </td><td>the frequency to play</td></tr> |
||
130 | </table>
|
||
131 | </dl>
|
||
132 | 241 | bcoltin | <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__buzzer.html#g0cead532fdd0c0de5fa1c1de0f6556bd" title="Initialize the buzzer.">buzzer_init</a>, <a class="el" href="group__buzzer.html#ga0aba85b0044cb1a44bb28c675d7c193" title="Set the frequency the buzzer plays.">buzzer_set_freq</a> </dd></dl> |
133 | |||
134 | 1398 | cmar | <p>References <a class="el" href="buzzer_8c_source.html#l00127">buzzer_off()</a>, <a class="el" href="buzzer_8c_source.html#l00089">buzzer_set_freq()</a>, and <a class="el" href="time_8c_source.html#l00104">delay_ms()</a>.</p> |
135 | 1145 | deffi | |
136 | 241 | bcoltin | </div>
|
137 | </div><p> |
||
138 | <a class="anchor" name="g0cead532fdd0c0de5fa1c1de0f6556bd"></a><!-- doxytag: member="buzzer.c::buzzer_init" ref="g0cead532fdd0c0de5fa1c1de0f6556bd" args="(void)" --> |
||
139 | <div class="memitem"> |
||
140 | <div class="memproto"> |
||
141 | <table class="memname"> |
||
142 | 41 | bcoltin | <tr>
|
143 | 241 | bcoltin | <td class="memname">void buzzer_init </td> |
144 | <td>(</td> |
||
145 | <td class="paramtype">void </td> |
||
146 | <td class="paramname"> </td> |
||
147 | <td> ) </td> |
||
148 | 1398 | cmar | <td></td> |
149 | 41 | bcoltin | </tr>
|
150 | </table>
|
||
151 | 241 | bcoltin | </div>
|
152 | <div class="memdoc"> |
||
153 | 41 | bcoltin | |
154 | <p>
|
||
155 | Initialize the buzzer. |
||
156 | <p>
|
||
157 | 241 | bcoltin | Initializes the buzzer. Must be called before any other buzzer function may be used. |
158 | 1398 | cmar | <p>Referenced by <a class="el" href="dragonfly__lib_8c_source.html#l00068">dragonfly_init()</a>.</p> |
159 | 1145 | deffi | |
160 | 241 | bcoltin | </div>
|
161 | </div><p> |
||
162 | <a class="anchor" name="g93d07c81691fec7a85ea85117d6eca4f"></a><!-- doxytag: member="buzzer.c::buzzer_off" ref="g93d07c81691fec7a85ea85117d6eca4f" args="(void)" --> |
||
163 | <div class="memitem"> |
||
164 | <div class="memproto"> |
||
165 | <table class="memname"> |
||
166 | 41 | bcoltin | <tr>
|
167 | 241 | bcoltin | <td class="memname">void buzzer_off </td> |
168 | <td>(</td> |
||
169 | <td class="paramname"> </td> |
||
170 | <td> ) </td> |
||
171 | 1398 | cmar | <td></td> |
172 | 41 | bcoltin | </tr>
|
173 | </table>
|
||
174 | 241 | bcoltin | </div>
|
175 | <div class="memdoc"> |
||
176 | 41 | bcoltin | |
177 | <p>
|
||
178 | Turn the buzzer off. |
||
179 | <p>
|
||
180 | Turns off the buzzer by disabling the timer0 clock.<p>
|
||
181 | 241 | bcoltin | <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__buzzer.html#g0cead532fdd0c0de5fa1c1de0f6556bd" title="Initialize the buzzer.">buzzer_init</a> </dd></dl> |
182 | |||
183 | 1398 | cmar | <p>Referenced by <a class="el" href="buzzer_8c_source.html#l00115">buzzer_chirp()</a>.</p> |
184 | 1145 | deffi | |
185 | 241 | bcoltin | </div>
|
186 | </div><p> |
||
187 | <a class="anchor" name="ga0aba85b0044cb1a44bb28c675d7c193"></a><!-- doxytag: member="buzzer.c::buzzer_set_freq" ref="ga0aba85b0044cb1a44bb28c675d7c193" args="(unsigned int buzz_freq)" --> |
||
188 | <div class="memitem"> |
||
189 | <div class="memproto"> |
||
190 | <table class="memname"> |
||
191 | 41 | bcoltin | <tr>
|
192 | 241 | bcoltin | <td class="memname">void buzzer_set_freq </td> |
193 | <td>(</td> |
||
194 | <td class="paramtype">unsigned int </td> |
||
195 | <td class="paramname"> <em>buzz_freq</em> </td> |
||
196 | <td> ) </td> |
||
197 | 1398 | cmar | <td></td> |
198 | 41 | bcoltin | </tr>
|
199 | </table>
|
||
200 | 241 | bcoltin | </div>
|
201 | <div class="memdoc"> |
||
202 | 41 | bcoltin | |
203 | <p>
|
||
204 | Set the frequency the buzzer plays. |
||
205 | <p>
|
||
206 | Sets the buzzer frequency. Usage of constants such as C4 is highly recommended as input to this function. buzzer_init must be called before this function may be used.<p>
|
||
207 | <dl compact><dt><b>Parameters:</b></dt><dd> |
||
208 | <table border="0" cellspacing="2" cellpadding="0"> |
||
209 | <tr><td valign="top"></td><td valign="top"><em>buzz_freq</em> </td><td>the frequency to set the buzzer to</td></tr> |
||
210 | </table>
|
||
211 | </dl>
|
||
212 | 241 | bcoltin | <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__buzzer.html#g0cead532fdd0c0de5fa1c1de0f6556bd" title="Initialize the buzzer.">buzzer_init</a>, <a class="el" href="group__buzzer.html#g9872f05325dd86a89728d47c8e9158ab" title="Set the value the buzzer plays.">buzzer_set_val</a>, <a class="el" href="group__buzzer.html#g93d07c81691fec7a85ea85117d6eca4f" title="Turn the buzzer off.">buzzer_off</a> </dd></dl> |
213 | |||
214 | 1398 | cmar | <p>References <a class="el" href="buzzer_8c_source.html#l00072">buzzer_set_val()</a>.</p> |
215 | 1145 | deffi | |
216 | 1398 | cmar | <p>Referenced by <a class="el" href="buzzer_8c_source.html#l00115">buzzer_chirp()</a>.</p> |
217 | 1145 | deffi | |
218 | 241 | bcoltin | </div>
|
219 | </div><p> |
||
220 | <a class="anchor" name="g9872f05325dd86a89728d47c8e9158ab"></a><!-- doxytag: member="buzzer.c::buzzer_set_val" ref="g9872f05325dd86a89728d47c8e9158ab" args="(unsigned int buzz_value)" --> |
||
221 | <div class="memitem"> |
||
222 | <div class="memproto"> |
||
223 | <table class="memname"> |
||
224 | 41 | bcoltin | <tr>
|
225 | 241 | bcoltin | <td class="memname">void buzzer_set_val </td> |
226 | <td>(</td> |
||
227 | <td class="paramtype">unsigned int </td> |
||
228 | <td class="paramname"> <em>buzz_value</em> </td> |
||
229 | <td> ) </td> |
||
230 | 1398 | cmar | <td></td> |
231 | 41 | bcoltin | </tr>
|
232 | </table>
|
||
233 | 241 | bcoltin | </div>
|
234 | <div class="memdoc"> |
||
235 | 41 | bcoltin | |
236 | <p>
|
||
237 | Set the value the buzzer plays. |
||
238 | <p>
|
||
239 | Sets the value of the buzzer's pitch. Higher values are lower frequencies.<p>
|
||
240 | <dl compact><dt><b>Parameters:</b></dt><dd> |
||
241 | <table border="0" cellspacing="2" cellpadding="0"> |
||
242 | <tr><td valign="top"></td><td valign="top"><em>buzz_value</em> </td><td>the value to set the buzzer's frequency too, in the range 0-255</td></tr> |
||
243 | </table>
|
||
244 | </dl>
|
||
245 | 241 | bcoltin | <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__buzzer.html#g0cead532fdd0c0de5fa1c1de0f6556bd" title="Initialize the buzzer.">buzzer_init</a>, <a class="el" href="group__buzzer.html#ga0aba85b0044cb1a44bb28c675d7c193" title="Set the frequency the buzzer plays.">buzzer_set_freq</a>, <a class="el" href="group__buzzer.html#g93d07c81691fec7a85ea85117d6eca4f" title="Turn the buzzer off.">buzzer_off</a> </dd></dl> |
246 | |||
247 | 1398 | cmar | <p>Referenced by <a class="el" href="buzzer_8c_source.html#l00089">buzzer_set_freq()</a>.</p> |
248 | 1145 | deffi | |
249 | 241 | bcoltin | </div>
|
250 | </div><p> |
||
251 | 1145 | deffi | </div>
|
252 | 1398 | cmar | <hr size="1"><address style="text-align: right;"><small>Generated on Mon Sep 7 19:07:28 2009 for libdragonfly by |
253 | 41 | bcoltin | <a href="http://www.doxygen.org/index.html"> |
254 | 1398 | cmar | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> |
255 | 41 | bcoltin | </body>
|
256 | </html> |