STM32F723E-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_InitEx (uint16_t InputDevice, uint32_t AudioFreq, uint32_t BitRes, uint32_t ChnlNbr) |
Initializes wave recording. | |
uint8_t | BSP_AUDIO_IN_OUT_Init (uint16_t InputDevice, uint16_t OutputDevice, uint32_t AudioFreq, uint32_t BitRes, uint32_t ChnlNbr) |
Initializes wave recording and playback in parallel. | |
uint8_t | BSP_AUDIO_IN_Record (uint16_t *pbuf, uint32_t size) |
Starts audio recording. | |
uint8_t | BSP_AUDIO_IN_Stop (uint32_t Option) |
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. | |
void | HAL_SAI_RxCpltCallback (SAI_HandleTypeDef *hsai) |
Rx Transfer completed callbacks. | |
void | HAL_SAI_RxHalfCpltCallback (SAI_HandleTypeDef *hsai) |
Rx Half Transfer completed 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 (SAI_HandleTypeDef *hsai, void *Params) |
Initializes BSP_AUDIO_IN MSP. | |
__weak void | BSP_AUDIO_IN_MspDeInit (SAI_HandleTypeDef *hsai, void *Params) |
DeInitializes BSP_AUDIO_IN MSP. | |
__weak void | BSP_AUDIO_IN_ClockConfig (SAI_HandleTypeDef *hsai, uint32_t AudioFreq, void *Params) |
Clock Config. | |
static void | SAIx_In_Init (uint32_t SaiOutMode, uint32_t SlotActive, uint32_t AudioFreq) |
Initializes the input Audio Codec audio interface (SAI). | |
static void | SAIx_In_DeInit (void) |
Deinitializes the output Audio Codec audio interface (SAI). |
Function Documentation
__weak void BSP_AUDIO_IN_ClockConfig | ( | SAI_HandleTypeDef * | hsai, |
uint32_t | AudioFreq, | ||
void * | Params | ||
) |
Clock Config.
- Parameters:
-
hsai,: might be required to set audio peripheral predivider if any. AudioFreq,: Audio frequency used to play the audio stream. Params
- Note:
- This API is called by BSP_AUDIO_IN_Init() Being __weak it can be overwritten by the application
- Return values:
-
None
Definition at line 1247 of file stm32f723e_discovery_audio.c.
Referenced by BSP_AUDIO_IN_InitEx().
void BSP_AUDIO_IN_DeInit | ( | void | ) |
Deinit the audio IN peripherals.
- Return values:
-
None
Definition at line 1070 of file stm32f723e_discovery_audio.c.
References BSP_AUDIO_IN_MspDeInit(), haudio_in_sai, and SAIx_In_DeInit().
__weak void BSP_AUDIO_IN_Error_CallBack | ( | void | ) |
Audio IN Error callback function.
- Return values:
-
None
Definition at line 1126 of file stm32f723e_discovery_audio.c.
__weak void BSP_AUDIO_IN_HalfTransfer_CallBack | ( | void | ) |
Manages the DMA Half Transfer complete event.
- Return values:
-
None
Definition at line 1115 of file stm32f723e_discovery_audio.c.
Referenced by HAL_SAI_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 SAI peripheral. BitRes,: Audio frequency to be configured. ChnlNbr,: Channel number.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 787 of file stm32f723e_discovery_audio.c.
References BSP_AUDIO_IN_InitEx().
uint8_t BSP_AUDIO_IN_InitEx | ( | uint16_t | InputDevice, |
uint32_t | AudioFreq, | ||
uint32_t | BitRes, | ||
uint32_t | ChnlNbr | ||
) |
Initializes wave recording.
- Parameters:
-
InputDevice,: INPUT_DEVICE_DIGITAL_MICROPHONE_1, INPUT_DEVICE_DIGITAL_MICROPHONE_2 INPUT_DEVICE_INPUT_LINE_1 or INPUT_DEVICE_DIGITAL_MIC1_MIC2 AudioFreq,: Audio frequency to be configured for the SAI peripheral. BitRes,: Audio frequency to be configured. ChnlNbr,: Channel number.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 801 of file stm32f723e_discovery_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_IN_SAIx, AUDIO_OK, BSP_AUDIO_IN_ClockConfig(), BSP_AUDIO_IN_MspInit(), BSP_AUDIO_OUT_MspInit(), CODEC_AUDIOFRAME_SLOT_0123, CODEC_AUDIOFRAME_SLOT_02, CODEC_AUDIOFRAME_SLOT_13, haudio_in_sai, SAIx_In_DeInit(), and SAIx_In_Init().
Referenced by BSP_AUDIO_IN_Init().
__weak void BSP_AUDIO_IN_MspDeInit | ( | SAI_HandleTypeDef * | hsai, |
void * | Params | ||
) |
DeInitializes BSP_AUDIO_IN MSP.
- Parameters:
-
hsai,: SAI handle Params
- Return values:
-
None
Definition at line 1211 of file stm32f723e_discovery_audio.c.
References AUDIO_IN_SAIx, AUDIO_IN_SAIx_CLK_DISABLE, AUDIO_IN_SAIx_DMAx_IRQ, AUDIO_IN_SAIx_SD_GPIO_PORT, AUDIO_IN_SAIx_SD_PIN, and haudio_in_sai.
Referenced by BSP_AUDIO_IN_DeInit().
__weak void BSP_AUDIO_IN_MspInit | ( | SAI_HandleTypeDef * | hsai, |
void * | Params | ||
) |
Initializes BSP_AUDIO_IN MSP.
- Parameters:
-
hsai,: SAI handle Params
- Return values:
-
None
Definition at line 1138 of file stm32f723e_discovery_audio.c.
References AUDIO_IN_INT_GPIO_ENABLE, AUDIO_IN_INT_GPIO_PIN, AUDIO_IN_INT_GPIO_PORT, AUDIO_IN_INT_IRQ, AUDIO_IN_IRQ_PREPRIO, AUDIO_IN_SAIx, AUDIO_IN_SAIx_CLK_ENABLE, AUDIO_IN_SAIx_DMAx_CHANNEL, AUDIO_IN_SAIx_DMAx_CLK_ENABLE, AUDIO_IN_SAIx_DMAx_IRQ, AUDIO_IN_SAIx_DMAx_MEM_DATA_SIZE, AUDIO_IN_SAIx_DMAx_PERIPH_DATA_SIZE, AUDIO_IN_SAIx_DMAx_STREAM, AUDIO_IN_SAIx_SD_AF, AUDIO_IN_SAIx_SD_ENABLE, AUDIO_IN_SAIx_SD_GPIO_PORT, and AUDIO_IN_SAIx_SD_PIN.
Referenced by BSP_AUDIO_IN_InitEx(), and BSP_AUDIO_IN_OUT_Init().
uint8_t BSP_AUDIO_IN_OUT_Init | ( | uint16_t | InputDevice, |
uint16_t | OutputDevice, | ||
uint32_t | AudioFreq, | ||
uint32_t | BitRes, | ||
uint32_t | ChnlNbr | ||
) |
Initializes wave recording and playback in parallel.
- Parameters:
-
InputDevice,: INPUT_DEVICE_DIGITAL_MICROPHONE_1, INPUT_DEVICE_DIGITAL_MICROPHONE_2 or INPUT_DEVICE_DIGITAL_MIC1_MIC2 OutputDevice,: OUTPUT_DEVICE_SPEAKER, OUTPUT_DEVICE_HEADPHONE, or OUTPUT_DEVICE_BOTH. AudioFreq,: Audio frequency to be configured for the SAI peripheral. BitRes,: Audio frequency to be configured. ChnlNbr,: Channel number.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 887 of file stm32f723e_discovery_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_IN_SAIx, AUDIO_OK, AUDIO_OUT_SAIx, BSP_AUDIO_IN_MspInit(), BSP_AUDIO_OUT_ClockConfig(), BSP_AUDIO_OUT_MspInit(), CODEC_AUDIOFRAME_SLOT_0123, CODEC_AUDIOFRAME_SLOT_02, CODEC_AUDIOFRAME_SLOT_13, haudio_in_sai, haudio_out_sai, SAIx_In_DeInit(), SAIx_In_Init(), and SAIx_Out_DeInit().
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 1025 of file stm32f723e_discovery_audio.c.
References AUDIO_OK, and haudio_in_sai.
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,: size of the recorded buffer in number of elements (typically number of half-words) Be careful that it is not the same unit than BSP_AUDIO_OUT_Play function
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 976 of file stm32f723e_discovery_audio.c.
References AUDIO_ERROR, AUDIO_OK, and haudio_in_sai.
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 1037 of file stm32f723e_discovery_audio.c.
References AUDIO_OK, and haudio_in_sai.
uint8_t BSP_AUDIO_IN_SetVolume | ( | uint8_t | Volume | ) |
Controls the audio in volume level.
- Parameters:
-
Volume,: Volume level in range 0(Mute)..80(+0dB)..100(+17.625dB)
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 1050 of file stm32f723e_discovery_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, and AudioInVolume.
uint8_t BSP_AUDIO_IN_Stop | ( | uint32_t | Option | ) |
Stops audio recording.
- Parameters:
-
Option,: could be one of the following parameters - CODEC_PDWN_SW: for software power off (by writing registers). Then no need to reconfigure the Codec after power on.
- CODEC_PDWN_HW: completely shut down the codec (physically). Then need to reconfigure the Codec after power on.
- Return values:
-
AUDIO_OK if correct communication, else wrong communication
Definition at line 999 of file stm32f723e_discovery_audio.c.
References audio_drv, AUDIO_ERROR, AUDIO_I2C_ADDRESS, AUDIO_OK, and haudio_in_sai.
__weak void BSP_AUDIO_IN_TransferComplete_CallBack | ( | void | ) |
User callback when record buffer is filled.
- Return values:
-
None
Definition at line 1104 of file stm32f723e_discovery_audio.c.
Referenced by HAL_SAI_RxCpltCallback().
void HAL_SAI_RxCpltCallback | ( | SAI_HandleTypeDef * | hsai | ) |
Rx Transfer completed callbacks.
- Parameters:
-
hsai,: SAI handle
- Return values:
-
None
Definition at line 1082 of file stm32f723e_discovery_audio.c.
References BSP_AUDIO_IN_TransferComplete_CallBack().
void HAL_SAI_RxHalfCpltCallback | ( | SAI_HandleTypeDef * | hsai | ) |
Rx Half Transfer completed callbacks.
- Parameters:
-
hsai,: SAI handle
- Return values:
-
None
Definition at line 1093 of file stm32f723e_discovery_audio.c.
References BSP_AUDIO_IN_HalfTransfer_CallBack().
static void SAIx_In_DeInit | ( | void | ) | [static] |
Deinitializes the output Audio Codec audio interface (SAI).
- Return values:
-
None
Definition at line 1410 of file stm32f723e_discovery_audio.c.
References AUDIO_IN_SAIx, and haudio_in_sai.
Referenced by BSP_AUDIO_IN_DeInit(), BSP_AUDIO_IN_InitEx(), and BSP_AUDIO_IN_OUT_Init().
static void SAIx_In_Init | ( | uint32_t | SaiOutMode, |
uint32_t | SlotActive, | ||
uint32_t | AudioFreq | ||
) | [static] |
Initializes the input Audio Codec audio interface (SAI).
- Parameters:
-
SaiOutMode,: SAI_MODEMASTER_TX (for record and playback in parallel) or SAI_MODEMASTER_RX (for record only). SlotActive,: CODEC_AUDIOFRAME_SLOT_02, CODEC_AUDIOFRAME_SLOT_13 or CODEC_AUDIOFRAME_SLOT_0123 AudioFreq,: Audio frequency to be configured for the SAI peripheral.
- Return values:
-
None
Definition at line 1296 of file stm32f723e_discovery_audio.c.
References AUDIO_IN_SAIx, AUDIO_OUT_SAIx, haudio_in_sai, and haudio_out_sai.
Referenced by BSP_AUDIO_IN_InitEx(), and BSP_AUDIO_IN_OUT_Init().
Generated on Mon Jan 2 2017 09:52:50 for STM32F723E-Discovery BSP User Manual by 1.7.6.1