t
Dependencies: DM_FATFileSystem DM_HttpServer DM_USBHost EthernetInterface USBDevice mbed-rpc mbed-rtos
Fork of DMSupport by
Diff: DMBoard.h
- Revision:
- 5:c77fdb6e3438
- Parent:
- 3:2fa7755f2cef
- Child:
- 9:a33326afd686
diff -r 6fdcdf7aff8d -r c77fdb6e3438 DMBoard.h --- a/DMBoard.h Mon Dec 08 12:48:44 2014 +0000 +++ b/DMBoard.h Wed Dec 10 08:25:17 2014 +0000 @@ -85,7 +85,20 @@ BoardError init(); void setLED(Leds led, bool on); - void buzzer(float value); + + /** Controls the buzzer + * + * Examples: + * buzzer() turns it off + * buzzer(440) plays an A4 (440Hz) note forever + * buzzer(200, 25) plays a 200Hz tone for 25ms and then turns it off + * + * Note that if duration_ms is >0 this is a blocking call + * + * @param frequency the frequency of the tone (in Hz) or 0 to turn it off + * @param duration_ms the number of milliseconds to play or 0 for forever + */ + void buzzer(int frequency=0, int duration_ms=0); bool buttonPressed(); #if defined(DM_BOARD_USE_TOUCH)