STM32F469I-Discovery BSP User Manual: STM32469I Discovery AUDIO IN Private functions

STM32F469I-Discovery BSP Drivers

STM32F469I-Discovery BSP User Manual
STM32469I Discovery AUDIO IN Private 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 *pbuf, 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 HAL_I2S_RxCpltCallback (I2S_HandleTypeDef *hi2s)
 Rx Transfer completed callbacks.
void HAL_I2S_RxHalfCpltCallback (I2S_HandleTypeDef *hi2s)
 Rx Half Transfer completed callbacks.
void HAL_I2S_ErrorCallback (I2S_HandleTypeDef *hi2s)
 I2S error callbacks.
__weak void BSP_AUDIO_IN_TransferComplete_CallBack (void)
 User callback when record buffer is filled.
__weak void BSP_AUDIO_IN_HalfTransfer_CallBack (void)
 Manages the DMA Half Transfer complete event.
__weak void BSP_AUDIO_IN_Error_Callback (void)
 Audio IN Error callback function.
__weak void BSP_AUDIO_IN_MspInit (I2S_HandleTypeDef *hi2s, void *Params)
 BSP AUDIO IN MSP Init.
__weak void BSP_AUDIO_IN_MspDeInit (I2S_HandleTypeDef *hi2s, void *Params)
 DeInitializes BSP_AUDIO_IN MSP.
static void PDMDecoder_Init (uint32_t AudioFreq, uint32_t ChnlNbr)
 Initializes the PDM library.
static void I2Sx_Init (uint32_t AudioFreq)
 Initializes the Audio Codec audio interface (I2S)
static void TIMx_IC_MspInit (TIM_HandleTypeDef *htim)
 Initializes the TIM INput Capture MSP.
static void TIMx_IC_MspDeInit (TIM_HandleTypeDef *htim)
 Initializes the TIM INput Capture MSP.
static void TIMx_Init (void)
 Configure TIM as a clock divider by 2.
static void TIMx_DeInit (void)
 Configure TIM as a clock divider by 2.

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().

__weak 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().

__weak void BSP_AUDIO_IN_HalfTransfer_CallBack ( void  )

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().

__weak 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().

void HAL_I2S_ErrorCallback ( I2S_HandleTypeDef *  hi2s)

I2S error callbacks.

Parameters:
hi2s,:I2S handle

Definition at line 1122 of file stm32469i_discovery_audio.c.

References BSP_AUDIO_IN_Error_Callback().

void HAL_I2S_RxCpltCallback ( I2S_HandleTypeDef *  hi2s)

Rx Transfer completed callbacks.

Parameters:
hi2s,:I2S handle

Definition at line 1101 of file stm32469i_discovery_audio.c.

References BSP_AUDIO_IN_TransferComplete_CallBack().

void HAL_I2S_RxHalfCpltCallback ( I2S_HandleTypeDef *  hi2s)

Rx Half Transfer completed callbacks.

Parameters:
hi2s,:I2S handle

Definition at line 1111 of file stm32469i_discovery_audio.c.

References BSP_AUDIO_IN_HalfTransfer_CallBack().

static void I2Sx_Init ( uint32_t  AudioFreq) [static]

Initializes the Audio Codec audio interface (I2S)

Note:
This function assumes that the I2S input clock (through dedicated PLLI2S_R) is already configured and ready to be used.
Parameters:
AudioFreq,:Audio frequency to be configured for the I2S peripheral.

Definition at line 1305 of file stm32469i_discovery_audio.c.

References AUDIO_I2Sx, and haudio_in_i2s.

Referenced by BSP_AUDIO_IN_Init().

static void PDMDecoder_Init ( uint32_t  AudioFreq,
uint32_t  ChnlNbr 
) [static]

Initializes the PDM library.

Parameters:
AudioFreq,:Audio sampling frequency
ChnlNbr,:Number of audio channels (1: mono; 2: stereo)

Definition at line 1280 of file stm32469i_discovery_audio.c.

References Filter.

Referenced by BSP_AUDIO_IN_Init().

static void TIMx_DeInit ( void  ) [static]

Configure TIM as a clock divider by 2.

I2S_SCK is externally connected to TIMx input channel

Definition at line 1466 of file stm32469i_discovery_audio.c.

References AUDIO_TIMx, AUDIO_TIMx_IN_CHANNEL, AUDIO_TIMx_OUT_CHANNEL, haudio_tim, and TIMx_IC_MspDeInit().

Referenced by BSP_AUDIO_IN_DeInit().

static void TIMx_IC_MspDeInit ( TIM_HandleTypeDef *  htim) [static]

Initializes the TIM INput Capture MSP.

Parameters:
htim,:TIM handle

Definition at line 1381 of file stm32469i_discovery_audio.c.

References AUDIO_TIMx_CLK_DISABLE.

Referenced by TIMx_DeInit().

static void TIMx_IC_MspInit ( TIM_HandleTypeDef *  htim) [static]

Initializes the TIM INput Capture MSP.

Parameters:
htim,:TIM handle

Definition at line 1350 of file stm32469i_discovery_audio.c.

References AUDIO_TIMx_AF, AUDIO_TIMx_CLK_ENABLE, AUDIO_TIMx_GPIO_CLK_ENABLE, AUDIO_TIMx_GPIO_PORT, AUDIO_TIMx_IN_GPIO_PIN, and AUDIO_TIMx_OUT_GPIO_PIN.

Referenced by TIMx_Init().

static void TIMx_Init ( void  ) [static]

Configure TIM as a clock divider by 2.

I2S_SCK is externally connected to TIMx input channel

Definition at line 1394 of file stm32469i_discovery_audio.c.

References AUDIO_TIMx, AUDIO_TIMx_IN_CHANNEL, AUDIO_TIMx_OUT_CHANNEL, haudio_tim, and TIMx_IC_MspInit().

Referenced by BSP_AUDIO_IN_MspInit().

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