You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

106 lines
2.9 KiB

  1. /**
  2. ******************************************************************************
  3. * @file stm32h7xx_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) 2017 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. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef STM32H7xx_HAL_SAI_EX_H
  21. #define STM32H7xx_HAL_SAI_EX_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "stm32h7xx_hal_def.h"
  27. /** @addtogroup STM32H7xx_HAL_Driver
  28. * @{
  29. */
  30. /** @addtogroup SAIEx
  31. * @{
  32. */
  33. /* Exported types ------------------------------------------------------------*/
  34. /** @defgroup SAIEx_Exported_Types SAIEx Exported Types
  35. * @{
  36. */
  37. /**
  38. * @brief PDM microphone delay structure definition
  39. */
  40. typedef struct
  41. {
  42. uint32_t MicPair; /*!< Specifies which pair of microphones is selected.
  43. This parameter must be a number between Min_Data = 1 and Max_Data = 3. */
  44. uint32_t LeftDelay; /*!< Specifies the delay in PDM clock unit to apply on left microphone.
  45. This parameter must be a number between Min_Data = 0 and Max_Data = 7. */
  46. uint32_t RightDelay; /*!< Specifies the delay in PDM clock unit to apply on right microphone.
  47. This parameter must be a number between Min_Data = 0 and Max_Data = 7. */
  48. } SAIEx_PdmMicDelayParamTypeDef;
  49. /**
  50. * @}
  51. */
  52. /* Exported constants --------------------------------------------------------*/
  53. /* Exported macros -----------------------------------------------------------*/
  54. /* Exported functions --------------------------------------------------------*/
  55. /** @addtogroup SAIEx_Exported_Functions SAIEx Extended Exported Functions
  56. * @{
  57. */
  58. /** @addtogroup SAIEx_Exported_Functions_Group1 Peripheral Control functions
  59. * @{
  60. */
  61. HAL_StatusTypeDef HAL_SAIEx_ConfigPdmMicDelay(SAI_HandleTypeDef *hsai, SAIEx_PdmMicDelayParamTypeDef *pdmMicDelay);
  62. /**
  63. * @}
  64. */
  65. /**
  66. * @}
  67. */
  68. /* Private macros ------------------------------------------------------------*/
  69. /** @addtogroup SAIEx_Private_Macros SAIEx Extended Private Macros
  70. * @{
  71. */
  72. #define IS_SAI_PDM_MIC_DELAY(VALUE) ((VALUE) <= 7U)
  73. /**
  74. * @}
  75. */
  76. /**
  77. * @}
  78. */
  79. /**
  80. * @}
  81. */
  82. #ifdef __cplusplus
  83. }
  84. #endif
  85. #endif /* STM32H7xx_HAL_SAI_EX_H */
  86. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/