2 ******************************************************************************
\r
3 * @file stm32f7xx_hal_i2c_ex.h
\r
4 * @author MCD Application Team
\r
7 * @brief Header file of I2C HAL Extension module.
\r
8 ******************************************************************************
\r
11 * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
\r
13 * Redistribution and use in source and binary forms, with or without modification,
\r
14 * are permitted provided that the following conditions are met:
\r
15 * 1. Redistributions of source code must retain the above copyright notice,
\r
16 * this list of conditions and the following disclaimer.
\r
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
\r
18 * this list of conditions and the following disclaimer in the documentation
\r
19 * and/or other materials provided with the distribution.
\r
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
\r
21 * may be used to endorse or promote products derived from this software
\r
22 * without specific prior written permission.
\r
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
\r
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
\r
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
\r
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
\r
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
\r
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
\r
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
\r
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
\r
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
\r
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
35 ******************************************************************************
\r
38 /* Define to prevent recursive inclusion -------------------------------------*/
\r
39 #ifndef __STM32F7xx_HAL_I2C_EX_H
\r
40 #define __STM32F7xx_HAL_I2C_EX_H
\r
46 /* Includes ------------------------------------------------------------------*/
\r
47 #include "stm32f7xx_hal_def.h"
\r
49 /** @addtogroup STM32F7xx_HAL_Driver
\r
53 /** @addtogroup I2CEx
\r
57 /* Exported types ------------------------------------------------------------*/
\r
58 /* Exported constants --------------------------------------------------------*/
\r
60 /** @defgroup I2CEx_Exported_Constants I2CEx Exported Constants
\r
64 /** @defgroup I2CEx_Analog_Filter I2CEx Analog Filter
\r
67 #define I2C_ANALOGFILTER_ENABLE ((uint32_t)0x00000000)
\r
68 #define I2C_ANALOGFILTER_DISABLE I2C_CR1_ANFOFF
\r
77 /* Exported macro ------------------------------------------------------------*/
\r
78 /* Exported functions --------------------------------------------------------*/
\r
80 /* Peripheral Control methods ************************************************/
\r
81 HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter);
\r
82 HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter);
\r
84 /* Private constants ---------------------------------------------------------*/
\r
85 /** @defgroup I2C_Private_Constants I2C Private Constants
\r
93 /* Private macros ------------------------------------------------------------*/
\r
94 /** @defgroup I2C_Private_Macro I2C Private Macros
\r
97 #define IS_I2C_ANALOG_FILTER(FILTER) (((FILTER) == I2C_ANALOGFILTER_ENABLE) || \
\r
98 ((FILTER) == I2C_ANALOGFILTER_DISABLE))
\r
100 #define IS_I2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000F)
\r
105 /* Private Functions ---------------------------------------------------------*/
\r
106 /** @defgroup I2C_Private_Functions I2C Private Functions
\r
109 /* Private functions are defined in stm32f7xx_hal_i2c_ex.c file */
\r
126 #endif /* __STM32F7xx_HAL_I2C_EX_H */
\r
129 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
\r