STM32F411E-Discovery BSP User Manual
|
Functions | |
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 *pData, 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. | |
uint8_t | BSP_AUDIO_IN_PDMToPCM (uint16_t *PDMBuf, uint16_t *PCMBuf) |
Converts audio format from PDM to PCM. | |
void | BSP_AUDIO_IN_TransferComplete_CallBack (void) |
User callback when record buffer is filled. | |
void | BSP_AUDIO_IN_HalfTransfer_CallBack (void) |
Manages the DMA Half Transfer complete event. | |
void | BSP_AUDIO_IN_Error_Callback (void) |
Audio IN Error callback function. | |
void | BSP_AUDIO_IN_ClockConfig (I2S_HandleTypeDef *hi2s, uint32_t AudioFreq, void *Params) |
Audio In Clock Config. | |
void | BSP_AUDIO_IN_MspInit (I2S_HandleTypeDef *hi2s, void *Params) |
BSP AUDIO IN MSP Init. | |
void | BSP_AUDIO_IN_MspDeInit (I2S_HandleTypeDef *hi2s, void *Params) |
DeInitializes BSP_AUDIO_IN MSP. |
Function Documentation
void BSP_AUDIO_IN_ClockConfig | ( | I2S_HandleTypeDef * | hi2s, |
uint32_t | AudioFreq, | ||
void * | Params | ||
) |
Audio In Clock Config.
- Parameters:
-
hi2s,: I2S handle AudioFreq,: Audio frequency used to record the audio stream. Params : pointer on additional configuration parameters, can be NULL.
- Note:
- This API is called by BSP_AUDIO_IN_Init() Being __weak it can be overwritten by the application
Definition at line 891 of file stm32f411e_discovery_audio.c.
Referenced by BSP_AUDIO_IN_Init().
void BSP_AUDIO_IN_Error_Callback | ( | void | ) |
Audio IN Error callback function.
Definition at line 1045 of file stm32f411e_discovery_audio.c.
Referenced by HAL_I2S_ErrorCallback().
void BSP_AUDIO_IN_HalfTransfer_CallBack | ( | void | ) |
Manages the DMA Half Transfer complete event.
Definition at line 1035 of file stm32f411e_discovery_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.
- Parameters:
-
AudioFreq,: Audio frequency to be configured for the I2S peripheral. BitRes,: Audio Bit resolution. ChnlNbr,: Audio Channel number.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 730 of file stm32f411e_discovery_audio.c.
References AUDIO_OK, BSP_AUDIO_IN_ClockConfig(), BSP_AUDIO_IN_MspInit(), hAudioInI2s, I2S2, I2S2_Init(), and PDMDecoder_Init().
void BSP_AUDIO_IN_MspDeInit | ( | I2S_HandleTypeDef * | hi2s, |
void * | Params | ||
) |
DeInitializes BSP_AUDIO_IN MSP.
- Parameters:
-
hi2s,: I2S handle Params : pointer on additional configuration parameters, can be NULL.
Definition at line 993 of file stm32f411e_discovery_audio.c.
References I2S2, I2S2_CLK_DISABLE, I2S2_DMAx_IRQ, I2S2_MOSI_GPIO_PORT, I2S2_MOSI_PIN, I2S2_SCK_GPIO_PORT, and I2S2_SCK_PIN.
void BSP_AUDIO_IN_MspInit | ( | I2S_HandleTypeDef * | hi2s, |
void * | Params | ||
) |
BSP AUDIO IN MSP Init.
- Parameters:
-
hi2s,: I2S handle Params : pointer on additional configuration parameters, can be NULL.
Definition at line 927 of file stm32f411e_discovery_audio.c.
References AUDIO_IN_IRQ_PREPRIO, I2S2, I2S2_CLK_ENABLE, I2S2_DMAx_CHANNEL, I2S2_DMAx_CLK_ENABLE, I2S2_DMAx_IRQ, I2S2_DMAx_MEM_DATA_SIZE, I2S2_DMAx_PERIPH_DATA_SIZE, I2S2_DMAx_STREAM, I2S2_MOSI_AF, I2S2_MOSI_GPIO_CLK_ENABLE, I2S2_MOSI_GPIO_PORT, I2S2_MOSI_PIN, I2S2_SCK_AF, I2S2_SCK_GPIO_CLK_ENABLE, I2S2_SCK_GPIO_PORT, and I2S2_SCK_PIN.
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 792 of file stm32f411e_discovery_audio.c.
References AUDIO_OK, and hAudioInI2s.
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 835 of file stm32f411e_discovery_audio.c.
References AUDIO_OK, AudioInVolume, DEFAULT_AUDIO_IN_CHANNEL_NBR, Filter, INTERNAL_BUFF_SIZE, and PCM_OUT_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 759 of file stm32f411e_discovery_audio.c.
References AUDIO_ERROR, AUDIO_OK, and hAudioInI2s.
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 805 of file stm32f411e_discovery_audio.c.
References AUDIO_OK, and hAudioInI2s.
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 820 of file stm32f411e_discovery_audio.c.
References AUDIO_OK, and AudioInVolume.
uint8_t BSP_AUDIO_IN_Stop | ( | void | ) |
Stops audio recording.
Definition at line 775 of file stm32f411e_discovery_audio.c.
References AUDIO_ERROR, AUDIO_OK, and hAudioInI2s.
void BSP_AUDIO_IN_TransferComplete_CallBack | ( | void | ) |
User callback when record buffer is filled.
Definition at line 1025 of file stm32f411e_discovery_audio.c.
Referenced by HAL_I2S_RxCpltCallback().
Generated on Fri Jan 20 2017 11:38:17 for STM32F411E-Discovery BSP User Manual by 1.7.6.1