Functions | |
void | BSP_AUDIO_OUT_ChangeAudioConfig (uint32_t AudioOutOption) |
Changes the Audio Out Configuration. More... | |
void | BSP_AUDIO_OUT_ChangeBuffer (uint16_t *pData, uint16_t Size) |
Sends n-Bytes on the SAI interface. More... | |
__weak void | BSP_AUDIO_OUT_ClockConfig (SAI_HandleTypeDef *hsai, uint32_t AudioFreq, void *Params) |
Clock Config. More... | |
void | BSP_AUDIO_OUT_DeInit (void) |
Deinit the audio peripherals. More... | |
__weak void | BSP_AUDIO_OUT_Error_CallBack (void) |
Manages the DMA FIFO error event. More... | |
__weak void | BSP_AUDIO_OUT_HalfTransfer_CallBack (void) |
Manages the DMA Half Transfer complete event. More... | |
uint8_t | BSP_AUDIO_OUT_Init (uint16_t OutputDevice, uint8_t Volume, uint32_t AudioFreq) |
Configures the audio peripherals. More... | |
__weak void | BSP_AUDIO_OUT_MspDeInit (SAI_HandleTypeDef *hsai, void *Params) |
Deinitializes BSP_AUDIO_OUT MSP. More... | |
__weak void | BSP_AUDIO_OUT_MspInit (SAI_HandleTypeDef *hsai, void *Params) |
Initializes BSP_AUDIO_OUT MSP. More... | |
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. More... | |
uint8_t | BSP_AUDIO_OUT_Play (uint16_t *pBuffer, uint32_t Size) |
Starts playing audio stream from a data buffer for a determined size. More... | |
uint8_t | BSP_AUDIO_OUT_Resume (void) |
This function Resumes the audio file stream. WARNING: 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 behavior). More... | |
void | BSP_AUDIO_OUT_SetAudioFrameSlot (uint32_t AudioFrameSlot) |
Updates the Audio frame slot configuration. More... | |
void | BSP_AUDIO_OUT_SetFrequency (uint32_t AudioFreq) |
Updates the audio frequency. More... | |
uint8_t | BSP_AUDIO_OUT_SetMute (uint32_t Cmd) |
Enables or disables the MUTE mode by software. More... | |
uint8_t | BSP_AUDIO_OUT_SetOutputMode (uint8_t Output) |
Switch dynamically (while audio file is being played) the output target (speaker or headphone). More... | |
uint8_t | BSP_AUDIO_OUT_SetVolume (uint8_t Volume) |
Controls the current audio volume level. More... | |
uint8_t | BSP_AUDIO_OUT_Stop (uint32_t Option) |
Stops audio playing and Power down the Audio Codec. More... | |
__weak void | BSP_AUDIO_OUT_TransferComplete_CallBack (void) |
Manages the DMA full Transfer complete event. More... | |
void | HAL_SAI_ErrorCallback (SAI_HandleTypeDef *hsai) |
SAI error callbacks. More... | |
void | HAL_SAI_TxCpltCallback (SAI_HandleTypeDef *hsai) |
Tx Transfer completed callbacks. More... | |
void | HAL_SAI_TxHalfCpltCallback (SAI_HandleTypeDef *hsai) |
Tx Half Transfer completed callbacks. More... | |
static uint8_t | SAIx_Init (uint32_t AudioFreq) |
Initializes the Audio Codec audio interface (SAI). More... | |
void BSP_AUDIO_OUT_ChangeAudioConfig | ( | uint32_t | AudioOutOption | ) |
Changes the Audio Out Configuration.
AudioOutOption | specifies the audio out new configuration This parameter can be any value of BSP AUDIO OUT Option |
Definition at line 516 of file stm32469i_discovery_audio.c.
void BSP_AUDIO_OUT_ChangeBuffer | ( | uint16_t * | pData, |
uint16_t | Size | ||
) |
Sends n-Bytes on the SAI interface.
Sends n-Bytes on the I2S interface.
pData | pointer on PCM samples buffer |
Size | number of data to be written |
Definition at line 322 of file stm32469i_discovery_audio.c.
__weak void BSP_AUDIO_OUT_ClockConfig | ( | SAI_HandleTypeDef * | hsai, |
uint32_t | AudioFreq, | ||
void * | Params | ||
) |
Clock Config.
hsai | might be required to set audio peripheral predivider if any. |
AudioFreq | Audio frequency used to play the audio stream. |
Params | : pointer on additional configuration parameters, can be NULL. |
Definition at line 783 of file stm32469i_discovery_audio.c.
void BSP_AUDIO_OUT_DeInit | ( | void | ) |
Deinit the audio peripherals.
Definition at line 592 of file stm32469i_discovery_audio.c.
__weak void BSP_AUDIO_OUT_Error_CallBack | ( | void | ) |
Manages the DMA FIFO error event.
Definition at line 650 of file stm32469i_discovery_audio.c.
__weak void BSP_AUDIO_OUT_HalfTransfer_CallBack | ( | void | ) |
Manages the DMA Half Transfer complete event.
Definition at line 643 of file stm32469i_discovery_audio.c.
uint8_t BSP_AUDIO_OUT_Init | ( | uint16_t | OutputDevice, |
uint8_t | Volume, | ||
uint32_t | AudioFreq | ||
) |
Configures the audio peripherals.
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. |
AUDIO_OK | if correct communication, else wrong communication |
Definition at line 235 of file stm32469i_discovery_audio.c.
__weak void BSP_AUDIO_OUT_MspDeInit | ( | SAI_HandleTypeDef * | hsai, |
void * | Params | ||
) |
Deinitializes BSP_AUDIO_OUT MSP.
hsai | SAI handle |
Params | : pointer on additional configuration parameters, can be NULL. |
Definition at line 737 of file stm32469i_discovery_audio.c.
__weak void BSP_AUDIO_OUT_MspInit | ( | SAI_HandleTypeDef * | hsai, |
void * | Params | ||
) |
Initializes BSP_AUDIO_OUT MSP.
hsai | SAI handle |
Params | : pointer on additional configuration parameters, can be NULL. |
Definition at line 659 of file stm32469i_discovery_audio.c.
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.
Pauses the audio file stream. In case of using DMA, the DMA Pause feature is used. WARNING: When calling BSP_AUDIO_OUT_Pause() function for pause, only the BSP_AUDIO_OUT_Resume() function should be called for resume (use of BSP_AUDIO_OUT_Play() function for resume could lead to unexpected behavior).
AUDIO_OK | if correct communication, else wrong communication |
Definition at line 335 of file stm32469i_discovery_audio.c.
uint8_t BSP_AUDIO_OUT_Play | ( | uint16_t * | pBuffer, |
uint32_t | Size | ||
) |
Starts playing audio stream from a data buffer for a determined size.
pBuffer | Pointer to the buffer |
Size | Number of audio data BYTES. |
AUDIO_OK | if correct communication, else wrong communication |
Definition at line 295 of file stm32469i_discovery_audio.c.
uint8_t BSP_AUDIO_OUT_Resume | ( | void | ) |
This function Resumes the audio file stream. WARNING: 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 behavior).
Resumes the audio file streaming.
WARNING: 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 behavior).
AUDIO_OK | if correct communication, else wrong communication |
Definition at line 366 of file stm32469i_discovery_audio.c.
void BSP_AUDIO_OUT_SetAudioFrameSlot | ( | uint32_t | AudioFrameSlot | ) |
Updates the Audio frame slot configuration.
AudioFrameSlot | specifies the audio Frame slot This parameter can be any value of STM32469I Discovery Audio Slot TDM mode |
Definition at line 576 of file stm32469i_discovery_audio.c.
void BSP_AUDIO_OUT_SetFrequency | ( | uint32_t | AudioFreq | ) |
Updates the audio frequency.
Update the audio frequency.
AudioFreq | Audio frequency used to play the audio stream. |
Definition at line 493 of file stm32469i_discovery_audio.c.
uint8_t BSP_AUDIO_OUT_SetMute | ( | uint32_t | Cmd | ) |
Enables or disables the MUTE mode by software.
Cmd | Could be AUDIO_MUTE_ON to mute sound or AUDIO_MUTE_OFF to unmute the codec and restore previous volume level. |
AUDIO_OK | if correct communication, else wrong communication |
Definition at line 452 of file stm32469i_discovery_audio.c.
uint8_t BSP_AUDIO_OUT_SetOutputMode | ( | uint8_t | Output | ) |
Switch dynamically (while audio file is being played) the output target (speaker or headphone).
Switch dynamically (while audio file is played) the output target (speaker or headphone).
Output | The audio output target: OUTPUT_DEVICE_SPEAKER, OUTPUT_DEVICE_HEADPHONE or OUTPUT_DEVICE_BOTH |
AUDIO_OK | if correct communication, else wrong communication |
Definition at line 473 of file stm32469i_discovery_audio.c.
uint8_t BSP_AUDIO_OUT_SetVolume | ( | uint8_t | Volume | ) |
Controls the current audio volume level.
Volume | Volume level to be set in percentage from 0% to 100% (0 for Mute and 100 for Max volume level). |
AUDIO_OK | if correct communication, else wrong communication |
Definition at line 432 of file stm32469i_discovery_audio.c.
uint8_t BSP_AUDIO_OUT_Stop | ( | uint32_t | Option | ) |
Stops audio playing and Power down the Audio Codec.
Option | could be one of the following parameters
|
AUDIO_OK | if correct communication, else wrong communication |
Definition at line 398 of file stm32469i_discovery_audio.c.
__weak void BSP_AUDIO_OUT_TransferComplete_CallBack | ( | void | ) |
Manages the DMA full Transfer complete event.
Definition at line 636 of file stm32469i_discovery_audio.c.
void HAL_SAI_ErrorCallback | ( | SAI_HandleTypeDef * | hsai | ) |
SAI error callbacks.
hsai | SAI handle |
Definition at line 628 of file stm32469i_discovery_audio.c.
void HAL_SAI_TxCpltCallback | ( | SAI_HandleTypeDef * | hsai | ) |
Tx Transfer completed callbacks.
hsai | SAI handle |
Definition at line 606 of file stm32469i_discovery_audio.c.
void HAL_SAI_TxHalfCpltCallback | ( | SAI_HandleTypeDef * | hsai | ) |
Tx Half Transfer completed callbacks.
hsai | SAI handle |
Definition at line 617 of file stm32469i_discovery_audio.c.
|
static |
Initializes the Audio Codec audio interface (SAI).
AudioFreq | Audio frequency to be configured for the SAI peripheral. |
Definition at line 828 of file stm32469i_discovery_audio.c.