Mathias Rasmussen / Music

play_buzzer.h

Committer:
math991e
Date:
2019-01-10
Revision:
1:50204a498764
Parent:
0:e44696c93c6b
Child:
5:d879dead6768

File content as of revision 1:50204a498764:

#ifndef PLAY_BUZZER_H
#define MBED_BEEP_H
 
#include "mbed.h"

namespace mbed {
//NAME OF CLASS
class play_buzzer {
 
//INITIALIZE VARIABLES USED IN CLASS
private :
    PinName _pin;
    PwmOut _pwm;
    Timeout toff;
//FUNCTIONS AND CONSTRUCTOR
public:
    play_buzzer(PinName);
    void beep (int notes, int tones);
    void nobeep();
    int play(int song);
    void setPin(PinName pin);
    PinName getPin();
    };
};
#endif