library for Tetris program

Dependents:   Tetris

Fork of beep by Peter Drescher

Files at this revision

API Documentation at this revision

Comitter:
wsjoukes
Date:
Fri Nov 09 16:11:48 2012 +0000
Parent:
3:5a8242af60ba
Commit message:
Commit message

Changed in this revision

beep.c Show annotated file Show diff for this revision Revisions of this file
beep.h Show annotated file Show diff for this revision Revisions of this file
--- a/beep.c	Wed Feb 02 22:38:30 2011 +0000
+++ b/beep.c	Fri Nov 09 16:11:48 2012 +0000
@@ -44,9 +44,11 @@
  * @param time - the duration of the tone in seconds
  */
      
-void Beep::beep(float freq, float time) {
+void Beep::beepFreq(float freq){ 
 
     _pwm.period(1.0/freq);
+}
+void Beep::beepTime(float time) {
     _pwm.write(0.5);            // 50% duty cycle - beep on
     toff.attach(this,&Beep::nobeep, time);   // time to off
 }
--- a/beep.h	Wed Feb 02 22:38:30 2011 +0000
+++ b/beep.h	Fri Nov 09 16:11:48 2012 +0000
@@ -43,7 +43,8 @@
  * @param frequency - the frequency of the tone in Hz
  * @param time - the duration of the tone in seconds
  */
-    void beep (float frequency, float time);
+    void beepFreq (float frequency);
+    void beepTime (float time);
 
 /** stop the beep instantaneous 
  * usually not used