STM32L476G-Discovery BSP User Manual
|
Functions | |
uint8_t | BSP_AUDIO_IN_Init (uint32_t AudioFreq, uint32_t BitRes, uint32_t ChnlNbr) |
Initializes micropone related peripherals. | |
uint8_t | BSP_AUDIO_IN_DeInit (void) |
De-Initializes microphone related peripherals. | |
uint8_t | BSP_AUDIO_IN_Record (uint16_t *pbuf, uint32_t size) |
Starts audio recording. | |
uint8_t | BSP_AUDIO_IN_SetFrequency (uint32_t AudioFreq) |
Updates the audio frequency. | |
void | HAL_DFSDM_FilterRegConvCpltCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
Regular conversion complete callback. | |
void | HAL_DFSDM_FilterRegConvHalfCpltCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
Half regular conversion complete callback. | |
void | HAL_DFSDM_FilterErrorCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
Error callback. | |
uint8_t | BSP_AUDIO_IN_Stop (void) |
Stops audio recording. | |
uint8_t | BSP_AUDIO_IN_Pause (void) |
Pauses the audio file stream. | |
uint8_t | BSP_AUDIO_IN_Resume (void) |
Resumes the audio file stream. | |
void | BSP_AUDIO_IN_RegisterCallbacks (Audio_CallbackTypeDef ErrorCallback, Audio_CallbackTypeDef HalfTransferCallback, Audio_CallbackTypeDef TransferCompleteCallback) |
register user callback functions |
Function Documentation
uint8_t BSP_AUDIO_IN_DeInit | ( | void | ) |
De-Initializes microphone related peripherals.
- Return values:
-
BSP AUDIO status
Definition at line 740 of file stm32l476g_discovery_audio.c.
References AUDIO_DFSDMx_DeInit(), AUDIO_ERROR, and AUDIO_OK.
uint8_t BSP_AUDIO_IN_Init | ( | uint32_t | AudioFreq, |
uint32_t | BitRes, | ||
uint32_t | ChnlNbr | ||
) |
Initializes micropone related peripherals.
- Note:
- This function assumes that the SAI input clock (through PLL_M) is already configured and ready to be used.
- Parameters:
-
AudioFreq,: Audio frequency to be configured for the SAI peripheral. BitRes,: Audio frequency to be configured for the SAI peripheral. ChnlNbr,: Audio frequency to be configured for the SAI peripheral.
- Return values:
-
BSP AUDIO status
Definition at line 710 of file stm32l476g_discovery_audio.c.
References AUDIO_DFSDMx_Init(), AUDIO_ERROR, AUDIO_OK, AUDIO_SAIPLLConfig(), AUDIO_IN_TypeDef::BitResolution, AUDIO_IN_TypeDef::CbError, AUDIO_IN_TypeDef::CbHalfTransfer, AUDIO_IN_TypeDef::CbTransferComplete, AUDIO_IN_TypeDef::ChannelNbr, and AUDIO_IN_TypeDef::Frequency.
uint8_t BSP_AUDIO_IN_Pause | ( | void | ) |
Pauses the audio file stream.
- Return values:
-
BSP AUDIO status
Definition at line 905 of file stm32l476g_discovery_audio.c.
References AUDIO_ERROR, AUDIO_OK, and BSP_AUDIO_hDfsdmLeftFilter.
uint8_t BSP_AUDIO_IN_Record | ( | uint16_t * | pbuf, |
uint32_t | size | ||
) |
Starts audio recording.
- Parameters:
-
pbuf,: Main buffer pointer for the recorded data storing size,: Current size of the recorded buffer
- Note:
- The Right channel is start at first with synchro on start of Left channel
- Return values:
-
BSP AUDIO status
Definition at line 761 of file stm32l476g_discovery_audio.c.
References AUDIO_ERROR, AUDIO_OK, BSP_AUDIO_hDfsdmLeftFilter, DEFAULT_AUDIO_IN_CHANNEL_NBR, AUDIO_IN_TypeDef::LeftRecBuff, AUDIO_IN_TypeDef::pRecBuf, and AUDIO_IN_TypeDef::RecSize.
void BSP_AUDIO_IN_RegisterCallbacks | ( | Audio_CallbackTypeDef | ErrorCallback, |
Audio_CallbackTypeDef | HalfTransferCallback, | ||
Audio_CallbackTypeDef | TransferCompleteCallback | ||
) |
register user callback functions
- Parameters:
-
ErrorCallback,: pointer to the error callback function HalfTransferCallback,: pointer to the half transfer callback function TransferCompleteCallback,: pointer to the transfer complete callback function
- Return values:
-
None
Definition at line 940 of file stm32l476g_discovery_audio.c.
References AUDIO_IN_TypeDef::CbError, AUDIO_IN_TypeDef::CbHalfTransfer, and AUDIO_IN_TypeDef::CbTransferComplete.
uint8_t BSP_AUDIO_IN_Resume | ( | void | ) |
Resumes the audio file stream.
- Return values:
-
BSP AUDIO status
Definition at line 920 of file stm32l476g_discovery_audio.c.
References AUDIO_ERROR, AUDIO_OK, BSP_AUDIO_hDfsdmLeftFilter, DEFAULT_AUDIO_IN_CHANNEL_NBR, AUDIO_IN_TypeDef::LeftRecBuff, and AUDIO_IN_TypeDef::RecSize.
uint8_t BSP_AUDIO_IN_SetFrequency | ( | uint32_t | AudioFreq | ) |
Updates the audio frequency.
- Parameters:
-
AudioFreq,: Audio frequency used to record the audio stream.
- Note:
- This API should be called after the BSP_AUDIO_IN_Init() to adjust the audio frequency.
- Return values:
-
BSP AUDIO status
Definition at line 795 of file stm32l476g_discovery_audio.c.
References AUDIO_DFSDMx_DeInit(), AUDIO_DFSDMx_Init(), AUDIO_ERROR, AUDIO_OK, and AUDIO_SAIPLLConfig().
uint8_t BSP_AUDIO_IN_Stop | ( | void | ) |
Stops audio recording.
- Return values:
-
BSP AUDIO status
Definition at line 883 of file stm32l476g_discovery_audio.c.
References AUDIO_ERROR, AUDIO_OK, BSP_AUDIO_hDfsdmLeftFilter, and AUDIO_IN_TypeDef::LeftRecBuff.
void HAL_DFSDM_FilterErrorCallback | ( | DFSDM_Filter_HandleTypeDef * | hdfsdm_filter | ) |
Error callback.
- Parameters:
-
hdfsdm_filter : DFSDM filter handle.
- Return values:
-
None
Definition at line 870 of file stm32l476g_discovery_audio.c.
References AUDIO_IN_TypeDef::CbError.
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 825 of file stm32l476g_discovery_audio.c.
References AUDIO_IN_TypeDef::CbTransferComplete, DEFAULT_AUDIO_IN_CHANNEL_NBR, AUDIO_IN_TypeDef::LeftRecBuff, AUDIO_IN_TypeDef::pRecBuf, AUDIO_IN_TypeDef::RecSize, and SaturaLH.
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 847 of file stm32l476g_discovery_audio.c.
References AUDIO_IN_TypeDef::CbHalfTransfer, DEFAULT_AUDIO_IN_CHANNEL_NBR, AUDIO_IN_TypeDef::LeftRecBuff, AUDIO_IN_TypeDef::pRecBuf, AUDIO_IN_TypeDef::RecSize, and SaturaLH.
Generated on Tue Jun 23 2015 17:15:46 for STM32L476G-Discovery BSP User Manual by 1.7.6.1