圧電ブザーをwaitなしで好きなように鳴らすライブラリ

Dependents:   Tourobo2022_TBCMotorDriver

Revision:
1:96bd2135c3bf
Parent:
0:97f383c12e42
Child:
2:cd0d402e06c9
--- a/buzzer.h	Thu Oct 03 09:34:57 2019 +0000
+++ b/buzzer.h	Fri Oct 04 10:23:05 2019 +0000
@@ -1,3 +1,11 @@
+/******
+ブザー用ライブラリ
+   waitを使ってないver
+
+使い方
+    実際に使ってみること
+*****/
+
 #ifndef BUZZER_H
 #define BUZZER_H
 #include "mbed.h"
@@ -7,13 +15,14 @@
         buzzer(PinName buzzerPin);
         void output(unsigned int count,float period);
         void output(bool buzzerStates);
+        void output(float period);
         void stop();
     private:
         DigitalOut _buzzer;
         Ticker     _timer;
         
         void timerFunction();
-        int _counter,_setCount,_timerFlag;
+        int _counter,_setCount,_timerFlag,_loopFlag;
           
 };