圧電ブザーをwaitなしで好きなように鳴らすライブラリ
Dependents: Tourobo2022_TBCMotorDriver
Revision 3:a5296d97ba97, committed 2019-10-22
- Comitter:
- YutaTogashi
- Date:
- Tue Oct 22 04:05:17 2019 +0000
- Parent:
- 2:cd0d402e06c9
- Commit message:
- 1022
Changed in this revision
buzzer.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r cd0d402e06c9 -r a5296d97ba97 buzzer.h --- a/buzzer.h Fri Oct 11 17:26:37 2019 +0000 +++ b/buzzer.h Tue Oct 22 04:05:17 2019 +0000 @@ -17,10 +17,10 @@ * @param buzzerPin buzzer connect pin */ buzzer(PinName buzzerPin); - void output(unsigned int count,float period); - void output(bool buzzerStates); - void output(float period); - void stop(); + void output(unsigned int count,float period); //period周期でcount回圧電ブザーを鳴らす + void output(bool buzzerStates); //false→消音 true→音なる + void output(float period); //period周期でstop()が呼び出されるまでブザーを鳴らす + void stop(); //ブザーを止める private: DigitalOut _buzzer; Ticker _timer;