STM32F469I-Discovery BSP User Manual: STM32469I Discovery AUDIO IN Exported Functions

STM32F469I-Discovery BSP Drivers

STM32F469I-Discovery BSP User Manual
STM32469I Discovery AUDIO IN Exported Functions

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.
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 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_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_DeInit ( void  )

Deinit the audio IN peripherals.

Definition at line 1058 of file stm32469i_discovery_audio.c.

References BSP_AUDIO_IN_MspDeInit(), haudio_in_i2s, I2Sx_DeInit(), and TIMx_DeInit().

void BSP_AUDIO_IN_Error_Callback ( void  )

Audio IN Error callback function.

Definition at line 1152 of file stm32469i_discovery_audio.c.

Referenced by HAL_I2S_ErrorCallback().

Manages the DMA Half Transfer complete event.

Definition at line 1142 of file stm32469i_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.

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_OKif correct communication, else wrong communication

Definition at line 946 of file stm32469i_discovery_audio.c.

References AUDIO_I2Sx, AUDIO_OK, BSP_AUDIO_IN_MspInit(), haudio_in_i2s, I2Sx_DeInit(), I2Sx_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 1242 of file stm32469i_discovery_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().

uint8_t BSP_AUDIO_IN_Pause ( void  )

Pauses the audio file stream.

Return values:
AUDIO_OKif correct communication, else wrong communication

Definition at line 1018 of file stm32469i_discovery_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_OKif correct communication, else wrong communication

Definition at line 1072 of file stm32469i_discovery_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_OKif correct communication, else wrong communication

Definition at line 981 of file stm32469i_discovery_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_OKif correct communication, else wrong communication

Definition at line 1031 of file stm32469i_discovery_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_OKif correct communication, else wrong communication

Definition at line 1046 of file stm32469i_discovery_audio.c.

References AUDIO_OK, and AudioInVolume.

uint8_t BSP_AUDIO_IN_Stop ( void  )

Stops audio recording.

Return values:
AUDIO_OKif correct communication, else wrong communication

Definition at line 998 of file stm32469i_discovery_audio.c.

References AUDIO_ERROR, AUDIO_OK, AUDIO_TIMx_CLK_DISABLE, and haudio_in_i2s.

User callback when record buffer is filled.

Definition at line 1132 of file stm32469i_discovery_audio.c.

Referenced by HAL_I2S_RxCpltCallback().

Generated on Wed Jan 13 2016 10:58:46 for STM32F469I-Discovery BSP User Manual by   doxygen 1.7.6.1