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.
Diff: tone.h
- Revision:
- 3:9ddabd24f48c
- Parent:
- 1:3b00679c208a
--- a/tone.h Sun Nov 19 10:17:34 2017 +0000 +++ b/tone.h Mon Nov 20 03:53:48 2017 +0000 @@ -1,7 +1,7 @@ /* tone.h Written by Leong Kum Loong. - 19 Nov 2017, REV. 1 + 20 Nov 2017, REV. 2 All routines and functions in this library are written by me solely with the purpose of implementing an identical "tone" library that was introduced by Arduino IDE. @@ -16,7 +16,9 @@ #define tone_h #include "mbed.h" -void tone(int frequency, int duration_ms); +void tone(int frequency, int duration_ms=0); //Sound tone at specific frequency of 50% duty cycle and duration(optional). + +void noTone(); //Turn off tone. void mario_example();