Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of beep by
beep.h
- Committer:
- dreschpe
- Date:
- 2011-02-01
- Revision:
- 0:18e4a9c978ec
- Child:
- 1:ddccf0a4a414
File content as of revision 0:18e4a9c978ec:
#ifndef MBED_BEEP_H
#define MBED_BEEP_H
#include "mbed.h"
namespace mbed {
/* Class: Beep
* A class witch uses pwm to controle a beeper to generate sounds.
*/
class Beep {
public:
/* Constructor: Beep
* Creates a new beeper object.
*
* Variables:
* pin - The pin which is connected to the beeper.
*/
Beep (PinName pin);
/* Function: beep
* Beep with given frequency and duration.
*
* Variables:
* frequency - The frequency to use.
* time - The turation to beep.
*/
void beep (float frequency, float time);
void nobeep();
private :
PwmOut _pwm;
Timeout toff;
};
}
#endif
