Functions
STM32F769I_DISCOVERY_AUDIO_In Private Functions
Collaboration diagram for STM32F769I_DISCOVERY_AUDIO_In Private Functions:

Functions

uint8_t BSP_AUDIO_IN_AllocScratch (int32_t *pScratch, uint32_t size)
 Allocate channel buffer scratch. More...
 
__weak void BSP_AUDIO_IN_ClockConfig (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t AudioFreq, void *Params)
 Clock Config. More...
 
void BSP_AUDIO_IN_DeInit (void)
 Deinit the audio IN peripherals. More...
 
__weak void BSP_AUDIO_IN_Error_CallBack (void)
 Audio IN Error callback function. More...
 
uint8_t BSP_AUDIO_IN_GetChannelNumber (void)
 Return audio in channel number. More...
 
__weak void BSP_AUDIO_IN_HalfTransfer_CallBack (void)
 Manages the DMA Half Transfer complete event. More...
 
uint8_t BSP_AUDIO_IN_Init (uint32_t AudioFreq, uint32_t BitRes, uint32_t ChnlNbr)
 Initialize wave recording. More...
 
uint8_t BSP_AUDIO_IN_InitEx (uint16_t InputDevice, uint32_t AudioFreq, uint32_t BitRes, uint32_t ChnlNbr)
 Initialize wave recording. More...
 
__weak void BSP_AUDIO_IN_MspDeInit (void)
 DeInitialize BSP_AUDIO_IN MSP. More...
 
__weak void BSP_AUDIO_IN_MspInit (void)
 Initialize BSP_AUDIO_IN MSP. More...
 
uint8_t BSP_AUDIO_IN_Pause (void)
 Pause the audio file stream. More...
 
uint8_t BSP_AUDIO_IN_Record (uint16_t *pbuf, uint32_t size)
 Start audio recording. More...
 
uint8_t BSP_AUDIO_IN_Resume (void)
 Resume the audio file stream. More...
 
uint8_t BSP_AUDIO_IN_Stop (void)
 Stop audio recording. More...
 
__weak void BSP_AUDIO_IN_TransferComplete_CallBack (void)
 User callback when record buffer is filled. More...
 
static void DFSDMx_ChannelMspDeInit (void)
 DeInitialize the DFSDM channel MSP. More...
 
static void DFSDMx_ChannelMspInit (void)
 Initialize the DFSDM channel MSP. More...
 
static uint8_t DFSDMx_DeInit (void)
 De-initialize the Digital Filter for Sigma-Delta Modulators interface (DFSDM). More...
 
static void DFSDMx_FilterMspDeInit (void)
 DeInitialize the DFSDM filter MSP. More...
 
static void DFSDMx_FilterMspInit (void)
 Initialize the DFSDM filter MSP. More...
 
static uint8_t DFSDMx_Init (uint32_t AudioFreq)
 Initialize the Digital Filter for Sigma-Delta Modulators interface (DFSDM). More...
 
void HAL_DFSDM_FilterRegConvCpltCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter)
 Regular conversion complete callback. More...
 
void HAL_DFSDM_FilterRegConvHalfCpltCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter)
 Half regular conversion complete callback. More...
 
void HAL_SAI_RxCpltCallback (SAI_HandleTypeDef *hsai)
 Reception complete callback. More...
 
void HAL_SAI_RxHalfCpltCallback (SAI_HandleTypeDef *hsai)
 Half reception complete callback. More...
 

Detailed Description

Function Documentation

◆ BSP_AUDIO_IN_AllocScratch()

uint8_t BSP_AUDIO_IN_AllocScratch ( int32_t *  pScratch,
uint32_t  size 
)

Allocate channel buffer scratch.

Parameters
pScratch: pointer to scratch tables.
sizeof scratch buffer

Definition at line 1204 of file stm32f769i_discovery_audio.c.

◆ BSP_AUDIO_IN_ClockConfig()

__weak void BSP_AUDIO_IN_ClockConfig ( DFSDM_Filter_HandleTypeDef hdfsdm_filter,
uint32_t  AudioFreq,
void *  Params 
)

Clock Config.

