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.
play_buzzer.h
- Committer:
- math991e
- Date:
- 2019-01-11
- Revision:
- 7:9837cd1a23c6
- Parent:
- 6:9ab8c4b24da7
- Child:
- 8:877d9cd31d87
File content as of revision 7:9837cd1a23c6:
/**
* @file play_buzzer.h
* @brief this cpp file is where all the logic is handled.
*
* @author Nikolaj M. & Mathias R.
*
* @date 10/1/2019
*/
//PROGRAM: play_buzzer
#ifndef PLAY_BUZZER_H
#define PLAY_BUZZER_H
#include "mbed.h"
namespace mbed {
///play_buzzer CLASS
class play_buzzer {
///INITIALIZE VARIABLES USED IN CLASS
private :
PinName _pin;
PwmOut _pwm;
Timeout toff;
///FUNCTIONS AND CONSTRUCTOR
public:
void play_buzzer(PinName);
void beep (int notes, int tones);
void nobeep();
int play(int song);
void setPin(PinName pin);
PinName getPin();
};
};
#endif