Rangel Alvarado / SOMO14D

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>>


All wikipages