Parameters
hdfsdm_filtermight be required to set audio peripheral predivider if any.
AudioFreqAudio frequency used to play the audio stream.
Params
Note
This API is called by BSP_AUDIO_IN_Init() Being __weak it can be overwritten by the application
Return values
None

Definition at line 1690 of file stm32f769i_discovery_audio.c.

◆ BSP_AUDIO_IN_DeInit()

void BSP_AUDIO_IN_DeInit ( void  )

Deinit the audio IN peripherals.

Return values
None

Definition at line 1420 of file stm32f769i_discovery_audio.c.

◆ BSP_AUDIO_IN_Error_CallBack()

__weak void BSP_AUDIO_IN_Error_CallBack ( void  )

Audio IN Error callback function.

Return values
None

Definition at line 1637 of file stm32f769i_discovery_audio.c.

◆ BSP_AUDIO_IN_GetChannelNumber()

uint8_t BSP_AUDIO_IN_GetChannelNumber ( void  )

Return audio in channel number.

Return values
Numberof channel

Definition at line 1223 of file stm32f769i_discovery_audio.c.

◆ BSP_AUDIO_IN_HalfTransfer_CallBack()

__weak void BSP_AUDIO_IN_HalfTransfer_CallBack ( void  )

Manages the DMA Half Transfer complete event.

Return values
None

Definition at line 1626 of file stm32f769i_discovery_audio.c.

◆ BSP_AUDIO_IN_Init()

uint8_t BSP_AUDIO_IN_Init ( uint32_t  AudioFreq,
uint32_t  BitRes,
uint32_t  ChnlNbr 
)

Initialize wave recording.

Initializes wave recording.

Parameters
AudioFreqAudio frequency to be configured for the DFSDM peripheral.
BitResAudio frequency to be configured for the DFSDM peripheral.
ChnlNbrAudio frequency to be configured for the DFSDM peripheral.
Return values
AUDIO_OKif correct communication, else wrong communication

Definition at line 1127 of file stm32f769i_discovery_audio.c.

◆ BSP_AUDIO_IN_InitEx()

uint8_t BSP_AUDIO_IN_InitEx ( uint16_t  InputDevice,
uint32_t  AudioFreq,
uint32_t  BitRes,
uint32_t  ChnlNbr 
)

Initialize wave recording.

Parameters
InputDeviceINPUT_DEVICE_DIGITAL_MIC or INPUT_DEVICE_ANALOG_MIC.
AudioFreqAudio frequency to be configured.
BitResAudio bit resolution to be configured..
ChnlNbrNumber of channel to be configured.
Return values
AUDIO_OKif correct communication, else wrong communication

Definition at line 1140 of file stm32f769i_discovery_audio.c.

◆ BSP_AUDIO_IN_MspDeInit()

__weak void BSP_AUDIO_IN_MspDeInit ( void  )

DeInitialize BSP_AUDIO_IN MSP.

Return values
None

Definition at line 1666 of file stm32f769i_discovery_audio.c.

◆ BSP_AUDIO_IN_MspInit()

__weak void BSP_AUDIO_IN_MspInit ( void  )

Initialize BSP_AUDIO_IN MSP.

Return values
None

Definition at line 1647 of file stm32f769i_discovery_audio.c.

◆ BSP_AUDIO_IN_Pause()

uint8_t BSP_AUDIO_IN_Pause ( void  )

Pause the audio file stream.

Pauses the audio file stream.

Return values
AUDIO_OKif correct communication, else wrong communication

Definition at line 1348 of file stm32f769i_discovery_audio.c.

◆ BSP_AUDIO_IN_Record()

uint8_t BSP_AUDIO_IN_Record ( uint16_t *  pbuf,
uint32_t  size 
)

Start audio recording.

Starts audio recording.

Parameters
pbufMain buffer pointer for the recorded data storing
sizeCurrent size of the recorded buffer
Return values
AUDIO_OKif correct communication, else wrong communication

Definition at line 1234 of file stm32f769i_discovery_audio.c.

◆ BSP_AUDIO_IN_Resume()

uint8_t BSP_AUDIO_IN_Resume ( void  )

Resume the audio file stream.

Resumes the audio file stream.

Return values
AUDIO_OKif correct communication, else wrong communication

Definition at line 1384 of file stm32f769i_discovery_audio.c.

