STM32756G_EVAL BSP User Manual
|
Functions | |
uint8_t | BSP_AUDIO_OUT_Init (uint16_t OutputDevice, uint8_t Volume, uint32_t AudioFreq) |
Configures the audio peripherals. | |
uint8_t | BSP_AUDIO_OUT_Play (uint16_t *pBuffer, uint32_t Size) |
Starts playing audio stream from a data buffer for a determined size. | |
void | BSP_AUDIO_OUT_ChangeBuffer (uint16_t *pData, uint16_t Size) |
Sends n-Bytes on the SAI interface. | |
uint8_t | BSP_AUDIO_OUT_Pause (void) |
This function Pauses the audio file stream. | |
uint8_t | BSP_AUDIO_OUT_Resume (void) |
This function Resumes the audio file stream. | |
uint8_t | BSP_AUDIO_OUT_Stop (uint32_t Option) |
Stops audio playing and Power down the Audio Codec. | |
uint8_t | BSP_AUDIO_OUT_SetVolume (uint8_t Volume) |
Controls the current audio volume level. | |
uint8_t | BSP_AUDIO_OUT_SetMute (uint32_t Cmd) |
Enables or disables the MUTE mode by software. | |
uint8_t | BSP_AUDIO_OUT_SetOutputMode (uint8_t Output) |
Switch dynamically (while audio file is played) the output target (speaker or headphone). | |
void | BSP_AUDIO_OUT_SetFrequency (uint32_t AudioFreq) |
Updates the audio frequency. | |
void | BSP_AUDIO_OUT_SetAudioFrameSlot (uint32_t AudioFrameSlot) |
Updates the Audio frame slot configuration. | |
void | BSP_AUDIO_OUT_DeInit (void) |
Deinit the audio peripherals. | |
void | HAL_SAI_TxCpltCallback (SAI_HandleTypeDef *hsai) |
Tx Transfer completed callbacks. | |
void | HAL_SAI_TxHalfCpltCallback (SAI_HandleTypeDef *hsai) |
Tx Half Transfer completed callbacks. | |
void | HAL_SAI_ErrorCallback (SAI_HandleTypeDef *hsai) |
SAI error callbacks. | |
__weak void | BSP_AUDIO_OUT_TransferComplete_CallBack (void) |
Manages the DMA full Transfer complete event. | |
__weak void | BSP_AUDIO_OUT_HalfTransfer_CallBack (void) |
Manages the DMA Half Transfer complete event. | |
__weak void | BSP_AUDIO_OUT_Error_CallBack (void) |
Manages the DMA FIFO error event. | |
__weak void | BSP_AUDIO_OUT_MspInit (SAI_HandleTypeDef *hsai, void *Params) |
Initializes BSP_AUDIO_OUT MSP. | |
__weak void | BSP_AUDIO_OUT_MspDeInit (SAI_HandleTypeDef *hsai, void *Params) |
Deinitializes SAI MSP. | |
__weak void | BSP_AUDIO_OUT_ClockConfig (SAI_HandleTypeDef *hsai, uint32_t AudioFreq, void *Params) |
Clock Config. | |
uint8_t | BSP_AUDIO_IN_Init (uint32_t AudioFreq, uint32_t BitRes, uint32_t ChnlNbr) |
Initializes wave recording. | |
uint8_t | BSP_AUDIO_IN_Record (uint16_t *pbuf, uint32_t size) |
Starts audio recording. | |
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. | |
uint8_t | BSP_AUDIO_IN_SetVolume (uint8_t Volume) |
Controls the audio in volume level. | |
void | BSP_AUDIO_IN_DeInit (void) |
Deinit the audio IN peripherals. | |
uint8_t | BSP_AUDIO_IN_PDMToPCM (uint16_t *PDMBuf, uint16_t *PCMBuf) |
Converts audio format from PDM to PCM. | |
void | HAL_I2S_RxCpltCallback (I2S_HandleTypeDef *hi2s) |
Rx Transfer completed callbacks. | |
void | HAL_I2S_RxHalfCpltCallback (I2S_HandleTypeDef *hi2s) |
Rx Half Transfer completed callbacks. | |
void | HAL_I2S_ErrorCallback (I2S_HandleTypeDef *hi2s) |
I2S error callbacks. | |
__weak void | BSP_AUDIO_IN_TransferComplete_CallBack (void) |
User callback when record buffer is filled. | |
__weak void | BSP_AUDIO_IN_HalfTransfer_CallBack (void) |
Manages the DMA Half Transfer complete event. | |
__weak void | BSP_AUDIO_IN_Error_Callback (void) |
Audio IN Error callback function. | |
__weak void | BSP_AUDIO_IN_MspInit (I2S_HandleTypeDef *hi2s, void *Params) |
Initializes BSP_AUDIO_IN MSP. | |
__weak void | BSP_AUDIO_IN_MspDeInit (I2S_HandleTypeDef *hi2s, void *Params) |
DeInitializes BSP_AUDIO_IN MSP. | |
static void | SAIx_Init (uint32_t AudioFreq) |
Initializes the Audio Codec audio interface (SAI). | |
static void | SAIx_DeInit (void) |
Deinitializes the Audio Codec audio interface (SAI). | |
static void | CODEC_Reset (void) |
Resets the audio codec. | |
static void | PDMDecoder_Init (uint32_t AudioFreq, uint32_t ChnlNbr) |
Initializes the PDM library. | |
static void | I2Sx_Init (uint32_t AudioFreq) |
Initializes the Audio Codec audio interface (I2S) | |
static void | I2Sx_DeInit (void) |
Deinitializes the Audio Codec audio interface (I2S). | |
static void | TIMx_IC_MspInit (TIM_HandleTypeDef *htim) |
Initializes the TIM INput Capture MSP. | |
static void | TIMx_IC_MspDeInit (TIM_HandleTypeDef *htim) |
Initializes the TIM INput Capture MSP. | |
static void | TIMx_Init (void) |
Configure TIM as a clock divider by 2. | |
static void | TIMx_DeInit (void) |
Configure TIM as a clock divider by 2. |
Function Documentation
void BSP_AUDIO_IN_DeInit | ( | void | ) |
Deinit the audio IN peripherals.
- Return values:
-
None
Definition at line 918 of file stm32756g_eval_audio.c.
References BSP_AUDIO_IN_MspDeInit(), haudio_in_i2s, I2Sx_DeInit(), and TIMx_DeInit().
__weak void BSP_AUDIO_IN_Error_Callback | ( | void | ) |
Audio IN Error callback function.
- Return values:
-
None
Definition at line 1018 of file stm32756g_eval_audio.c.
Referenced by HAL_I2S_ErrorCallback().
__weak void BSP_AUDIO_IN_HalfTransfer_CallBack | ( | void | ) |
Manages the DMA Half Transfer complete event.
- Return values:
-
None
Definition at line 1007 of file stm32756g_eval_audio.c.
Referenced by HAL_I2S_RxHalfCpltCallback().
uint8_t BSP_AUDIO_IN_Init | ( | uint32_t | AudioFreq, |
uint32_t | BitRes, | ||
uint32_t | ChnlNbr | ||
) |
Initializes wave recording.
- Note:
- This function assumes that the I2S input clock (through PLL_R in Devices RevA/Z and through dedicated PLLI2S_R in Devices RevB/Y) is already configured and ready to be used.
- Parameters:
-
AudioFreq,: Audio frequency to be configured for the I2S peripheral. BitRes,: Audio frequency to be configured for the I2S peripheral. ChnlNbr,: Audio frequency to be configured for the I2S peripheral.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 807 of file stm32756g_eval_audio.c.
References AUDIO_I2Sx, AUDIO_OK, BSP_AUDIO_IN_MspInit(), haudio_in_i2s, I2Sx_DeInit(), I2Sx_Init(), and PDMDecoder_Init().
__weak void BSP_AUDIO_IN_MspDeInit | ( | I2S_HandleTypeDef * | hi2s, |
void * | Params | ||
) |
DeInitializes BSP_AUDIO_IN MSP.
- Parameters:
-
hi2s,: I2S handle
- Return values:
-
None
Definition at line 1097 of file stm32756g_eval_audio.c.
References AUDIO_I2Sx, AUDIO_I2Sx_CLK_DISABLE, AUDIO_I2Sx_DMAx_IRQ, AUDIO_I2Sx_SCK_GPIO_PORT, AUDIO_I2Sx_SCK_PIN, AUDIO_I2Sx_SD_GPIO_PORT, and AUDIO_I2Sx_SD_PIN.
Referenced by BSP_AUDIO_IN_DeInit().
__weak void BSP_AUDIO_IN_MspInit | ( | I2S_HandleTypeDef * | hi2s, |
void * | Params | ||
) |
Initializes BSP_AUDIO_IN MSP.
- Parameters:
-
hi2s,: I2S handle
- Return values:
-
None
Definition at line 1029 of file stm32756g_eval_audio.c.
References AUDIO_I2Sx, AUDIO_I2Sx_CLK_ENABLE, AUDIO_I2Sx_DMAx_CHANNEL, AUDIO_I2Sx_DMAx_CLK_ENABLE, AUDIO_I2Sx_DMAx_IRQ, AUDIO_I2Sx_DMAx_MEM_DATA_SIZE, AUDIO_I2Sx_DMAx_PERIPH_DATA_SIZE, AUDIO_I2Sx_DMAx_STREAM, AUDIO_I2Sx_SCK_AF, AUDIO_I2Sx_SCK_GPIO_CLK_ENABLE, AUDIO_I2Sx_SCK_GPIO_PORT, AUDIO_I2Sx_SCK_PIN, AUDIO_I2Sx_SD_AF, AUDIO_I2Sx_SD_GPIO_CLK_ENABLE, AUDIO_I2Sx_SD_GPIO_PORT, AUDIO_I2Sx_SD_PIN, AUDIO_IN_IRQ_PREPRIO, and TIMx_Init().
Referenced by BSP_AUDIO_IN_Init().
uint8_t BSP_AUDIO_IN_Pause | ( | void | ) |
Pauses the audio file stream.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 879 of file stm32756g_eval_audio.c.
References AUDIO_OK, and haudio_in_i2s.
uint8_t BSP_AUDIO_IN_PDMToPCM | ( | uint16_t * | PDMBuf, |
uint16_t * | PCMBuf | ||
) |
Converts audio format from PDM to PCM.
- Parameters:
-
PDMBuf,: Pointer to data PDM buffer PCMBuf,: Pointer to data PCM buffer
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 932 of file stm32756g_eval_audio.c.
References AUDIO_OK, AudioInVolume, Channel_Demux, CHANNEL_DEMUX_MASK, DEFAULT_AUDIO_IN_CHANNEL_NBR, Filter, and INTERNAL_BUFF_SIZE.
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
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 843 of file stm32756g_eval_audio.c.
References AUDIO_ERROR, AUDIO_OK, and haudio_in_i2s.
uint8_t BSP_AUDIO_IN_Resume | ( | void | ) |
Resumes the audio file stream.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 891 of file stm32756g_eval_audio.c.
References AUDIO_OK, and haudio_in_i2s.
uint8_t BSP_AUDIO_IN_SetVolume | ( | uint8_t | Volume | ) |
Controls the audio in volume level.
- Parameters:
-
Volume,: Volume level to be set in percentage from 0% to 100% (0 for Mute and 100 for Max volume level).
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 905 of file stm32756g_eval_audio.c.
References AUDIO_OK, and AudioInVolume.
uint8_t BSP_AUDIO_IN_Stop | ( | void | ) |
Stops audio recording.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 860 of file stm32756g_eval_audio.c.
References AUDIO_ERROR, AUDIO_OK, AUDIO_TIMx_CLK_DISABLE, and haudio_in_i2s.
__weak void BSP_AUDIO_IN_TransferComplete_CallBack | ( | void | ) |
User callback when record buffer is filled.
- Return values:
-
None
Definition at line 996 of file stm32756g_eval_audio.c.
Referenced by HAL_I2S_RxCpltCallback().
void BSP_AUDIO_OUT_ChangeBuffer | ( | uint16_t * | pData, |
uint16_t | Size | ||
) |
Sends n-Bytes on the SAI interface.
- Parameters:
-
pData,: pointer on data address Size,: number of data to be written
- Return values:
-
None
Definition at line 272 of file stm32756g_eval_audio.c.
References haudio_out_sai.
__weak void BSP_AUDIO_OUT_ClockConfig | ( | SAI_HandleTypeDef * | hsai, |
uint32_t | AudioFreq, | ||
void * | Params | ||
) |
Clock Config.
- Parameters:
-
hsai,: might be required to set audio peripheral predivider if any. AudioFreq,: Audio frequency used to play the audio stream.
- Note:
- This API is called by BSP_AUDIO_OUT_Init() and BSP_AUDIO_OUT_SetFrequency() Being __weak it can be overwritten by the application
- Return values:
-
None
Definition at line 662 of file stm32756g_eval_audio.c.
Referenced by BSP_AUDIO_OUT_Init(), and BSP_AUDIO_OUT_SetFrequency().
void BSP_AUDIO_OUT_DeInit | ( | void | ) |
Deinit the audio peripherals.
- Return values:
-
None
Definition at line 466 of file stm32756g_eval_audio.c.
References BSP_AUDIO_OUT_MspDeInit(), haudio_out_sai, and SAIx_DeInit().
__weak void BSP_AUDIO_OUT_Error_CallBack | ( | void | ) |
Manages the DMA FIFO error event.
- Return values:
-
None
Definition at line 527 of file stm32756g_eval_audio.c.
Referenced by HAL_SAI_ErrorCallback().
__weak void BSP_AUDIO_OUT_HalfTransfer_CallBack | ( | void | ) |
Manages the DMA Half Transfer complete event.
- Return values:
-
None
Definition at line 519 of file stm32756g_eval_audio.c.
Referenced by HAL_SAI_TxHalfCpltCallback().
uint8_t BSP_AUDIO_OUT_Init | ( | uint16_t | OutputDevice, |
uint8_t | Volume, | ||
uint32_t | AudioFreq | ||
) |
Configures the audio peripherals.
- Parameters:
-
OutputDevice,: OUTPUT_DEVICE_SPEAKER, OUTPUT_DEVICE_HEADPHONE, or OUTPUT_DEVICE_BOTH. Volume,: Initial volume level (from 0 (Mute) to 100 (Max)) AudioFreq,: Audio frequency used to play the audio stream.
- Note:
- The I2S PLL input clock must be done in the user application.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 197 of file stm32756g_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, AUDIO_SAIx, BSP_AUDIO_OUT_ClockConfig(), BSP_AUDIO_OUT_MspInit(), CODEC_Reset(), haudio_out_sai, SAIx_DeInit(), and SAIx_Init().
__weak void BSP_AUDIO_OUT_MspDeInit | ( | SAI_HandleTypeDef * | hsai, |
void * | Params | ||
) |
Deinitializes SAI MSP.
- Parameters:
-
hsai,: SAI handle
- Return values:
-
None
Definition at line 618 of file stm32756g_eval_audio.c.
References AUDIO_SAIx, AUDIO_SAIx_CLK_DISABLE, AUDIO_SAIx_DMAx_IRQ, AUDIO_SAIx_FS_GPIO_PORT, AUDIO_SAIx_FS_PIN, AUDIO_SAIx_MCLK_GPIO_PORT, AUDIO_SAIx_MCLK_PIN, AUDIO_SAIx_SCK_PIN, AUDIO_SAIx_SCK_SD_GPIO_PORT, and AUDIO_SAIx_SD_PIN.
Referenced by BSP_AUDIO_OUT_DeInit().
__weak void BSP_AUDIO_OUT_MspInit | ( | SAI_HandleTypeDef * | hsai, |
void * | Params | ||
) |
Initializes BSP_AUDIO_OUT MSP.
- Parameters:
-
hsai,: SAI handle
- Return values:
-
None
Definition at line 536 of file stm32756g_eval_audio.c.
References AUDIO_OUT_IRQ_PREPRIO, AUDIO_SAIx, AUDIO_SAIx_CLK_ENABLE, AUDIO_SAIx_DMAx_CHANNEL, AUDIO_SAIx_DMAx_CLK_ENABLE, AUDIO_SAIx_DMAx_IRQ, AUDIO_SAIx_DMAx_MEM_DATA_SIZE, AUDIO_SAIx_DMAx_PERIPH_DATA_SIZE, AUDIO_SAIx_DMAx_STREAM, AUDIO_SAIx_FS_ENABLE, AUDIO_SAIx_FS_GPIO_PORT, AUDIO_SAIx_FS_PIN, AUDIO_SAIx_FS_SD_MCLK_AF, AUDIO_SAIx_MCLK_ENABLE, AUDIO_SAIx_MCLK_GPIO_PORT, AUDIO_SAIx_MCLK_PIN, AUDIO_SAIx_SCK_AF, AUDIO_SAIx_SCK_PIN, AUDIO_SAIx_SCK_SD_ENABLE, AUDIO_SAIx_SCK_SD_GPIO_PORT, and AUDIO_SAIx_SD_PIN.
Referenced by BSP_AUDIO_OUT_Init().
uint8_t BSP_AUDIO_OUT_Pause | ( | void | ) |
This function Pauses the audio file stream.
In case of using DMA, the DMA Pause feature is used. When calling BSP_AUDIO_OUT_Pause() function for pause, only BSP_AUDIO_OUT_Resume() function should be called for resume (use of BSP_AUDIO_OUT_Play() function for resume could lead to unexpected behaviour).
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 285 of file stm32756g_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, and haudio_out_sai.
uint8_t BSP_AUDIO_OUT_Play | ( | uint16_t * | pBuffer, |
uint32_t | Size | ||
) |
Starts playing audio stream from a data buffer for a determined size.
- Parameters:
-
pBuffer,: Pointer to the buffer Size,: Number of audio data BYTES.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 250 of file stm32756g_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, AUDIODATA_SIZE, DMA_MAX, and haudio_out_sai.
uint8_t BSP_AUDIO_OUT_Resume | ( | void | ) |
This function Resumes the audio file stream.
When calling BSP_AUDIO_OUT_Pause() function for pause, only BSP_AUDIO_OUT_Resume() function should be called for resume (use of BSP_AUDIO_OUT_Play() function for resume could lead to unexpected behaviour).
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 309 of file stm32756g_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, and haudio_out_sai.
void BSP_AUDIO_OUT_SetAudioFrameSlot | ( | uint32_t | AudioFrameSlot | ) |
Updates the Audio frame slot configuration.
- Parameters:
-
AudioFrameSlot,: specifies the audio Frame slot This parameter can be any value of CODEC_AudioFrame_SLOT_TDMMode
- Note:
- This API should be called after the BSP_AUDIO_OUT_Init() to adjust the audio frame slot.
- Return values:
-
None
Definition at line 449 of file stm32756g_eval_audio.c.
References haudio_out_sai.
void BSP_AUDIO_OUT_SetFrequency | ( | uint32_t | AudioFreq | ) |
Updates the audio frequency.
- Parameters:
-
AudioFreq,: Audio frequency used to play the audio stream.
- Note:
- This API should be called after the BSP_AUDIO_OUT_Init() to adjust the audio frequency.
- Return values:
-
None
Definition at line 425 of file stm32756g_eval_audio.c.
References BSP_AUDIO_OUT_ClockConfig(), and haudio_out_sai.
uint8_t BSP_AUDIO_OUT_SetMute | ( | uint32_t | Cmd | ) |
Enables or disables the MUTE mode by software.
- Parameters:
-
Cmd,: Could be AUDIO_MUTE_ON to mute sound or AUDIO_MUTE_OFF to unmute the codec and restore previous volume level.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 383 of file stm32756g_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, and AUDIO_OK.
uint8_t BSP_AUDIO_OUT_SetOutputMode | ( | uint8_t | Output | ) |
Switch dynamically (while audio file is played) the output target (speaker or headphone).
- Parameters:
-
Output,: The audio output target: OUTPUT_DEVICE_SPEAKER, OUTPUT_DEVICE_HEADPHONE or OUTPUT_DEVICE_BOTH
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 404 of file stm32756g_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, and AUDIO_OK.
uint8_t BSP_AUDIO_OUT_SetVolume | ( | uint8_t | Volume | ) |
Controls the current audio volume level.
- Parameters:
-
Volume,: Volume level to be set in percentage from 0% to 100% (0 for Mute and 100 for Max volume level).
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 363 of file stm32756g_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, and AUDIO_OK.
uint8_t BSP_AUDIO_OUT_Stop | ( | uint32_t | Option | ) |
Stops audio playing and Power down the Audio Codec.
- Parameters:
-
Option,: could be one of the following parameters - CODEC_PDWN_SW: for software power off (by writing registers). Then no need to reconfigure the Codec after power on.
- CODEC_PDWN_HW: completely shut down the codec (physically). Then need to reconfigure the Codec after power on.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 335 of file stm32756g_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, and haudio_out_sai.
__weak void BSP_AUDIO_OUT_TransferComplete_CallBack | ( | void | ) |
Manages the DMA full Transfer complete event.
- Return values:
-
None
Definition at line 511 of file stm32756g_eval_audio.c.
Referenced by HAL_SAI_TxCpltCallback().
static void CODEC_Reset | ( | void | ) | [static] |
Resets the audio codec.
It restores the default configuration of the codec (this function shall be called before initializing the codec).
- Return values:
-
None
Definition at line 781 of file stm32756g_eval_audio.c.
References audio_drv, and AUDIO_I2C_ADDRESS.
Referenced by BSP_AUDIO_OUT_Init().
void HAL_I2S_ErrorCallback | ( | I2S_HandleTypeDef * | hi2s | ) |
I2S error callbacks.
- Parameters:
-
hi2s,: I2S handle
- Return values:
-
None
Definition at line 985 of file stm32756g_eval_audio.c.
References BSP_AUDIO_IN_Error_Callback().
void HAL_I2S_RxCpltCallback | ( | I2S_HandleTypeDef * | hi2s | ) |
Rx Transfer completed callbacks.
- Parameters:
-
hi2s,: I2S handle
- Return values:
-
None
Definition at line 962 of file stm32756g_eval_audio.c.
References BSP_AUDIO_IN_TransferComplete_CallBack().
void HAL_I2S_RxHalfCpltCallback | ( | I2S_HandleTypeDef * | hi2s | ) |
Rx Half Transfer completed callbacks.
- Parameters:
-
hi2s,: I2S handle
- Return values:
-
None
Definition at line 973 of file stm32756g_eval_audio.c.
References BSP_AUDIO_IN_HalfTransfer_CallBack().
void HAL_SAI_ErrorCallback | ( | SAI_HandleTypeDef * | hsai | ) |
SAI error callbacks.
- Parameters:
-
hsai,: SAI handle
- Return values:
-
None
Definition at line 502 of file stm32756g_eval_audio.c.
References BSP_AUDIO_OUT_Error_CallBack().
void HAL_SAI_TxCpltCallback | ( | SAI_HandleTypeDef * | hsai | ) |
Tx Transfer completed callbacks.
- Parameters:
-
hsai,: SAI handle
- Return values:
-
None
Definition at line 478 of file stm32756g_eval_audio.c.
References BSP_AUDIO_OUT_TransferComplete_CallBack().
void HAL_SAI_TxHalfCpltCallback | ( | SAI_HandleTypeDef * | hsai | ) |
Tx Half Transfer completed callbacks.
- Parameters:
-
hsai,: SAI handle
- Return values:
-
None
Definition at line 490 of file stm32756g_eval_audio.c.
References BSP_AUDIO_OUT_HalfTransfer_CallBack().
static void I2Sx_DeInit | ( | void | ) | [static] |
Deinitializes the Audio Codec audio interface (I2S).
- Return values:
-
None
Definition at line 1194 of file stm32756g_eval_audio.c.
References AUDIO_I2Sx, and haudio_in_i2s.
Referenced by BSP_AUDIO_IN_DeInit(), and BSP_AUDIO_IN_Init().
static void I2Sx_Init | ( | uint32_t | AudioFreq | ) | [static] |
Initializes the Audio Codec audio interface (I2S)
- Note:
- This function assumes that the I2S input clock (through PLL_R in Devices RevA/Z and through dedicated PLLI2S_R in Devices RevB/Y) is already configured and ready to be used.
- Parameters:
-
AudioFreq,: Audio frequency to be configured for the I2S peripheral.
- Return values:
-
None
Definition at line 1166 of file stm32756g_eval_audio.c.
References AUDIO_I2Sx, and haudio_in_i2s.
Referenced by BSP_AUDIO_IN_Init().
static void PDMDecoder_Init | ( | uint32_t | AudioFreq, |
uint32_t | ChnlNbr | ||
) | [static] |
Initializes the PDM library.
- Parameters:
-
AudioFreq,: Audio sampling frequency ChnlNbr,: Number of audio channels (1: mono; 2: stereo)
- Return values:
-
None
Definition at line 1139 of file stm32756g_eval_audio.c.
References Filter.
Referenced by BSP_AUDIO_IN_Init().
static void SAIx_DeInit | ( | void | ) | [static] |
Deinitializes the Audio Codec audio interface (SAI).
- Return values:
-
None
Definition at line 765 of file stm32756g_eval_audio.c.
References AUDIO_SAIx, and haudio_out_sai.
Referenced by BSP_AUDIO_OUT_DeInit(), and BSP_AUDIO_OUT_Init().
static void SAIx_Init | ( | uint32_t | AudioFreq | ) | [static] |
Initializes the Audio Codec audio interface (SAI).
- Parameters:
-
AudioFreq,: Audio frequency to be configured for the SAI peripheral.
- Note:
- The default SlotActive configuration is set to CODEC_AUDIOFRAME_SLOT_0123 and user can update this configuration using
- Return values:
-
None
Definition at line 711 of file stm32756g_eval_audio.c.
References AUDIO_SAIx, CODEC_AUDIOFRAME_SLOT_0123, and haudio_out_sai.
Referenced by BSP_AUDIO_OUT_Init().
static void TIMx_DeInit | ( | void | ) | [static] |
Configure TIM as a clock divider by 2.
I2S_SCK is externally connected to TIMx input channel
- Return values:
-
None
Definition at line 1332 of file stm32756g_eval_audio.c.
References AUDIO_TIMx, AUDIO_TIMx_IN_CHANNEL, AUDIO_TIMx_OUT_CHANNEL, haudio_tim, and TIMx_IC_MspDeInit().
Referenced by BSP_AUDIO_IN_DeInit().
static void TIMx_IC_MspDeInit | ( | TIM_HandleTypeDef * | htim | ) | [static] |
Initializes the TIM INput Capture MSP.
- Parameters:
-
htim,: TIM handle
- Return values:
-
None
Definition at line 1245 of file stm32756g_eval_audio.c.
References AUDIO_TIMx_CLK_DISABLE.
Referenced by TIMx_DeInit().
static void TIMx_IC_MspInit | ( | TIM_HandleTypeDef * | htim | ) | [static] |
Initializes the TIM INput Capture MSP.
- Parameters:
-
htim,: TIM handle
- Return values:
-
None
Definition at line 1212 of file stm32756g_eval_audio.c.
References AUDIO_TIMx_AF, AUDIO_TIMx_CLK_ENABLE, AUDIO_TIMx_GPIO_CLK_ENABLE, AUDIO_TIMx_GPIO_PORT, AUDIO_TIMx_IN_GPIO_PIN, and AUDIO_TIMx_OUT_GPIO_PIN.
Referenced by TIMx_Init().
static void TIMx_Init | ( | void | ) | [static] |
Configure TIM as a clock divider by 2.
I2S_SCK is externally connected to TIMx input channel
- Return values:
-
None
Definition at line 1259 of file stm32756g_eval_audio.c.
References AUDIO_TIMx, AUDIO_TIMx_IN_CHANNEL, AUDIO_TIMx_OUT_CHANNEL, haudio_tim, and TIMx_IC_MspInit().
Referenced by BSP_AUDIO_IN_MspInit().
Generated on Fri May 22 2015 13:59:20 for STM32756G_EVAL BSP User Manual by 1.7.6.1