STM32F479xx HAL User Manual
|
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>© Copyright (c) 2016 STMicroelectronics. 00010 * All rights reserved.</center></h2> 00011 * 00012 * This software component is licensed by ST under BSD 3-Clause license, 00013 * the "License"; You may not use this file except in compliance with the 00014 * License. You may obtain a copy of the License at: 00015 * opensource.org/licenses/BSD-3-Clause 00016 * 00017 ****************************************************************************** 00018 */ 00019 00020 /* Define to prevent recursive inclusion -------------------------------------*/ 00021 #ifndef STM32F4xx_HAL_FMPI2C_EX_H 00022 #define STM32F4xx_HAL_FMPI2C_EX_H 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 #if defined(FMPI2C_CR1_PE) 00029 /* Includes ------------------------------------------------------------------*/ 00030 #include "stm32f4xx_hal_def.h" 00031 00032 /** @addtogroup STM32F4xx_HAL_Driver 00033 * @{ 00034 */ 00035 00036 /** @addtogroup FMPI2CEx 00037 * @{ 00038 */ 00039 00040 /* Exported types ------------------------------------------------------------*/ 00041 /* Exported constants --------------------------------------------------------*/ 00042 /** @defgroup FMPI2CEx_Exported_Constants FMPI2C Extended Exported Constants 00043 * @{ 00044 */ 00045 00046 /** @defgroup FMPI2CEx_Analog_Filter FMPI2C Extended Analog Filter 00047 * @{ 00048 */ 00049 #define FMPI2C_ANALOGFILTER_ENABLE 0x00000000U 00050 #define FMPI2C_ANALOGFILTER_DISABLE FMPI2C_CR1_ANFOFF 00051 /** 00052 * @} 00053 */ 00054 00055 /** @defgroup FMPI2CEx_FastModePlus FMPI2C Extended Fast Mode Plus 00056 * @{ 00057 */ 00058 #define FMPI2C_FASTMODEPLUS_SCL SYSCFG_CFGR_FMPI2C1_SCL /*!< Enable Fast Mode Plus on FMPI2C1 SCL pins */ 00059 #define FMPI2C_FASTMODEPLUS_SDA SYSCFG_CFGR_FMPI2C1_SDA /*!< Enable Fast Mode Plus on FMPI2C1 SDA pins */ 00060 /** 00061 * @} 00062 */ 00063 00064 /** 00065 * @} 00066 */ 00067 00068 /* Exported macro ------------------------------------------------------------*/ 00069 /** @defgroup FMPI2CEx_Exported_Macros FMPI2C Extended Exported Macros 00070 * @{ 00071 */ 00072 00073 /** 00074 * @} 00075 */ 00076 00077 /* Exported functions --------------------------------------------------------*/ 00078 /** @addtogroup FMPI2CEx_Exported_Functions FMPI2C Extended Exported Functions 00079 * @{ 00080 */ 00081 00082 /** @addtogroup FMPI2CEx_Exported_Functions_Group1 Filter Mode Functions 00083 * @{ 00084 */ 00085 /* Peripheral Control functions ************************************************/ 00086 HAL_StatusTypeDef HAL_FMPI2CEx_ConfigAnalogFilter(FMPI2C_HandleTypeDef *hfmpi2c, uint32_t AnalogFilter); 00087 HAL_StatusTypeDef HAL_FMPI2CEx_ConfigDigitalFilter(FMPI2C_HandleTypeDef *hfmpi2c, uint32_t DigitalFilter); 00088 /** 00089 * @} 00090 */ 00091 00092 /** @addtogroup FMPI2CEx_Exported_Functions_Group3 Fast Mode Plus Functions 00093 * @{ 00094 */ 00095 void HAL_FMPI2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus); 00096 void HAL_FMPI2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus); 00097 /** 00098 * @} 00099 */ 00100 00101 /** 00102 * @} 00103 */ 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 #endif /* FMPI2C_CR1_PE */ 00147 #ifdef __cplusplus 00148 } 00149 #endif 00150 00151 #endif /* STM32F4xx_HAL_FMPI2C_EX_H */ 00152 00153 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/