stm32-f4discovery-cc256x: provided hal_audio_sink_stop

This commit is contained in:
Matthias Ringwald 2019-02-24 15:31:10 +01:00
parent 1247fb8f7c
commit 3809e0ab14

View File

@ -139,12 +139,21 @@ void hal_audio_sink_start(void){
BSP_AUDIO_OUT_Play( (uint16_t*) output_buffer, NUM_OUTPUT_BUFFERS * OUTPUT_BUFFER_NUM_SAMPLES * 4);
}
/**
* @brief Stop stream
*/
void hal_audio_sink_stop(void){
started = 0;
BSP_AUDIO_OUT_Stop(CODEC_PDWN_HW);
}
/**
* @brief Close audio codec
*/
void hal_audio_sink_close(void){
started = 0;
BSP_AUDIO_OUT_Stop(CODEC_PDWN_HW);
if (started){
hal_audio_sink_close();
}
}