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: Sound/Sound.cpp
- Revision:
- 33:e7635c8a58a8
- Parent:
- 31:cfdb014ff086
diff -r 1049618104a2 -r e7635c8a58a8 Sound/Sound.cpp --- a/Sound/Sound.cpp Tue May 26 14:21:58 2020 +0000 +++ b/Sound/Sound.cpp Tue May 26 14:32:06 2020 +0000 @@ -5,16 +5,18 @@ volatile extern uint16_t tri_wavtable[1024]; volatile extern uint16_t pulse_wavtable[1024]; -//Constructor/Destructor + Sound::Sound() { } + Sound::~Sound() { } //PUBLIC:----------------------------------------------------------------------- + uint16_t Sound::sound_main(bool initial, int waveform, int frequency) { if (initial==true) { //initiialises @@ -45,6 +47,7 @@ } //PRIVATE:---------------------------------------------------------------------- + uint16_t Sound::wavetable_itt(uint16_t i, int frequency) { i_d = i + ((1024*frequency)/ 10000); //i+((samples*f)*Ts)