Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2 | Rev 6 | ||
|---|---|---|---|
| Line 3... | Line 3... | ||
| 3 | * @file stm32f0xx_hal_i2c_ex.c |
3 | * @file stm32f0xx_hal_i2c_ex.c |
| 4 | * @author MCD Application Team |
4 | * @author MCD Application Team |
| 5 | * @brief I2C Extended HAL module driver. |
5 | * @brief I2C Extended HAL module driver. |
| 6 | * This file provides firmware functions to manage the following |
6 | * This file provides firmware functions to manage the following |
| 7 | * functionalities of I2C Extended peripheral: |
7 | * functionalities of I2C Extended peripheral: |
| - | 8 | * + Filter Mode Functions |
|
| - | 9 | * + WakeUp Mode Functions |
|
| 8 | * + Extended features functions |
10 | * + FastModePlus Functions |
| 9 | * |
11 | * |
| 10 | @verbatim |
12 | @verbatim |
| 11 | ============================================================================== |
13 | ============================================================================== |
| 12 | ##### I2C peripheral Extended features ##### |
14 | ##### I2C peripheral Extended features ##### |
| 13 | ============================================================================== |
15 | ============================================================================== |
| Line 69... | Line 71... | ||
| 69 | 71 | ||
| 70 | /** @defgroup I2CEx_Exported_Functions I2C Extended Exported Functions |
72 | /** @defgroup I2CEx_Exported_Functions I2C Extended Exported Functions |
| 71 | * @{ |
73 | * @{ |
| 72 | */ |
74 | */ |
| 73 | 75 | ||
| 74 | /** @defgroup I2CEx_Exported_Functions_Group1 Extended features functions |
76 | /** @defgroup I2CEx_Exported_Functions_Group1 Filter Mode Functions |
| 75 | * @brief Extended features functions |
77 | * @brief Filter Mode Functions |
| 76 | * |
78 | * |
| 77 | @verbatim |
79 | @verbatim |
| 78 | =============================================================================== |
80 | =============================================================================== |
| 79 | ##### Extended features functions ##### |
81 | ##### Filter Mode Functions ##### |
| 80 | =============================================================================== |
82 | =============================================================================== |
| 81 | [..] This section provides functions allowing to: |
83 | [..] This section provides functions allowing to: |
| 82 | (+) Configure Noise Filters |
84 | (+) Configure Noise Filters |
| 83 | (+) Configure Wake Up Feature |
- | |
| 84 | (+) Configure Fast Mode Plus |
- | |
| 85 | 85 | ||
| 86 | @endverbatim |
86 | @endverbatim |
| 87 | * @{ |
87 | * @{ |
| 88 | */ |
88 | */ |
| 89 | 89 | ||
| Line 180... | Line 180... | ||
| 180 | else |
180 | else |
| 181 | { |
181 | { |
| 182 | return HAL_BUSY; |
182 | return HAL_BUSY; |
| 183 | } |
183 | } |
| 184 | } |
184 | } |
| - | 185 | /** |
|
| - | 186 | * @} |
|
| - | 187 | */ |
|
| 185 | #if defined(I2C_CR1_WUPEN) |
188 | #if defined(I2C_CR1_WUPEN) |
| 186 | 189 | ||
| - | 190 | /** @defgroup I2CEx_Exported_Functions_Group2 WakeUp Mode Functions |
|
| - | 191 | * @brief WakeUp Mode Functions |
|
| - | 192 | * |
|
| - | 193 | @verbatim |
|
| - | 194 | =============================================================================== |
|
| - | 195 | ##### WakeUp Mode Functions ##### |
|
| - | 196 | =============================================================================== |
|
| - | 197 | [..] This section provides functions allowing to: |
|
| - | 198 | (+) Configure Wake Up Feature |
|
| - | 199 | ||
| - | 200 | @endverbatim |
|
| - | 201 | * @{ |
|
| - | 202 | */ |
|
| - | 203 | ||
| 187 | /** |
204 | /** |
| 188 | * @brief Enable I2C wakeup from Stop mode(s). |
205 | * @brief Enable I2C wakeup from Stop mode(s). |
| 189 | * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains |
206 | * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains |
| 190 | * the configuration information for the specified I2Cx peripheral. |
207 | * the configuration information for the specified I2Cx peripheral. |
| 191 | * @retval HAL status |
208 | * @retval HAL status |
| Line 259... | Line 276... | ||
| 259 | else |
276 | else |
| 260 | { |
277 | { |
| 261 | return HAL_BUSY; |
278 | return HAL_BUSY; |
| 262 | } |
279 | } |
| 263 | } |
280 | } |
| - | 281 | /** |
|
| - | 282 | * @} |
|
| - | 283 | */ |
|
| - | 284 | #endif /* I2C_CR1_WUPEN */ |
|
| - | 285 | ||
| - | 286 | /** @defgroup I2CEx_Exported_Functions_Group3 Fast Mode Plus Functions |
|
| - | 287 | * @brief Fast Mode Plus Functions |
|
| - | 288 | * |
|
| - | 289 | @verbatim |
|
| - | 290 | =============================================================================== |
|
| - | 291 | ##### Fast Mode Plus Functions ##### |
|
| - | 292 | =============================================================================== |
|
| - | 293 | [..] This section provides functions allowing to: |
|
| - | 294 | (+) Configure Fast Mode Plus |
|
| - | 295 | ||
| 264 | #endif |
296 | @endverbatim |
| - | 297 | * @{ |
|
| - | 298 | */ |
|
| 265 | 299 | ||
| 266 | /** |
300 | /** |
| 267 | * @brief Enable the I2C fast mode plus driving capability. |
301 | * @brief Enable the I2C fast mode plus driving capability. |
| 268 | * @param ConfigFastModePlus Selects the pin. |
302 | * @param ConfigFastModePlus Selects the pin. |
| 269 | * This parameter can be one of the @ref I2CEx_FastModePlus values |
303 | * This parameter can be one of the @ref I2CEx_FastModePlus values |
| Line 310... | Line 344... | ||
| 310 | __HAL_RCC_SYSCFG_CLK_ENABLE(); |
344 | __HAL_RCC_SYSCFG_CLK_ENABLE(); |
| 311 | 345 | ||
| 312 | /* Disable fast mode plus driving capability for selected pin */ |
346 | /* Disable fast mode plus driving capability for selected pin */ |
| 313 | CLEAR_BIT(SYSCFG->CFGR1, (uint32_t)ConfigFastModePlus); |
347 | CLEAR_BIT(SYSCFG->CFGR1, (uint32_t)ConfigFastModePlus); |
| 314 | } |
348 | } |
| 315 | - | ||
| 316 | /** |
349 | /** |
| 317 | * @} |
350 | * @} |
| 318 | */ |
351 | */ |
| 319 | - | ||
| 320 | /** |
352 | /** |
| 321 | * @} |
353 | * @} |
| 322 | */ |
354 | */ |
| 323 | 355 | ||
| 324 | #endif /* HAL_I2C_MODULE_ENABLED */ |
356 | #endif /* HAL_I2C_MODULE_ENABLED */ |