Josh Davy / Mbed 2 deprecated Flip

Dependencies:   mbed el17jd

Revision:
14:1e6f74233e8e
Parent:
11:db27d3838514
--- a/Music/Music.cpp	Mon May 06 15:07:28 2019 +0000
+++ b/Music/Music.cpp	Wed May 08 14:41:56 2019 +0000
@@ -1,11 +1,16 @@
 
 #include "Music.h"
 PwmOut speaker(PTC10);
-
+/**
+* @brief Constructor (no paramateters)
+*/
 Music::Music()
 {
 
 }
+/**
+* @brief Deconstructor
+*/
 Music::~Music()
 {
     
@@ -13,7 +18,12 @@
 
 }
 
-
+/**
+* @brief Initialiser. Takes the sound data and initialises the buzzer
+* @param const int* data @details The audio data. A array of the amplitude of 
+* the waveform over time
+* @param length @details Length of above sound array 
+*/
 void Music::init(const int* data,int length)
 {
     
@@ -23,7 +33,9 @@
     speaker.write(0); // until music played stay silent
     _index = 0;
 }
-
+/**
+* @brief Plays the next sound sample. Must be called at the sample rate
+*/
 void Music::play_next()
 {
     double duty_cycle;