_BSP_User_Manual
|
Functions | |
uint8_t | BSP_AUDIO_OUT_Init (uint16_t OutputDevice, uint8_t Volume, uint32_t AudioFreq) |
Configure 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 I2S 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) |
Update the audio frequency. | |
void | HAL_I2S_TxCpltCallback (I2S_HandleTypeDef *hi2s) |
Tx Transfer completed callbacks. | |
void | HAL_I2S_TxHalfCpltCallback (I2S_HandleTypeDef *hi2s) |
Tx Transfer Half completed callbacks. | |
void | HAL_I2S_ErrorCallback (I2S_HandleTypeDef *hi2s) |
I2S 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. | |
static void | I2SOUT_MspInit (void) |
AUDIO OUT I2S MSP Init. | |
static void | I2SOUT_Init (uint32_t AudioFreq) |
Initializes the Audio Codec audio interface (I2S) | |
static uint8_t | I2SOUT_SendDummyData_Start (uint16_t *pBuffer, uint32_t Size) |
Starts sending dummy data as audio stream: function used to generate I2S master clock MCK for audio codec device. | |
static uint8_t | I2SOUT_SendDummyData_Stop (void) |
Stops sending dummy data as audio stream: function used to stop to generate I2S master clock MCK for audio codec device. |
Function Documentation
void BSP_AUDIO_OUT_ChangeBuffer | ( | uint16_t * | pData, |
uint16_t | Size | ||
) |
Sends n-Bytes on the I2S interface.
Definition at line 301 of file stm3210e_eval_audio.c.
References hAudioOutI2s.
void BSP_AUDIO_OUT_Error_CallBack | ( | void | ) |
Manages the DMA FIFO error event.
Definition at line 534 of file stm3210e_eval_audio.c.
Referenced by HAL_I2S_ErrorCallback().
void BSP_AUDIO_OUT_HalfTransfer_CallBack | ( | void | ) |
Manages the DMA Half Transfer complete event.
Definition at line 526 of file stm3210e_eval_audio.c.
Referenced by HAL_I2S_TxHalfCpltCallback().
uint8_t BSP_AUDIO_OUT_Init | ( | uint16_t | OutputDevice, |
uint8_t | Volume, | ||
uint32_t | AudioFreq | ||
) |
Configure the audio peripherals.
Definition at line 212 of file stm3210e_eval_audio.c.
References AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, audio_sample_SendDummyData, AUDIO_SAMPLE_SENDDUMMYDATA_SIZE, hAudioOutI2s, I2SOUT_Init(), I2SOUT_SendDummyData_Start(), I2SOUT_SendDummyData_Stop(), pAudioDrv, and SendDummyData.
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.
- 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 behavior).
Definition at line 314 of file stm3210e_eval_audio.c.
References AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, hAudioOutI2s, and pAudioDrv.
uint8_t BSP_AUDIO_OUT_Play | ( | uint16_t * | pBuffer, |
uint32_t | Size | ||
) |
Starts playing audio stream from a data buffer for a determined size.
Definition at line 279 of file stm3210e_eval_audio.c.
References AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, DMA_MAX, hAudioOutI2s, and pAudioDrv.
uint8_t BSP_AUDIO_OUT_Resume | ( | void | ) |
This function Resumes 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 behavior).
Definition at line 338 of file stm3210e_eval_audio.c.
References AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, hAudioOutI2s, and pAudioDrv.
void BSP_AUDIO_OUT_SetFrequency | ( | uint32_t | AudioFreq | ) |
Update the audio frequency.
- Note:
- This API should be called after the BSP_AUDIO_OUT_Init() to adjust the audio frequency.
Definition at line 455 of file stm3210e_eval_audio.c.
References I2SOUT_Init().
uint8_t BSP_AUDIO_OUT_SetMute | ( | uint32_t | Cmd | ) |
Enables or disables the MUTE mode by software.
Definition at line 413 of file stm3210e_eval_audio.c.
References AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, and pAudioDrv.
uint8_t BSP_AUDIO_OUT_SetOutputMode | ( | uint8_t | Output | ) |
Switch dynamically (while audio file is played) the output target (speaker or headphone).
Definition at line 434 of file stm3210e_eval_audio.c.
References AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, and pAudioDrv.
uint8_t BSP_AUDIO_OUT_SetVolume | ( | uint8_t | Volume | ) |
Controls the current audio volume level.
Definition at line 393 of file stm3210e_eval_audio.c.
References AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, and pAudioDrv.
uint8_t BSP_AUDIO_OUT_Stop | ( | uint32_t | Option | ) |
Stops audio playing and Power down the Audio Codec.
Definition at line 361 of file stm3210e_eval_audio.c.
References AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, AUDIO_RESET_GPIO, AUDIO_RESET_PIN, hAudioOutI2s, and pAudioDrv.
void BSP_AUDIO_OUT_TransferComplete_CallBack | ( | void | ) |
Manages the DMA full Transfer complete event.
Definition at line 518 of file stm3210e_eval_audio.c.
Referenced by HAL_I2S_TxCpltCallback().
void HAL_I2S_ErrorCallback | ( | I2S_HandleTypeDef * | hi2s | ) |
I2S error callbacks.
Definition at line 504 of file stm3210e_eval_audio.c.
References BSP_AUDIO_OUT_Error_CallBack(), and I2SOUT.
void HAL_I2S_TxCpltCallback | ( | I2S_HandleTypeDef * | hi2s | ) |
Tx Transfer completed callbacks.
Definition at line 466 of file stm3210e_eval_audio.c.
References BSP_AUDIO_OUT_TransferComplete_CallBack(), I2SOUT, and SendDummyData.
void HAL_I2S_TxHalfCpltCallback | ( | I2S_HandleTypeDef * | hi2s | ) |
Tx Transfer Half completed callbacks.
Definition at line 489 of file stm3210e_eval_audio.c.
References BSP_AUDIO_OUT_HalfTransfer_CallBack(), and I2SOUT.
static void I2SOUT_Init | ( | uint32_t | AudioFreq | ) | [static] |
Initializes the Audio Codec audio interface (I2S)
Definition at line 618 of file stm3210e_eval_audio.c.
References hAudioOutI2s, I2SOUT, and I2SOUT_MspInit().
Referenced by BSP_AUDIO_OUT_Init(), and BSP_AUDIO_OUT_SetFrequency().
static void I2SOUT_MspInit | ( | void | ) | [static] |
AUDIO OUT I2S MSP Init.
Definition at line 546 of file stm3210e_eval_audio.c.
References AUDIO_OUT_IRQ_PREPRIO, hAudioOutI2s, I2SOUT, I2SOUT_CLK_ENABLE, I2SOUT_DMAx_CHANNEL, I2SOUT_DMAx_CLK_ENABLE, I2SOUT_DMAx_IRQ, I2SOUT_DMAx_MEM_DATA_SIZE, I2SOUT_DMAx_PERIPH_DATA_SIZE, I2SOUT_MCK_CLK_ENABLE, I2SOUT_MCK_GPIO_PORT, I2SOUT_MCK_PIN, I2SOUT_SCK_PIN, I2SOUT_SCK_SD_CLK_ENABLE, I2SOUT_SCK_SD_GPIO_PORT, I2SOUT_SD_PIN, I2SOUT_WS_CLK_ENABLE, I2SOUT_WS_GPIO_PORT, I2SOUT_WS_PIN, and SendDummyData.
Referenced by I2SOUT_Init().
static uint8_t I2SOUT_SendDummyData_Start | ( | uint16_t * | pBuffer, |
uint32_t | Size | ||
) | [static] |
Starts sending dummy data as audio stream: function used to generate I2S master clock MCK for audio codec device.
Definition at line 652 of file stm3210e_eval_audio.c.
References AUDIO_OK, DMA_MAX, and hAudioOutI2s.
Referenced by BSP_AUDIO_OUT_Init().
static uint8_t I2SOUT_SendDummyData_Stop | ( | void | ) | [static] |
Stops sending dummy data as audio stream: function used to stop to generate I2S master clock MCK for audio codec device.
Definition at line 666 of file stm3210e_eval_audio.c.
References AUDIO_OK, and hAudioOutI2s.
Referenced by BSP_AUDIO_OUT_Init().
Generated on Thu Dec 11 2014 16:16:37 for _BSP_User_Manual by 1.7.5.1