1
0
mirror of https://github.com/taigrr/arduinolibs synced 2025-01-18 04:33:12 -08:00

Update docs

This commit is contained in:
Rhys Weatherley
2015-03-12 19:03:15 +10:00
parent 083448f195
commit c6206e4216
493 changed files with 35310 additions and 3018 deletions

View File

@@ -3,6 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>ArduinoLibs: Melody.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
@@ -29,7 +30,7 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.2 -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
@@ -208,24 +209,24 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;<span class="comment">// Special note value that indicates a rest.</span></div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;<span class="preprocessor">#define NOTE_REST 0</span></div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00122"></a><span class="lineno"><a class="code" href="classMelody.html"> 122</a></span>&#160;<span class="keyword">class </span><a class="code" href="classMelody.html" title="Plays a melody on a digital output pin using tone().">Melody</a> {</div>
<div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="classMelody.html"> 122</a></span>&#160;<span class="keyword">class </span><a class="code" href="classMelody.html">Melody</a> {</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <a class="code" href="classMelody.html#a9edc4165a49368dd5d78eedf982c38b9" title="Constructs a new melody playing object for pin.">Melody</a>(uint8_t pin);</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <a class="code" href="classMelody.html#a9edc4165a49368dd5d78eedf982c38b9">Melody</a>(uint8_t pin);</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;</div>
<div class="line"><a name="l00126"></a><span class="lineno"><a class="code" href="classMelody.html#ad38db3338ed87d72238c0ea9440c633c"> 126</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classMelody.html#ad38db3338ed87d72238c0ea9440c633c" title="Returns true if the melody is currently playing; false if not.">isPlaying</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> playing; }</div>
<div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="classMelody.html#ad38db3338ed87d72238c0ea9440c633c"> 126</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classMelody.html#ad38db3338ed87d72238c0ea9440c633c">isPlaying</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> playing; }</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;</div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="code" href="classMelody.html#ab78253ae9abc8478b05f415f5d878a60"> 128</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="classMelody.html#ab78253ae9abc8478b05f415f5d878a60" title="Returns the number of times the melody should loop before stopping.">loopCount</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> _loopCount; }</div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="code" href="classMelody.html#a507097a2e8ff51a5e9157e3a320ae35b"> 129</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classMelody.html#a507097a2e8ff51a5e9157e3a320ae35b" title="Sets the number of times the melody should loop to count.">setLoopCount</a>(<span class="keywordtype">int</span> count) { _loopCount = count; }</div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="classMelody.html#ab78253ae9abc8478b05f415f5d878a60"> 128</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="classMelody.html#ab78253ae9abc8478b05f415f5d878a60">loopCount</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> _loopCount; }</div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="classMelody.html#a507097a2e8ff51a5e9157e3a320ae35b"> 129</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classMelody.html#a507097a2e8ff51a5e9157e3a320ae35b">setLoopCount</a>(<span class="keywordtype">int</span> count) { _loopCount = count; }</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classMelody.html#ae88ad06c2acb728f56dd213d5dad6006" title="Sets the maximum number of loops to last no longer than ms milliseconds.">setLoopDuration</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ms);</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classMelody.html#ae88ad06c2acb728f56dd213d5dad6006">setLoopDuration</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ms);</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classMelody.html#a9fd8e0d48833d8da3cd3b3b58408b0b5" title="Starts playing the melody, or restarts it if already playing.">play</a>();</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classMelody.html#aecc9185c9cb1246e8a55521b17d72932" title="Plays the melody once and then stops.">playOnce</a>();</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classMelody.html#ac0c552233c41d85f2766d2e4df376b2b" title="Stops playing the melody.">stop</a>();</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classMelody.html#a9fd8e0d48833d8da3cd3b3b58408b0b5">play</a>();</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classMelody.html#aecc9185c9cb1246e8a55521b17d72932">playOnce</a>();</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classMelody.html#ac0c552233c41d85f2766d2e4df376b2b">stop</a>();</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classMelody.html#adb6ad8e8cfe8c9a137e470f4e85c7254" title="Sets the melody to the size elements of notes and lengths.">setMelody</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> *notes, <span class="keyword">const</span> uint8_t *lengths, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size);</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classMelody.html#adb6ad8e8cfe8c9a137e470f4e85c7254">setMelody</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> *notes, <span class="keyword">const</span> uint8_t *lengths, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size);</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classMelody.html#ad1103b970be1f59058cc7d927be68955" title="Runs the melody control loop.">run</a>();</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classMelody.html#ad1103b970be1f59058cc7d927be68955">run</a>();</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; uint8_t _pin;</div>
@@ -243,12 +244,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;};</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="classMelody_html_adb6ad8e8cfe8c9a137e470f4e85c7254"><div class="ttname"><a href="classMelody.html#adb6ad8e8cfe8c9a137e470f4e85c7254">Melody::setMelody</a></div><div class="ttdeci">void setMelody(const int *notes, const uint8_t *lengths, unsigned int size)</div><div class="ttdoc">Sets the melody to the size elements of notes and lengths. </div><div class="ttdef"><b>Definition:</b> <a href="Melody_8cpp_source.html#l00199">Melody.cpp:199</a></div></div>
<div class="ttc" id="classMelody_html_ac0c552233c41d85f2766d2e4df376b2b"><div class="ttname"><a href="classMelody.html#ac0c552233c41d85f2766d2e4df376b2b">Melody::stop</a></div><div class="ttdeci">void stop()</div><div class="ttdoc">Stops playing the melody. </div><div class="ttdef"><b>Definition:</b> <a href="Melody_8cpp_source.html#l00178">Melody.cpp:178</a></div></div>
<div class="ttc" id="classMelody_html_ad1103b970be1f59058cc7d927be68955"><div class="ttname"><a href="classMelody.html#ad1103b970be1f59058cc7d927be68955">Melody::run</a></div><div class="ttdeci">void run()</div><div class="ttdoc">Runs the melody control loop. </div><div class="ttdef"><b>Definition:</b> <a href="Melody_8cpp_source.html#l00214">Melody.cpp:214</a></div></div>
<div class="ttc" id="classMelody_html_ad38db3338ed87d72238c0ea9440c633c"><div class="ttname"><a href="classMelody.html#ad38db3338ed87d72238c0ea9440c633c">Melody::isPlaying</a></div><div class="ttdeci">bool isPlaying() const </div><div class="ttdoc">Returns true if the melody is currently playing; false if not. </div><div class="ttdef"><b>Definition:</b> <a href="Melody_8h_source.html#l00126">Melody.h:126</a></div></div>
<div class="ttc" id="classMelody_html_aecc9185c9cb1246e8a55521b17d72932"><div class="ttname"><a href="classMelody.html#aecc9185c9cb1246e8a55521b17d72932">Melody::playOnce</a></div><div class="ttdeci">void playOnce()</div><div class="ttdoc">Plays the melody once and then stops. </div><div class="ttdef"><b>Definition:</b> <a href="Melody_8cpp_source.html#l00162">Melody.cpp:162</a></div></div>
<div class="ttc" id="classMelody_html_a9edc4165a49368dd5d78eedf982c38b9"><div class="ttname"><a href="classMelody.html#a9edc4165a49368dd5d78eedf982c38b9">Melody::Melody</a></div><div class="ttdeci">Melody(uint8_t pin)</div><div class="ttdoc">Constructs a new melody playing object for pin. </div><div class="ttdef"><b>Definition:</b> <a href="Melody_8cpp_source.html#l00085">Melody.cpp:85</a></div></div>
<div class="ttc" id="classMelody_html_ab78253ae9abc8478b05f415f5d878a60"><div class="ttname"><a href="classMelody.html#ab78253ae9abc8478b05f415f5d878a60">Melody::loopCount</a></div><div class="ttdeci">int loopCount() const </div><div class="ttdoc">Returns the number of times the melody should loop before stopping. </div><div class="ttdef"><b>Definition:</b> <a href="Melody_8h_source.html#l00128">Melody.h:128</a></div></div>
<div class="ttc" id="classMelody_html"><div class="ttname"><a href="classMelody.html">Melody</a></div><div class="ttdoc">Plays a melody on a digital output pin using tone(). </div><div class="ttdef"><b>Definition:</b> <a href="Melody_8h_source.html#l00122">Melody.h:122</a></div></div>
<div class="ttc" id="classMelody_html_ae88ad06c2acb728f56dd213d5dad6006"><div class="ttname"><a href="classMelody.html#ae88ad06c2acb728f56dd213d5dad6006">Melody::setLoopDuration</a></div><div class="ttdeci">void setLoopDuration(unsigned long ms)</div><div class="ttdoc">Sets the maximum number of loops to last no longer than ms milliseconds. </div><div class="ttdef"><b>Definition:</b> <a href="Melody_8cpp_source.html#l00131">Melody.cpp:131</a></div></div>
<div class="ttc" id="classMelody_html_a9fd8e0d48833d8da3cd3b3b58408b0b5"><div class="ttname"><a href="classMelody.html#a9fd8e0d48833d8da3cd3b3b58408b0b5">Melody::play</a></div><div class="ttdeci">void play()</div><div class="ttdoc">Starts playing the melody, or restarts it if already playing. </div><div class="ttdef"><b>Definition:</b> <a href="Melody_8cpp_source.html#l00146">Melody.cpp:146</a></div></div>
<div class="ttc" id="classMelody_html_a507097a2e8ff51a5e9157e3a320ae35b"><div class="ttname"><a href="classMelody.html#a507097a2e8ff51a5e9157e3a320ae35b">Melody::setLoopCount</a></div><div class="ttdeci">void setLoopCount(int count)</div><div class="ttdoc">Sets the number of times the melody should loop to count. </div><div class="ttdef"><b>Definition:</b> <a href="Melody_8h_source.html#l00129">Melody.h:129</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Sep 29 2013 09:30:46 for ArduinoLibs by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Thu Mar 12 2015 19:02:05 for ArduinoLibs by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.2
</a> 1.8.6
</small></address>
</body>
</html>