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.
 
 
 

109 lines
3.0 KiB

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