• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2   ******************************************************************************
3   * @file    stm32mp1xx_hal_sai_ex.h
4   * @author  MCD Application Team
5   * @brief   Header file of SAI HAL extended module.
6   ******************************************************************************
7   * @attention
8   *
9   * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
10   * All rights reserved.</center></h2>
11   *
12   * This software component is licensed by ST under BSD 3-Clause license,
13   * the "License"; You may not use this file except in compliance with the
14   * License. You may obtain a copy of the License at:
15   *                        opensource.org/licenses/BSD-3-Clause
16   *
17   ******************************************************************************
18   */
19 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32MP1xx_HAL_SAI_EX_H
22 #define STM32MP1xx_HAL_SAI_EX_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32mp1xx_hal_def.h"
30 
31 /** @addtogroup STM32MP1xx_HAL_Driver
32   * @{
33   */
34 
35 /** @addtogroup SAIEx
36   * @{
37   */
38 
39 /* Exported types ------------------------------------------------------------*/
40 /** @defgroup SAIEx_Exported_Types SAIEx Exported Types
41   * @{
42   */
43 
44 /**
45   * @brief  PDM microphone delay structure definition
46   */
47 typedef struct
48 {
49   uint32_t MicPair;     /*!< Specifies which pair of microphones is selected.
50                              This parameter must be a number between Min_Data = 1 and Max_Data = 3. */
51 
52   uint32_t LeftDelay;   /*!< Specifies the delay in PDM clock unit to apply on left microphone.
53                              This parameter must be a number between Min_Data = 0 and Max_Data = 7. */
54 
55   uint32_t RightDelay;  /*!< Specifies the delay in PDM clock unit to apply on right microphone.
56                              This parameter must be a number between Min_Data = 0 and Max_Data = 7. */
57 } SAIEx_PdmMicDelayParamTypeDef;
58 
59 /**
60   * @}
61   */
62 
63 /* Exported constants --------------------------------------------------------*/
64 /* Exported macros -----------------------------------------------------------*/
65 /* Exported functions --------------------------------------------------------*/
66 /** @addtogroup SAIEx_Exported_Functions SAIEx Extended Exported Functions
67   * @{
68   */
69 
70 /** @addtogroup SAIEx_Exported_Functions_Group1 Peripheral Control functions
71   * @{
72   */
73 HAL_StatusTypeDef HAL_SAIEx_ConfigPdmMicDelay(SAI_HandleTypeDef *hsai, 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 
95 /**
96   * @}
97   */
98 
99 #ifdef __cplusplus
100 }
101 #endif
102 
103 #endif /* STM32MP1xx_HAL_SAI_EX_H */
104 
105 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
106