Skip to content

Commit

Permalink
stm32l496: Remove broken checks against double init
Browse files Browse the repository at this point in the history
Prevented stop/start from working properly
  • Loading branch information
jonnor committed Sep 6, 2020
1 parent 5c45e58 commit a6f1a1c
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions Drivers/BSP/STM32L496G-Discovery/stm32l496g_discovery_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,12 +783,6 @@ uint8_t BSP_AUDIO_IN_Init(uint32_t AudioFreq, uint32_t BitRes, uint32_t ChnlNbr)
*/
uint8_t BSP_AUDIO_IN_InitEx(uint16_t InputDevice, uint32_t AudioFreq, uint32_t BitRes, uint32_t ChnlNbr)
{
static bool audio_initialized = false;

if (audio_initialized) {
return AUDIO_OK;
}

/* Update the audio input context */
hAudioIn.AudioDrv = &cs42l51_drv;
hAudioIn.InputDevice = InputDevice;
Expand Down Expand Up @@ -865,7 +859,6 @@ uint8_t BSP_AUDIO_IN_InitEx(uint16_t InputDevice, uint32_t AudioFreq, uint32_t B
DmaRightRecHalfBuffCplt = 0;
DmaRightRecBuffCplt = 0;

audio_initialized = true;
return AUDIO_OK;
}

Expand Down

0 comments on commit a6f1a1c

Please sign in to comment.