stm32f7xx_hal_i2c_ex.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32F7xx_HAL_I2C_EX_H
22 #define STM32F7xx_HAL_I2C_EX_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32f7xx_hal_def.h"
30 
39 /* Exported types ------------------------------------------------------------*/
40 /* Exported constants --------------------------------------------------------*/
41 
49 #define I2C_ANALOGFILTER_ENABLE 0x00000000U
50 #define I2C_ANALOGFILTER_DISABLE I2C_CR1_ANFOFF
51 
58 #define I2C_FMP_NOT_SUPPORTED 0xAAAA0000U
59 #if defined(SYSCFG_PMC_I2C_PB6_FMP)
60 #define I2C_FASTMODEPLUS_PB6 SYSCFG_PMC_I2C_PB6_FMP
61 #define I2C_FASTMODEPLUS_PB7 SYSCFG_PMC_I2C_PB7_FMP
62 #else
63 #define I2C_FASTMODEPLUS_PB6 (uint32_t)(0x00000004U | I2C_FMP_NOT_SUPPORTED)
64 #define I2C_FASTMODEPLUS_PB7 (uint32_t)(0x00000008U | I2C_FMP_NOT_SUPPORTED)
65 #endif
66 #if defined(SYSCFG_PMC_I2C_PB8_FMP)
67 #define I2C_FASTMODEPLUS_PB8 SYSCFG_PMC_I2C_PB8_FMP
68 #define I2C_FASTMODEPLUS_PB9 SYSCFG_PMC_I2C_PB9_FMP
69 #else
70 #define I2C_FASTMODEPLUS_PB8 (uint32_t)(0x00000010U | I2C_FMP_NOT_SUPPORTED)
71 #define I2C_FASTMODEPLUS_PB9 (uint32_t)(0x00000012U | I2C_FMP_NOT_SUPPORTED)
72 #endif
73 #if defined(SYSCFG_PMC_I2C1_FMP)
74 #define I2C_FASTMODEPLUS_I2C1 SYSCFG_PMC_I2C1_FMP
75 #else
76 #define I2C_FASTMODEPLUS_I2C1 (uint32_t)(0x00000100U | I2C_FMP_NOT_SUPPORTED)
77 #endif
78 #if defined(SYSCFG_PMC_I2C2_FMP)
79 #define I2C_FASTMODEPLUS_I2C2 SYSCFG_PMC_I2C2_FMP
80 #else
81 #define I2C_FASTMODEPLUS_I2C2 (uint32_t)(0x00000200U | I2C_FMP_NOT_SUPPORTED)
82 #endif
83 #if defined(SYSCFG_PMC_I2C3_FMP)
84 #define I2C_FASTMODEPLUS_I2C3 SYSCFG_PMC_I2C3_FMP
85 #else
86 #define I2C_FASTMODEPLUS_I2C3 (uint32_t)(0x00000400U | I2C_FMP_NOT_SUPPORTED)
87 #endif
88 #if defined(SYSCFG_PMC_I2C4_FMP)
89 #define I2C_FASTMODEPLUS_I2C4 SYSCFG_PMC_I2C4_FMP
90 #else
91 #define I2C_FASTMODEPLUS_I2C4 (uint32_t)(0x00000800U | I2C_FMP_NOT_SUPPORTED)
92 #endif
93 
101 /* Exported macro ------------------------------------------------------------*/
102 /* Exported functions --------------------------------------------------------*/
103 
113 /* Peripheral Control functions ************************************************/
116 #if (defined(SYSCFG_PMC_I2C_PB6_FMP) || defined(SYSCFG_PMC_I2C_PB7_FMP)) || (defined(SYSCFG_PMC_I2C_PB8_FMP) || defined(SYSCFG_PMC_I2C_PB9_FMP)) || (defined(SYSCFG_PMC_I2C1_FMP)) || (defined(SYSCFG_PMC_I2C2_FMP)) || defined(SYSCFG_PMC_I2C3_FMP) || defined(SYSCFG_PMC_I2C4_FMP)
117 void HAL_I2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus);
118 void HAL_I2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus);
119 #endif
120 
121 /* Private constants ---------------------------------------------------------*/
130 /* Private macros ------------------------------------------------------------*/
134 #define IS_I2C_ANALOG_FILTER(FILTER) (((FILTER) == I2C_ANALOGFILTER_ENABLE) || \
135  ((FILTER) == I2C_ANALOGFILTER_DISABLE))
136 
137 #define IS_I2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000FU)
138 
139 #if (defined(SYSCFG_PMC_I2C1_FMP) && defined(SYSCFG_PMC_I2C2_FMP) && defined(SYSCFG_PMC_I2C3_FMP) && defined(SYSCFG_PMC_I2C4_FMP))
140 #define IS_I2C_FASTMODEPLUS(__CONFIG__) ((((__CONFIG__) & I2C_FASTMODEPLUS_PB6) == I2C_FASTMODEPLUS_PB6) || \
141  (((__CONFIG__) & I2C_FASTMODEPLUS_PB7) == I2C_FASTMODEPLUS_PB7) || \
142  (((__CONFIG__) & I2C_FASTMODEPLUS_PB8) == I2C_FASTMODEPLUS_PB8) || \
143  (((__CONFIG__) & I2C_FASTMODEPLUS_PB9) == I2C_FASTMODEPLUS_PB9) || \
144  (((__CONFIG__) & I2C_FASTMODEPLUS_I2C1) == I2C_FASTMODEPLUS_I2C1) || \
145  (((__CONFIG__) & I2C_FASTMODEPLUS_I2C2) == I2C_FASTMODEPLUS_I2C2) || \
146  (((__CONFIG__) & I2C_FASTMODEPLUS_I2C3) == I2C_FASTMODEPLUS_I2C3) || \
147  (((__CONFIG__) & I2C_FASTMODEPLUS_I2C4) == I2C_FASTMODEPLUS_I2C4))
148 #elif defined(SYSCFG_PMC_I2C1_FMP) && defined(SYSCFG_PMC_I2C2_FMP) && defined(SYSCFG_PMC_I2C3_FMP)
149 #define IS_I2C_FASTMODEPLUS(__CONFIG__) ((((__CONFIG__) & I2C_FASTMODEPLUS_PB6) == I2C_FASTMODEPLUS_PB6) || \
150  (((__CONFIG__) & I2C_FASTMODEPLUS_PB7) == I2C_FASTMODEPLUS_PB7) || \
151  (((__CONFIG__) & I2C_FASTMODEPLUS_PB8) == I2C_FASTMODEPLUS_PB8) || \
152  (((__CONFIG__) & I2C_FASTMODEPLUS_PB9) == I2C_FASTMODEPLUS_PB9) || \
153  (((__CONFIG__) & I2C_FASTMODEPLUS_I2C1) == I2C_FASTMODEPLUS_I2C1) || \
154  (((__CONFIG__) & I2C_FASTMODEPLUS_I2C2) == I2C_FASTMODEPLUS_I2C2) || \
155  (((__CONFIG__) & I2C_FASTMODEPLUS_I2C3) == I2C_FASTMODEPLUS_I2C3))
156 #elif defined(SYSCFG_PMC_I2C1_FMP) && defined(SYSCFG_PMC_I2C2_FMP)
157 #define IS_I2C_FASTMODEPLUS(__CONFIG__) ((((__CONFIG__) & I2C_FASTMODEPLUS_PB6) == I2C_FASTMODEPLUS_PB6) || \
158  (((__CONFIG__) & I2C_FASTMODEPLUS_PB7) == I2C_FASTMODEPLUS_PB7) || \
159  (((__CONFIG__) & I2C_FASTMODEPLUS_PB8) == I2C_FASTMODEPLUS_PB8) || \
160  (((__CONFIG__) & I2C_FASTMODEPLUS_PB9) == I2C_FASTMODEPLUS_PB9) || \
161  (((__CONFIG__) & I2C_FASTMODEPLUS_I2C1) == I2C_FASTMODEPLUS_I2C1) || \
162  (((__CONFIG__) & I2C_FASTMODEPLUS_I2C2) == I2C_FASTMODEPLUS_I2C2))
163 #elif defined(SYSCFG_PMC_I2C1_FMP)
164 #define IS_I2C_FASTMODEPLUS(__CONFIG__) ((((__CONFIG__) & I2C_FASTMODEPLUS_PB6) == I2C_FASTMODEPLUS_PB6) || \
165  (((__CONFIG__) & I2C_FASTMODEPLUS_PB7) == I2C_FASTMODEPLUS_PB7) || \
166  (((__CONFIG__) & I2C_FASTMODEPLUS_PB8) == I2C_FASTMODEPLUS_PB8) || \
167  (((__CONFIG__) & I2C_FASTMODEPLUS_PB9) == I2C_FASTMODEPLUS_PB9) || \
168  (((__CONFIG__) & I2C_FASTMODEPLUS_I2C1) == I2C_FASTMODEPLUS_I2C1))
169 #endif /* SYSCFG_PMC_I2C1_FMP && SYSCFG_PMC_I2C2_FMP && SYSCFG_PMC_I2C3_FMP && SYSCFG_PMC_I2C4_FMP */
170 
171 
172 
177 /* Private Functions ---------------------------------------------------------*/
181 /* Private functions are defined in stm32f7xx_hal_i2c_ex.c file */
202 #ifdef __cplusplus
203 }
204 #endif
205 
206 #endif /* STM32F7xx_HAL_I2C_EX_H */
207 
208 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:40
HAL_I2CEx_ConfigDigitalFilter
HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter)
HAL_I2CEx_EnableFastModePlus
void HAL_I2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus)
stm32f7xx_hal_def.h
This file contains HAL common defines, enumeration, macros and structures definitions.
I2C_HandleTypeDef
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_i2c.h:188
HAL_I2CEx_ConfigAnalogFilter
HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter)
HAL_I2CEx_DisableFastModePlus
void HAL_I2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus)


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:53