1 /** 2 ****************************************************************************** 3 * @file stm32wbxx_hal_sai_ex.h 4 * @author MCD Application Team 5 * @brief Header file of SAI HAL extended module. 6 ****************************************************************************** 7 * @attention 8 * 9 * Copyright (c) 2019 STMicroelectronics. 10 * All rights reserved. 11 * 12 * This software is licensed under terms that can be found in the LICENSE file 13 * in the root directory of this software component. 14 * If no LICENSE file comes with this software, it is provided AS-IS. 15 * 16 ****************************************************************************** 17 */ 18 19 /* Define to prevent recursive inclusion -------------------------------------*/ 20 #ifndef STM32WBxx_HAL_SAI_EX_H 21 #define STM32WBxx_HAL_SAI_EX_H 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 /* Includes ------------------------------------------------------------------*/ 28 #include "stm32wbxx_hal_def.h" 29 30 /** @addtogroup STM32WBxx_HAL_Driver 31 * @{ 32 */ 33 34 #if defined (SAI1) 35 36 /** @addtogroup SAIEx 37 * @{ 38 */ 39 40 /* Exported types ------------------------------------------------------------*/ 41 /** @defgroup SAIEx_Exported_Types SAIEx Exported Types 42 * @{ 43 */ 44 45 /** 46 * @brief PDM microphone delay structure definition 47 */ 48 typedef struct 49 { 50 uint32_t MicPair; /*!< Specifies which pair of microphones is selected. 51 This parameter must be a number between Min_Data = 1 and Max_Data = 3. */ 52 53 uint32_t LeftDelay; /*!< Specifies the delay in PDM clock unit to apply on left microphone. 54 This parameter must be a number between Min_Data = 0 and Max_Data = 7. */ 55 56 uint32_t RightDelay; /*!< Specifies the delay in PDM clock unit to apply on right microphone. 57 This parameter must be a number between Min_Data = 0 and Max_Data = 7. */ 58 } SAIEx_PdmMicDelayParamTypeDef; 59 60 /** 61 * @} 62 */ 63 64 /* Exported constants --------------------------------------------------------*/ 65 /* Exported macros -----------------------------------------------------------*/ 66 /* Exported functions --------------------------------------------------------*/ 67 /** @addtogroup SAIEx_Exported_Functions SAIEx Extended Exported Functions 68 * @{ 69 */ 70 71 /** @addtogroup SAIEx_Exported_Functions_Group1 Peripheral Control functions 72 * @{ 73 */ 74 HAL_StatusTypeDef HAL_SAIEx_ConfigPdmMicDelay(const SAI_HandleTypeDef *hsai, 75 const SAIEx_PdmMicDelayParamTypeDef *pdmMicDelay); 76 /** 77 * @} 78 */ 79 80 /** 81 * @} 82 */ 83 84 /* Private macros ------------------------------------------------------------*/ 85 /** @addtogroup SAIEx_Private_Macros SAIEx Extended Private Macros 86 * @{ 87 */ 88 #define IS_SAI_PDM_MIC_DELAY(VALUE) ((VALUE) <= 7U) 89 /** 90 * @} 91 */ 92 93 /** 94 * @} 95 */ 96 97 #endif /* SAI1 */ 98 99 /** 100 * @} 101 */ 102 #ifdef __cplusplus 103 } 104 #endif 105 106 #endif /* STM32WBxx_HAL_SAI_EX_H */ 107