◆ BSP_AUDIO_IN_Stop()

uint8_t BSP_AUDIO_IN_Stop ( void  )

Stop audio recording.

Stops audio recording.

Return values
AUDIO_OKif correct communication, else wrong communication

Definition at line 1287 of file stm32f769i_discovery_audio.c.

◆ BSP_AUDIO_IN_TransferComplete_CallBack()

__weak void BSP_AUDIO_IN_TransferComplete_CallBack ( void  )

User callback when record buffer is filled.

Return values
None

Definition at line 1615 of file stm32f769i_discovery_audio.c.

◆ DFSDMx_ChannelMspDeInit()

static void DFSDMx_ChannelMspDeInit ( void  )
static

DeInitialize the DFSDM channel MSP.

Return values
None

Definition at line 2046 of file stm32f769i_discovery_audio.c.

◆ DFSDMx_ChannelMspInit()

static void DFSDMx_ChannelMspInit ( void  )
static

Initialize the DFSDM channel MSP.

Return values
None

Definition at line 2009 of file stm32f769i_discovery_audio.c.

◆ DFSDMx_DeInit()

static uint8_t DFSDMx_DeInit ( void  )
static

De-initialize the Digital Filter for Sigma-Delta Modulators interface (DFSDM).

Return values
AUDIO_OKif correct communication, else wrong communication

Definition at line 1953 of file stm32f769i_discovery_audio.c.

◆ DFSDMx_FilterMspDeInit()

static void DFSDMx_FilterMspDeInit ( void  )
static

DeInitialize the DFSDM filter MSP.

Return values
None

Definition at line 2184 of file stm32f769i_discovery_audio.c.

◆ DFSDMx_FilterMspInit()

static void DFSDMx_FilterMspInit ( void  )
static

Initialize the DFSDM filter MSP.

Return values
None

Definition at line 2070 of file stm32f769i_discovery_audio.c.

◆ DFSDMx_Init()

static uint8_t DFSDMx_Init ( uint32_t  AudioFreq)
static

Initialize the Digital Filter for Sigma-Delta Modulators interface (DFSDM).

Parameters
AudioFreqAudio frequency to be used to set correctly the DFSDM peripheral.
Note
Channel output Clock Divider and Filter Oversampling are calculated as follow:
  • Clock_Divider = CLK(input DFSDM)/CLK(micro) with 1MHZ < CLK(micro) < 3.2MHZ (TYP 2.4MHZ for MP34DT01TR)
  • Oversampling = CLK(input DFSDM)/(Clock_Divider * AudioFreq)
Return values
AUDIO_OKif correct communication, else wrong communication

Definition at line 1743 of file stm32f769i_discovery_audio.c.

◆ HAL_DFSDM_FilterRegConvCpltCallback()

void HAL_DFSDM_FilterRegConvCpltCallback ( DFSDM_Filter_HandleTypeDef hdfsdm_filter)

Regular conversion complete callback.

Note
In interrupt mode, user has to read conversion value in this function using HAL_DFSDM_FilterGetRegularValue.
Parameters
hdfsdm_filter: DFSDM filter handle.
Return values
None

Definition at line 1441 of file stm32f769i_discovery_audio.c.

◆ HAL_DFSDM_FilterRegConvHalfCpltCallback()

void HAL_DFSDM_FilterRegConvHalfCpltCallback ( DFSDM_Filter_HandleTypeDef hdfsdm_filter)

Half regular conversion complete callback.

Parameters
hdfsdm_filter: DFSDM filter handle.
Return values
None

Definition at line 1517 of file stm32f769i_discovery_audio.c.

◆ HAL_SAI_RxCpltCallback()

void HAL_SAI_RxCpltCallback ( SAI_HandleTypeDef hsai)

Reception complete callback.

Parameters
hsai: SAI handle.
Return values
None

Definition at line 1605 of file stm32f769i_discovery_audio.c.

◆ HAL_SAI_RxHalfCpltCallback()

void HAL_SAI_RxHalfCpltCallback ( SAI_HandleTypeDef hsai)

Half reception complete callback.

Parameters
hsai: SAI handle.
Return values
None

Definition at line 1593 of file stm32f769i_discovery_audio.c.



picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:08