001
targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_i2c_ex.h@0:13413ea9a877, 2022-06-12 (annotated)
- Committer:
- ganlikun
- Date:
- Sun Jun 12 14:02:44 2022 +0000
- Revision:
- 0:13413ea9a877
00
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ganlikun | 0:13413ea9a877 | 1 | /** |
ganlikun | 0:13413ea9a877 | 2 | ****************************************************************************** |
ganlikun | 0:13413ea9a877 | 3 | * @file stm32f4xx_hal_i2c_ex.h |
ganlikun | 0:13413ea9a877 | 4 | * @author MCD Application Team |
ganlikun | 0:13413ea9a877 | 5 | * @version V1.7.1 |
ganlikun | 0:13413ea9a877 | 6 | * @date 14-April-2017 |
ganlikun | 0:13413ea9a877 | 7 | * @brief Header file of I2C HAL Extension module. |
ganlikun | 0:13413ea9a877 | 8 | ****************************************************************************** |
ganlikun | 0:13413ea9a877 | 9 | * @attention |
ganlikun | 0:13413ea9a877 | 10 | * |
ganlikun | 0:13413ea9a877 | 11 | * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> |
ganlikun | 0:13413ea9a877 | 12 | * |
ganlikun | 0:13413ea9a877 | 13 | * Redistribution and use in source and binary forms, with or without modification, |
ganlikun | 0:13413ea9a877 | 14 | * are permitted provided that the following conditions are met: |
ganlikun | 0:13413ea9a877 | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
ganlikun | 0:13413ea9a877 | 16 | * this list of conditions and the following disclaimer. |
ganlikun | 0:13413ea9a877 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
ganlikun | 0:13413ea9a877 | 18 | * this list of conditions and the following disclaimer in the documentation |
ganlikun | 0:13413ea9a877 | 19 | * and/or other materials provided with the distribution. |
ganlikun | 0:13413ea9a877 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
ganlikun | 0:13413ea9a877 | 21 | * may be used to endorse or promote products derived from this software |
ganlikun | 0:13413ea9a877 | 22 | * without specific prior written permission. |
ganlikun | 0:13413ea9a877 | 23 | * |
ganlikun | 0:13413ea9a877 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
ganlikun | 0:13413ea9a877 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
ganlikun | 0:13413ea9a877 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
ganlikun | 0:13413ea9a877 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
ganlikun | 0:13413ea9a877 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
ganlikun | 0:13413ea9a877 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
ganlikun | 0:13413ea9a877 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
ganlikun | 0:13413ea9a877 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
ganlikun | 0:13413ea9a877 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
ganlikun | 0:13413ea9a877 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
ganlikun | 0:13413ea9a877 | 34 | * |
ganlikun | 0:13413ea9a877 | 35 | ****************************************************************************** |
ganlikun | 0:13413ea9a877 | 36 | */ |
ganlikun | 0:13413ea9a877 | 37 | |
ganlikun | 0:13413ea9a877 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
ganlikun | 0:13413ea9a877 | 39 | #ifndef __STM32F4xx_HAL_I2C_EX_H |
ganlikun | 0:13413ea9a877 | 40 | #define __STM32F4xx_HAL_I2C_EX_H |
ganlikun | 0:13413ea9a877 | 41 | |
ganlikun | 0:13413ea9a877 | 42 | #ifdef __cplusplus |
ganlikun | 0:13413ea9a877 | 43 | extern "C" { |
ganlikun | 0:13413ea9a877 | 44 | #endif |
ganlikun | 0:13413ea9a877 | 45 | |
ganlikun | 0:13413ea9a877 | 46 | #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||\ |
ganlikun | 0:13413ea9a877 | 47 | defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F411xE) || defined(STM32F446xx) ||\ |
ganlikun | 0:13413ea9a877 | 48 | defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F413xx) || defined(STM32F423xx) |
ganlikun | 0:13413ea9a877 | 49 | /* Includes ------------------------------------------------------------------*/ |
ganlikun | 0:13413ea9a877 | 50 | #include "stm32f4xx_hal_def.h" |
ganlikun | 0:13413ea9a877 | 51 | |
ganlikun | 0:13413ea9a877 | 52 | /** @addtogroup STM32F4xx_HAL_Driver |
ganlikun | 0:13413ea9a877 | 53 | * @{ |
ganlikun | 0:13413ea9a877 | 54 | */ |
ganlikun | 0:13413ea9a877 | 55 | |
ganlikun | 0:13413ea9a877 | 56 | /** @addtogroup I2CEx |
ganlikun | 0:13413ea9a877 | 57 | * @{ |
ganlikun | 0:13413ea9a877 | 58 | */ |
ganlikun | 0:13413ea9a877 | 59 | |
ganlikun | 0:13413ea9a877 | 60 | /* Exported types ------------------------------------------------------------*/ |
ganlikun | 0:13413ea9a877 | 61 | /* Exported constants --------------------------------------------------------*/ |
ganlikun | 0:13413ea9a877 | 62 | /** @defgroup I2CEx_Exported_Constants I2C Exported Constants |
ganlikun | 0:13413ea9a877 | 63 | * @{ |
ganlikun | 0:13413ea9a877 | 64 | */ |
ganlikun | 0:13413ea9a877 | 65 | |
ganlikun | 0:13413ea9a877 | 66 | /** @defgroup I2CEx_Analog_Filter I2C Analog Filter |
ganlikun | 0:13413ea9a877 | 67 | * @{ |
ganlikun | 0:13413ea9a877 | 68 | */ |
ganlikun | 0:13413ea9a877 | 69 | #define I2C_ANALOGFILTER_ENABLE 0x00000000U |
ganlikun | 0:13413ea9a877 | 70 | #define I2C_ANALOGFILTER_DISABLE I2C_FLTR_ANOFF |
ganlikun | 0:13413ea9a877 | 71 | /** |
ganlikun | 0:13413ea9a877 | 72 | * @} |
ganlikun | 0:13413ea9a877 | 73 | */ |
ganlikun | 0:13413ea9a877 | 74 | |
ganlikun | 0:13413ea9a877 | 75 | /** |
ganlikun | 0:13413ea9a877 | 76 | * @} |
ganlikun | 0:13413ea9a877 | 77 | */ |
ganlikun | 0:13413ea9a877 | 78 | |
ganlikun | 0:13413ea9a877 | 79 | /* Exported macro ------------------------------------------------------------*/ |
ganlikun | 0:13413ea9a877 | 80 | /* Exported functions --------------------------------------------------------*/ |
ganlikun | 0:13413ea9a877 | 81 | /** @addtogroup I2CEx_Exported_Functions |
ganlikun | 0:13413ea9a877 | 82 | * @{ |
ganlikun | 0:13413ea9a877 | 83 | */ |
ganlikun | 0:13413ea9a877 | 84 | |
ganlikun | 0:13413ea9a877 | 85 | /** @addtogroup I2CEx_Exported_Functions_Group1 |
ganlikun | 0:13413ea9a877 | 86 | * @{ |
ganlikun | 0:13413ea9a877 | 87 | */ |
ganlikun | 0:13413ea9a877 | 88 | /* Peripheral Control functions ************************************************/ |
ganlikun | 0:13413ea9a877 | 89 | HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter); |
ganlikun | 0:13413ea9a877 | 90 | HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter); |
ganlikun | 0:13413ea9a877 | 91 | /** |
ganlikun | 0:13413ea9a877 | 92 | * @} |
ganlikun | 0:13413ea9a877 | 93 | */ |
ganlikun | 0:13413ea9a877 | 94 | |
ganlikun | 0:13413ea9a877 | 95 | /** |
ganlikun | 0:13413ea9a877 | 96 | * @} |
ganlikun | 0:13413ea9a877 | 97 | */ |
ganlikun | 0:13413ea9a877 | 98 | /* Private types -------------------------------------------------------------*/ |
ganlikun | 0:13413ea9a877 | 99 | /* Private variables ---------------------------------------------------------*/ |
ganlikun | 0:13413ea9a877 | 100 | /* Private constants ---------------------------------------------------------*/ |
ganlikun | 0:13413ea9a877 | 101 | /** @defgroup I2CEx_Private_Constants I2C Private Constants |
ganlikun | 0:13413ea9a877 | 102 | * @{ |
ganlikun | 0:13413ea9a877 | 103 | */ |
ganlikun | 0:13413ea9a877 | 104 | |
ganlikun | 0:13413ea9a877 | 105 | /** |
ganlikun | 0:13413ea9a877 | 106 | * @} |
ganlikun | 0:13413ea9a877 | 107 | */ |
ganlikun | 0:13413ea9a877 | 108 | |
ganlikun | 0:13413ea9a877 | 109 | /* Private macros ------------------------------------------------------------*/ |
ganlikun | 0:13413ea9a877 | 110 | /** @defgroup I2CEx_Private_Macros I2C Private Macros |
ganlikun | 0:13413ea9a877 | 111 | * @{ |
ganlikun | 0:13413ea9a877 | 112 | */ |
ganlikun | 0:13413ea9a877 | 113 | #define IS_I2C_ANALOG_FILTER(FILTER) (((FILTER) == I2C_ANALOGFILTER_ENABLE) || \ |
ganlikun | 0:13413ea9a877 | 114 | ((FILTER) == I2C_ANALOGFILTER_DISABLE)) |
ganlikun | 0:13413ea9a877 | 115 | #define IS_I2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000FU) |
ganlikun | 0:13413ea9a877 | 116 | /** |
ganlikun | 0:13413ea9a877 | 117 | * @} |
ganlikun | 0:13413ea9a877 | 118 | */ |
ganlikun | 0:13413ea9a877 | 119 | |
ganlikun | 0:13413ea9a877 | 120 | /** |
ganlikun | 0:13413ea9a877 | 121 | * @} |
ganlikun | 0:13413ea9a877 | 122 | */ |
ganlikun | 0:13413ea9a877 | 123 | |
ganlikun | 0:13413ea9a877 | 124 | /** |
ganlikun | 0:13413ea9a877 | 125 | * @} |
ganlikun | 0:13413ea9a877 | 126 | */ |
ganlikun | 0:13413ea9a877 | 127 | |
ganlikun | 0:13413ea9a877 | 128 | #endif /* STM32F427xx || STM32F429xx || STM32F437xx || STM32F439xx || STM32F401xC ||\ |
ganlikun | 0:13413ea9a877 | 129 | STM32F401xE || STM32F411xE || STM32F446xx || STM32F469xx || STM32F479xx ||\ |
ganlikun | 0:13413ea9a877 | 130 | STM32F413xx || STM32F423xx */ |
ganlikun | 0:13413ea9a877 | 131 | |
ganlikun | 0:13413ea9a877 | 132 | #ifdef __cplusplus |
ganlikun | 0:13413ea9a877 | 133 | } |
ganlikun | 0:13413ea9a877 | 134 | #endif |
ganlikun | 0:13413ea9a877 | 135 | |
ganlikun | 0:13413ea9a877 | 136 | #endif /* __STM32F4xx_HAL_I2C_EX_H */ |
ganlikun | 0:13413ea9a877 | 137 | |
ganlikun | 0:13413ea9a877 | 138 | |
ganlikun | 0:13413ea9a877 | 139 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
ganlikun | 0:13413ea9a877 | 140 |