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.
Dependents: STM32F030R8_SOMO-14D
You are viewing an older revision! See the latest version
SOMO 14D Function Library Usage
List of SOMO-14D Functions Usage¶
The function SOMO14DisBusy() checks if the busy pin is high, that means the device is playing audio
SOMO14DisBusy()
int main() { while(1) { . . if (!SOMO14DisBusy()) { /* Check if SOMO is doing something */ // Do something } . . } }
The function SOMO14DInit() initialize the module and set a callback function triggered when the device finish to play a song.
<<code title=SOMO14DInit()>>
void SOMO14DISR(void);
int main() { SOMO14DInit(SOMO14DISR); /* Set up the sound module pins */ while(1) { . . if (!SOMO14DisBusy()) { /* Check if SOMO is doing something */ Do something } . . } }
void SOMO14DISR(void) {
Do something when the audio finish
}
<<code>>