Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 

118 рядки
3.1 KiB

  1. /**
  2. ******************************************************************************
  3. * @file stm32f4xx_hal_i2c_ex.h
  4. * @author MCD Application Team
  5. * @brief Header file of I2C HAL Extension module.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2016 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 __STM32F4xx_HAL_I2C_EX_H
  21. #define __STM32F4xx_HAL_I2C_EX_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. #if defined(I2C_FLTR_ANOFF)&&defined(I2C_FLTR_DNF)
  26. /* Includes ------------------------------------------------------------------*/
  27. #include "stm32f4xx_hal_def.h"
  28. /** @addtogroup STM32F4xx_HAL_Driver
  29. * @{
  30. */
  31. /** @addtogroup I2CEx
  32. * @{
  33. */
  34. /* Exported types ------------------------------------------------------------*/
  35. /* Exported constants --------------------------------------------------------*/
  36. /** @defgroup I2CEx_Exported_Constants I2C Exported Constants
  37. * @{
  38. */
  39. /** @defgroup I2CEx_Analog_Filter I2C Analog Filter
  40. * @{
  41. */
  42. #define I2C_ANALOGFILTER_ENABLE 0x00000000U
  43. #define I2C_ANALOGFILTER_DISABLE I2C_FLTR_ANOFF
  44. /**
  45. * @}
  46. */
  47. /**
  48. * @}
  49. */
  50. /* Exported macro ------------------------------------------------------------*/
  51. /* Exported functions --------------------------------------------------------*/
  52. /** @addtogroup I2CEx_Exported_Functions
  53. * @{
  54. */
  55. /** @addtogroup I2CEx_Exported_Functions_Group1
  56. * @{
  57. */
  58. /* Peripheral Control functions ************************************************/
  59. HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter);
  60. HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter);
  61. /**
  62. * @}
  63. */
  64. /**
  65. * @}
  66. */
  67. /* Private types -------------------------------------------------------------*/
  68. /* Private variables ---------------------------------------------------------*/
  69. /* Private constants ---------------------------------------------------------*/
  70. /** @defgroup I2CEx_Private_Constants I2C Private Constants
  71. * @{
  72. */
  73. /**
  74. * @}
  75. */
  76. /* Private macros ------------------------------------------------------------*/
  77. /** @defgroup I2CEx_Private_Macros I2C Private Macros
  78. * @{
  79. */
  80. #define IS_I2C_ANALOG_FILTER(FILTER) (((FILTER) == I2C_ANALOGFILTER_ENABLE) || \
  81. ((FILTER) == I2C_ANALOGFILTER_DISABLE))
  82. #define IS_I2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000FU)
  83. /**
  84. * @}
  85. */
  86. /**
  87. * @}
  88. */
  89. /**
  90. * @}
  91. */
  92. #endif
  93. #ifdef __cplusplus
  94. }
  95. #endif
  96. #endif /* __STM32F4xx_HAL_I2C_EX_H */
  97. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/