STM32769I_EVAL BSP User Manual
|
Functions | |
uint8_t | BSP_AUDIO_OUT_Init (uint16_t OutputDevice, uint8_t Volume, uint32_t AudioFreq) |
Configure the audio peripherals. | |
void | BSP_AUDIO_OUT_DeInit (void) |
De-initialize the audio peripherals. | |
uint8_t | BSP_AUDIO_OUT_Play (uint16_t *pBuffer, uint32_t Size) |
Start playing audio stream from a data buffer for a determined size. | |
void | BSP_AUDIO_OUT_ChangeBuffer (uint16_t *pData, uint16_t Size) |
Send n-Bytes on the SAI interface. | |
uint8_t | BSP_AUDIO_OUT_Pause (void) |
Pause the audio file stream. | |
uint8_t | BSP_AUDIO_OUT_Resume (void) |
Resume the audio file stream. | |
uint8_t | BSP_AUDIO_OUT_Stop (uint32_t Option) |
Stop audio playing and Power down the Audio Codec. | |
uint8_t | BSP_AUDIO_OUT_SetVolume (uint8_t Volume) |
Control the current audio volume level. | |
void | BSP_AUDIO_OUT_SetFrequency (uint32_t AudioFreq) |
Update the audio frequency. | |
void | BSP_AUDIO_OUT_SetAudioFrameSlot (uint32_t AudioFrameSlot) |
Update the Audio frame slot configuration. | |
uint8_t | BSP_AUDIO_OUT_SetMute (uint32_t Cmd) |
Enable or disable 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_TransferComplete_CallBack (void) |
Manages the DMA full Transfer complete event. | |
void | BSP_AUDIO_OUT_HalfTransfer_CallBack (void) |
Manages the DMA Half Transfer complete event. | |
void | BSP_AUDIO_OUT_Error_CallBack (void) |
Manages the DMA FIFO error event. | |
void | BSP_AUDIO_OUT_ClockConfig (SAI_HandleTypeDef *hsai, uint32_t AudioFreq, void *Params) |
Clock Config. | |
void | BSP_AUDIO_OUT_MspInit (SAI_HandleTypeDef *hsai, void *Params) |
Initialize BSP_AUDIO_OUT MSP. | |
void | BSP_AUDIO_OUT_MspDeInit (SAI_HandleTypeDef *hsai, void *Params) |
Deinitialize SAI MSP. |
Function Documentation
void BSP_AUDIO_OUT_ChangeBuffer | ( | uint16_t * | pData, |
uint16_t | Size | ||
) |
Send 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 378 of file stm32f769i_eval_audio.c.
References haudio_out_sai.
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. Params
- 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 880 of file stm32f769i_eval_audio.c.
Referenced by BSP_AUDIO_OUT_Init(), and BSP_AUDIO_OUT_SetFrequency().
void BSP_AUDIO_OUT_DeInit | ( | void | ) |
De-initialize the audio peripherals.
- Return values:
-
None
Definition at line 681 of file stm32f769i_eval_audio.c.
References BSP_AUDIO_OUT_MspDeInit(), haudio_out_sai, and SAIx_DeInit().
void BSP_AUDIO_OUT_Error_CallBack | ( | void | ) |
Manages the DMA FIFO error event.
- Return values:
-
None
Definition at line 742 of file stm32f769i_eval_audio.c.
Referenced by HAL_SAI_ErrorCallback().
void BSP_AUDIO_OUT_HalfTransfer_CallBack | ( | void | ) |
Manages the DMA Half Transfer complete event.
- Return values:
-
None
Definition at line 734 of file stm32f769i_eval_audio.c.
Referenced by HAL_SAI_TxHalfCpltCallback().
uint8_t BSP_AUDIO_OUT_Init | ( | uint16_t | OutputDevice, |
uint8_t | Volume, | ||
uint32_t | AudioFreq | ||
) |
Configure 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.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 249 of file stm32f769i_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, AUDIO_SAIx, AudioOut_Device, BSP_AUDIO_OUT_ClockConfig(), BSP_AUDIO_OUT_MspInit(), haudio_out_sai, OUTPUT_DEVICE_HDMI, SAIx_DeInit(), and SAIx_Init().
void BSP_AUDIO_OUT_MspDeInit | ( | SAI_HandleTypeDef * | hsai, |
void * | Params | ||
) |
Deinitialize SAI MSP.
- Parameters:
-
hsai,: SAI handle Params
- Return values:
-
None
Definition at line 835 of file stm32f769i_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().
void BSP_AUDIO_OUT_MspInit | ( | SAI_HandleTypeDef * | hsai, |
void * | Params | ||
) |
Initialize BSP_AUDIO_OUT MSP.
- Parameters:
-
hsai,: SAI handle Params
- Return values:
-
None
Definition at line 752 of file stm32f769i_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 | ) |
Pause the audio file stream.
In case of using DMA, the DMA Pause feature is used.
- Note:
- 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 391 of file stm32f769i_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, AudioOut_Device, haudio_out_sai, and OUTPUT_DEVICE_HDMI.
uint8_t BSP_AUDIO_OUT_Play | ( | uint16_t * | pBuffer, |
uint32_t | Size | ||
) |
Start 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 329 of file stm32f769i_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, AUDIODATA_SIZE, AudioOut_Device, DMA_MAX, haudio_out_sai, and OUTPUT_DEVICE_HDMI.
uint8_t BSP_AUDIO_OUT_Resume | ( | void | ) |
Resume the audio file stream.
- Note:
- 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 442 of file stm32f769i_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, AudioOut_Device, haudio_out_sai, and OUTPUT_DEVICE_HDMI.
void BSP_AUDIO_OUT_SetAudioFrameSlot | ( | uint32_t | AudioFrameSlot | ) |
Update the Audio frame slot configuration.
- Parameters:
-
AudioFrameSlot,: specifies the audio Frame slot
- Note:
- This API should be called after the BSP_AUDIO_OUT_Init() to adjust the audio frame slot.
- Return values:
-
None
Definition at line 663 of file stm32f769i_eval_audio.c.
References haudio_out_sai.
void BSP_AUDIO_OUT_SetFrequency | ( | uint32_t | AudioFreq | ) |
Update 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 640 of file stm32f769i_eval_audio.c.
References BSP_AUDIO_OUT_ClockConfig(), and haudio_out_sai.
uint8_t BSP_AUDIO_OUT_SetMute | ( | uint32_t | Cmd | ) |
Enable or disable 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 571 of file stm32f769i_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, AudioOut_Device, and OUTPUT_DEVICE_HDMI.
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 619 of file stm32f769i_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, and AUDIO_OK.
uint8_t BSP_AUDIO_OUT_SetVolume | ( | uint8_t | Volume | ) |
Control 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 551 of file stm32f769i_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, and AUDIO_OK.
uint8_t BSP_AUDIO_OUT_Stop | ( | uint32_t | Option | ) |
Stop 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 495 of file stm32f769i_eval_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, AudioOut_Device, haudio_out_sai, and OUTPUT_DEVICE_HDMI.
void BSP_AUDIO_OUT_TransferComplete_CallBack | ( | void | ) |
Manages the DMA full Transfer complete event.
- Return values:
-
None
Definition at line 726 of file stm32f769i_eval_audio.c.
Referenced by HAL_SAI_TxCpltCallback().
Generated on Fri Dec 30 2016 20:55:35 for STM32769I_EVAL BSP User Manual by 1.7.6.1