STM32H735xx HAL User Manual
stm32h7xx_hal_sai_ex.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32h7xx_hal_sai_ex.h
00004   * @author  MCD Application Team
00005   * @brief   Header file of SAI HAL extended module.
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.
00011   *
00012   * This software is licensed under terms that can be found in the LICENSE file
00013   * in the root directory of this software component.
00014   * If no LICENSE file comes with this software, it is provided AS-IS.
00015   *
00016   ******************************************************************************
00017   */
00018 
00019 /* Define to prevent recursive inclusion -------------------------------------*/
00020 #ifndef STM32H7xx_HAL_SAI_EX_H
00021 #define STM32H7xx_HAL_SAI_EX_H
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026 
00027 /* Includes ------------------------------------------------------------------*/
00028 #include "stm32h7xx_hal_def.h"
00029 
00030 /** @addtogroup STM32H7xx_HAL_Driver
00031   * @{
00032   */
00033 
00034 /** @addtogroup SAIEx
00035   * @{
00036   */
00037 
00038 /* Exported types ------------------------------------------------------------*/
00039 /** @defgroup SAIEx_Exported_Types SAIEx Exported Types
00040   * @{
00041   */
00042 
00043 /**
00044   * @brief  PDM microphone delay structure definition
00045   */
00046 typedef struct
00047 {
00048   uint32_t MicPair;     /*!< Specifies which pair of microphones is selected.
00049                              This parameter must be a number between Min_Data = 1 and Max_Data = 3. */
00050 
00051   uint32_t LeftDelay;   /*!< Specifies the delay in PDM clock unit to apply on left microphone.
00052                              This parameter must be a number between Min_Data = 0 and Max_Data = 7. */
00053 
00054   uint32_t RightDelay;  /*!< Specifies the delay in PDM clock unit to apply on right microphone.
00055                              This parameter must be a number between Min_Data = 0 and Max_Data = 7. */
00056 } SAIEx_PdmMicDelayParamTypeDef;
00057 
00058 /**
00059   * @}
00060   */
00061 
00062 /* Exported constants --------------------------------------------------------*/
00063 /* Exported macros -----------------------------------------------------------*/
00064 /* Exported functions --------------------------------------------------------*/
00065 /** @addtogroup SAIEx_Exported_Functions SAIEx Extended Exported Functions
00066   * @{
00067   */
00068 
00069 /** @addtogroup SAIEx_Exported_Functions_Group1 Peripheral Control functions
00070   * @{
00071   */
00072 HAL_StatusTypeDef HAL_SAIEx_ConfigPdmMicDelay(SAI_HandleTypeDef *hsai, SAIEx_PdmMicDelayParamTypeDef *pdmMicDelay);
00073 /**
00074   * @}
00075   */
00076 
00077 /**
00078   * @}
00079   */
00080 
00081 /* Private macros ------------------------------------------------------------*/
00082 /** @addtogroup SAIEx_Private_Macros SAIEx Extended Private Macros
00083   * @{
00084   */
00085 #define IS_SAI_PDM_MIC_DELAY(VALUE)   ((VALUE) <= 7U)
00086 /**
00087   * @}
00088   */
00089 
00090 /**
00091   * @}
00092   */
00093 
00094 /**
00095   * @}
00096   */
00097 
00098 #ifdef __cplusplus
00099 }
00100 #endif
00101 
00102 #endif /* STM32H7xx_HAL_SAI_EX_H */
00103