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 ESDC2014 by
Diff: buzzer.h
- Revision:
- 1:cbec1283a16a
- Parent:
- 0:3417ca0a36c0
- Child:
- 2:442902ec3aa1
--- a/buzzer.h Tue Jul 01 10:59:33 2014 +0000
+++ b/buzzer.h Thu Jul 03 03:56:29 2014 +0000
@@ -32,15 +32,25 @@
#include "define.h"
#include "mbed.h"
+#define TIME_OUT 8 //8 seconds
+
class Buzzer
{
public:
Buzzer(MyDigitalOut* buzzer);
~Buzzer();
- void buzzerON();
- void buzzerOFF();
+ void ON();
+ void OFF();
+ void setFlag();
+ void cleanFlag();
+
+ void check_time_out();
+ void time_out_init();
+
private:
MyDigitalOut* _buzzer;
+ uint8_t flag;
+ Timeout time_out;
};
#endif
\ No newline at end of file
