1 /** 2 ****************************************************************************** 3 * @file stm32wbaxx_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) 2022 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 STM32WBAxx_HAL_SAI_EX_H 21 #define STM32WBAxx_HAL_SAI_EX_H 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 /* Includes ------------------------------------------------------------------*/ 28 #include "stm32wbaxx_hal_def.h" 29 30 /** @addtogroup STM32WBAxx_HAL_Driver 31 * @{ 32 */ 33 #if defined (SAI1) 34 /** @addtogroup SAIEx 35 * @{ 36 */ 37 38 /* Exported types ------------------------------------------------------------*/ 39 /** @defgroup SAIEx_Exported_Types SAIEx Exported Types 40 * @{ 41 */ 42 43 /** 44 * @brief PDM microphone delay structure definition 45 */ 46 typedef struct 47 { 48 uint32_t MicPair; /*!< Specifies which pair of microphones is selected. 49 This parameter must be a number between Min_Data = 1 and Max_Data = 2. */ 50 51 uint32_t LeftDelay; /*!< Specifies the delay in PDM clock unit to apply on left microphone. 52 This parameter must be a number between Min_Data = 0 and Max_Data = 7. */ 53 54 uint32_t RightDelay; /*!< Specifies the delay in PDM clock unit to apply on right microphone. 55 This parameter must be a number between Min_Data = 0 and Max_Data = 7. */ 56 } SAIEx_PdmMicDelayParamTypeDef; 57 58 /** 59 * @} 60 */ 61 62 /* Exported constants --------------------------------------------------------*/ 63 /* Exported macros -----------------------------------------------------------*/ 64 /* Exported functions --------------------------------------------------------*/ 65 /** @addtogroup SAIEx_Exported_Functions SAIEx Extended Exported Functions 66 * @{ 67 */ 68 69 /** @addtogroup SAIEx_Exported_Functions_Group1 Peripheral Control functions 70 * @{ 71 */ 72 HAL_StatusTypeDef HAL_SAIEx_ConfigPdmMicDelay(const SAI_HandleTypeDef *hsai, 73 const SAIEx_PdmMicDelayParamTypeDef *pdmMicDelay); 74 /** 75 * @} 76 */ 77 78 /** 79 * @} 80 */ 81 82 /* Private macros ------------------------------------------------------------*/ 83 /** @addtogroup SAIEx_Private_Macros SAIEx Extended Private Macros 84 * @{ 85 */ 86 #define IS_SAI_PDM_MIC_DELAY(VALUE) ((VALUE) <= 7U) 87 /** 88 * @} 89 */ 90 91 /** 92 * @} 93 */ 94 #endif /* SAI1 */ 95 /** 96 * @} 97 */ 98 99 #ifdef __cplusplus 100 } 101 #endif 102 103 #endif /* STM32WBAxx_HAL_SAI_EX_H */ 104 105