STM32F439xx HAL User Manual
stm32f4xx_hal_fmpi2c_ex.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32f4xx_hal_fmpi2c_ex.h
00004   * @author  MCD Application Team
00005   * @brief   Header file of FMPI2C HAL Extended module.
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
00010   *
00011   * Redistribution and use in source and binary forms, with or without modification,
00012   * are permitted provided that the following conditions are met:
00013   *   1. Redistributions of source code must retain the above copyright notice,
00014   *      this list of conditions and the following disclaimer.
00015   *   2. Redistributions in binary form must reproduce the above copyright notice,
00016   *      this list of conditions and the following disclaimer in the documentation
00017   *      and/or other materials provided with the distribution.
00018   *   3. Neither the name of STMicroelectronics nor the names of its contributors
00019   *      may be used to endorse or promote products derived from this software
00020   *      without specific prior written permission.
00021   *
00022   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00023   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00024   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00025   * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
00026   * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00027   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00028   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00029   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00030   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00031   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00032   *
00033   ******************************************************************************
00034   */
00035 
00036 /* Define to prevent recursive inclusion -------------------------------------*/
00037 #ifndef __STM32F4xx_HAL_FMPI2C_EX_H
00038 #define __STM32F4xx_HAL_FMPI2C_EX_H
00039 
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043 
00044 #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) || defined(STM32F446xx) || defined(STM32F412Zx) ||\
00045     defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
00046 
00047 /* Includes ------------------------------------------------------------------*/
00048 #include "stm32f4xx_hal_def.h"
00049 
00050 /** @addtogroup STM32F4xx_HAL_Driver
00051   * @{
00052   */
00053 
00054 /** @addtogroup FMPI2CEx
00055   * @{
00056   */
00057 
00058 /* Exported types ------------------------------------------------------------*/
00059 /* Exported constants --------------------------------------------------------*/
00060 
00061 /** @defgroup FMPI2CEx_Exported_Constants FMPI2C Extended Exported Constants
00062   * @{
00063   */
00064 
00065 /** @defgroup FMPI2CEx_Analog_Filter FMPI2C Extended Analog Filter
00066   * @{
00067   */
00068 #define FMPI2C_ANALOGFILTER_ENABLE         0x00000000U
00069 #define FMPI2C_ANALOGFILTER_DISABLE        FMPI2C_CR1_ANFOFF
00070 /**
00071   * @}
00072   */
00073 
00074 /** @defgroup FMPI2CEx_FastModePlus FMPI2C Extended Fast Mode Plus
00075   * @{
00076   */
00077 #define FMPI2C_FASTMODEPLUS_SCL            SYSCFG_CFGR_FMPI2C1_SCL  /*!< Enable Fast Mode Plus on FMPI2C1 SCL pins       */
00078 #define FMPI2C_FASTMODEPLUS_SDA            SYSCFG_CFGR_FMPI2C1_SDA  /*!< Enable Fast Mode Plus on FMPI2C1 SDA pins       */
00079 /**
00080   * @}
00081   */
00082 
00083 /**
00084   * @}
00085   */
00086 
00087 /* Exported macro ------------------------------------------------------------*/
00088 /* Exported functions --------------------------------------------------------*/
00089 
00090 /** @addtogroup FMPI2CEx_Exported_Functions FMPI2C Extended Exported Functions
00091   * @{
00092   */
00093 
00094 /** @addtogroup FMPI2CEx_Exported_Functions_Group1 Extended features functions
00095   * @brief    Extended features functions
00096   * @{
00097   */
00098 
00099 /* Peripheral Control functions  ************************************************/
00100 HAL_StatusTypeDef HAL_FMPI2CEx_ConfigAnalogFilter(FMPI2C_HandleTypeDef *hfmpi2c, uint32_t AnalogFilter);
00101 HAL_StatusTypeDef HAL_FMPI2CEx_ConfigDigitalFilter(FMPI2C_HandleTypeDef *hfmpi2c, uint32_t DigitalFilter);
00102 void HAL_FMPI2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus);
00103 void HAL_FMPI2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus);
00104 
00105 /* Private constants ---------------------------------------------------------*/
00106 /** @defgroup FMPI2CEx_Private_Constants FMPI2C Extended Private Constants
00107   * @{
00108   */
00109 
00110 /**
00111   * @}
00112   */
00113 
00114 /* Private macros ------------------------------------------------------------*/
00115 /** @defgroup FMPI2CEx_Private_Macro FMPI2C Extended Private Macros
00116   * @{
00117   */
00118 #define IS_FMPI2C_ANALOG_FILTER(FILTER)    (((FILTER) == FMPI2C_ANALOGFILTER_ENABLE) || \
00119                                             ((FILTER) == FMPI2C_ANALOGFILTER_DISABLE))
00120 
00121 #define IS_FMPI2C_DIGITAL_FILTER(FILTER)   ((FILTER) <= 0x0000000FU)
00122 
00123 #define IS_FMPI2C_FASTMODEPLUS(__CONFIG__) ((((__CONFIG__) & (FMPI2C_FASTMODEPLUS_SCL)) == FMPI2C_FASTMODEPLUS_SCL) || \
00124                                             (((__CONFIG__) & (FMPI2C_FASTMODEPLUS_SDA)) == FMPI2C_FASTMODEPLUS_SDA))
00125 /**
00126   * @}
00127   */
00128 
00129 /* Private Functions ---------------------------------------------------------*/
00130 /** @defgroup FMPI2CEx_Private_Functions FMPI2C Extended Private Functions
00131   * @{
00132   */
00133 /* Private functions are defined in stm32f4xx_hal_fmpi2c_ex.c file */
00134 /**
00135   * @}
00136   */
00137 
00138 /**
00139   * @}
00140   */
00141 
00142 /**
00143   * @}
00144   */
00145 
00146 /**
00147   * @}
00148   */
00149 
00150 /**
00151   * @}
00152   */
00153 #endif /* STM32F410xx || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx || STM32F413xx || STM32F423xx */  
00154 #ifdef __cplusplus
00155 }
00156 #endif
00157 
00158 #endif /* __STM32F4xx_HAL_FMPI2C_EX_H */
00159 
00160 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/