• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef __STM32F4xx_HAL_I2C_EX_H
22 #define __STM32F4xx_HAL_I2C_EX_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #if  defined(I2C_FLTR_ANOFF)&&defined(I2C_FLTR_DNF)
29 /* Includes ------------------------------------------------------------------*/
30 #include "stm32f4xx_hal_def.h"
31 
32 /** @addtogroup STM32F4xx_HAL_Driver
33   * @{
34   */
35 
36 /** @addtogroup I2CEx
37   * @{
38   */
39 
40 /* Exported types ------------------------------------------------------------*/
41 /* Exported constants --------------------------------------------------------*/
42 /** @defgroup I2CEx_Exported_Constants I2C Exported Constants
43   * @{
44   */
45 
46 /** @defgroup I2CEx_Analog_Filter I2C Analog Filter
47   * @{
48   */
49 #define I2C_ANALOGFILTER_ENABLE        0x00000000U
50 #define I2C_ANALOGFILTER_DISABLE       I2C_FLTR_ANOFF
51 /**
52   * @}
53   */
54 
55 /**
56   * @}
57   */
58 
59 /* Exported macro ------------------------------------------------------------*/
60 /* Exported functions --------------------------------------------------------*/
61 /** @addtogroup I2CEx_Exported_Functions
62   * @{
63   */
64 
65 /** @addtogroup I2CEx_Exported_Functions_Group1
66   * @{
67   */
68 /* Peripheral Control functions  ************************************************/
69 HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter);
70 HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter);
71 /**
72   * @}
73   */
74 
75 /**
76   * @}
77   */
78 /* Private types -------------------------------------------------------------*/
79 /* Private variables ---------------------------------------------------------*/
80 /* Private constants ---------------------------------------------------------*/
81 /** @defgroup I2CEx_Private_Constants I2C Private Constants
82   * @{
83   */
84 
85 /**
86   * @}
87   */
88 
89 /* Private macros ------------------------------------------------------------*/
90 /** @defgroup I2CEx_Private_Macros I2C Private Macros
91   * @{
92   */
93 #define IS_I2C_ANALOG_FILTER(FILTER) (((FILTER) == I2C_ANALOGFILTER_ENABLE) || \
94                                       ((FILTER) == I2C_ANALOGFILTER_DISABLE))
95 #define IS_I2C_DIGITAL_FILTER(FILTER)   ((FILTER) <= 0x0000000FU)
96 /**
97   * @}
98   */
99 
100 /**
101   * @}
102   */
103 
104 /**
105   * @}
106   */
107 
108 #endif
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
114 #endif /* __STM32F4xx_HAL_I2C_EX_H */
115 
116 
117 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
118