inport from local

Dependents:   Hobbyking_Cheetah_0511

Committer:
NYX
Date:
Mon Mar 16 06:35:48 2020 +0000
Revision:
0:85b3fd62ea1a
reinport to mbed;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
NYX 0:85b3fd62ea1a 1 /**
NYX 0:85b3fd62ea1a 2 ******************************************************************************
NYX 0:85b3fd62ea1a 3 * @file stm32f4xx_hal_fmpi2c_ex.h
NYX 0:85b3fd62ea1a 4 * @author MCD Application Team
NYX 0:85b3fd62ea1a 5 * @version V1.7.1
NYX 0:85b3fd62ea1a 6 * @date 14-April-2017
NYX 0:85b3fd62ea1a 7 * @brief Header file of FMPI2C HAL Extended module.
NYX 0:85b3fd62ea1a 8 ******************************************************************************
NYX 0:85b3fd62ea1a 9 * @attention
NYX 0:85b3fd62ea1a 10 *
NYX 0:85b3fd62ea1a 11 * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
NYX 0:85b3fd62ea1a 12 *
NYX 0:85b3fd62ea1a 13 * Redistribution and use in source and binary forms, with or without modification,
NYX 0:85b3fd62ea1a 14 * are permitted provided that the following conditions are met:
NYX 0:85b3fd62ea1a 15 * 1. Redistributions of source code must retain the above copyright notice,
NYX 0:85b3fd62ea1a 16 * this list of conditions and the following disclaimer.
NYX 0:85b3fd62ea1a 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
NYX 0:85b3fd62ea1a 18 * this list of conditions and the following disclaimer in the documentation
NYX 0:85b3fd62ea1a 19 * and/or other materials provided with the distribution.
NYX 0:85b3fd62ea1a 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
NYX 0:85b3fd62ea1a 21 * may be used to endorse or promote products derived from this software
NYX 0:85b3fd62ea1a 22 * without specific prior written permission.
NYX 0:85b3fd62ea1a 23 *
NYX 0:85b3fd62ea1a 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
NYX 0:85b3fd62ea1a 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
NYX 0:85b3fd62ea1a 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
NYX 0:85b3fd62ea1a 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
NYX 0:85b3fd62ea1a 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
NYX 0:85b3fd62ea1a 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
NYX 0:85b3fd62ea1a 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
NYX 0:85b3fd62ea1a 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
NYX 0:85b3fd62ea1a 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
NYX 0:85b3fd62ea1a 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
NYX 0:85b3fd62ea1a 34 *
NYX 0:85b3fd62ea1a 35 ******************************************************************************
NYX 0:85b3fd62ea1a 36 */
NYX 0:85b3fd62ea1a 37
NYX 0:85b3fd62ea1a 38 /* Define to prevent recursive inclusion -------------------------------------*/
NYX 0:85b3fd62ea1a 39 #ifndef __STM32F4xx_HAL_FMPI2C_EX_H
NYX 0:85b3fd62ea1a 40 #define __STM32F4xx_HAL_FMPI2C_EX_H
NYX 0:85b3fd62ea1a 41
NYX 0:85b3fd62ea1a 42 #ifdef __cplusplus
NYX 0:85b3fd62ea1a 43 extern "C" {
NYX 0:85b3fd62ea1a 44 #endif
NYX 0:85b3fd62ea1a 45
NYX 0:85b3fd62ea1a 46 #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) || defined(STM32F446xx) || defined(STM32F412Zx) ||\
NYX 0:85b3fd62ea1a 47 defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
NYX 0:85b3fd62ea1a 48
NYX 0:85b3fd62ea1a 49 /* Includes ------------------------------------------------------------------*/
NYX 0:85b3fd62ea1a 50 #include "stm32f4xx_hal_def.h"
NYX 0:85b3fd62ea1a 51
NYX 0:85b3fd62ea1a 52 /** @addtogroup STM32F4xx_HAL_Driver
NYX 0:85b3fd62ea1a 53 * @{
NYX 0:85b3fd62ea1a 54 */
NYX 0:85b3fd62ea1a 55
NYX 0:85b3fd62ea1a 56 /** @addtogroup FMPI2CEx
NYX 0:85b3fd62ea1a 57 * @{
NYX 0:85b3fd62ea1a 58 */
NYX 0:85b3fd62ea1a 59
NYX 0:85b3fd62ea1a 60 /* Exported types ------------------------------------------------------------*/
NYX 0:85b3fd62ea1a 61 /* Exported constants --------------------------------------------------------*/
NYX 0:85b3fd62ea1a 62
NYX 0:85b3fd62ea1a 63 /** @defgroup FMPI2CEx_Exported_Constants FMPI2C Extended Exported Constants
NYX 0:85b3fd62ea1a 64 * @{
NYX 0:85b3fd62ea1a 65 */
NYX 0:85b3fd62ea1a 66
NYX 0:85b3fd62ea1a 67 /** @defgroup FMPI2CEx_Analog_Filter FMPI2C Extended Analog Filter
NYX 0:85b3fd62ea1a 68 * @{
NYX 0:85b3fd62ea1a 69 */
NYX 0:85b3fd62ea1a 70 #define FMPI2C_ANALOGFILTER_ENABLE 0x00000000U
NYX 0:85b3fd62ea1a 71 #define FMPI2C_ANALOGFILTER_DISABLE FMPI2C_CR1_ANFOFF
NYX 0:85b3fd62ea1a 72 /**
NYX 0:85b3fd62ea1a 73 * @}
NYX 0:85b3fd62ea1a 74 */
NYX 0:85b3fd62ea1a 75
NYX 0:85b3fd62ea1a 76 /** @defgroup FMPI2CEx_FastModePlus FMPI2C Extended Fast Mode Plus
NYX 0:85b3fd62ea1a 77 * @{
NYX 0:85b3fd62ea1a 78 */
NYX 0:85b3fd62ea1a 79 #define FMPI2C_FASTMODEPLUS_SCL SYSCFG_CFGR_FMPI2C1_SCL /*!< Enable Fast Mode Plus on FMPI2C1 SCL pins */
NYX 0:85b3fd62ea1a 80 #define FMPI2C_FASTMODEPLUS_SDA SYSCFG_CFGR_FMPI2C1_SDA /*!< Enable Fast Mode Plus on FMPI2C1 SDA pins */
NYX 0:85b3fd62ea1a 81 /**
NYX 0:85b3fd62ea1a 82 * @}
NYX 0:85b3fd62ea1a 83 */
NYX 0:85b3fd62ea1a 84
NYX 0:85b3fd62ea1a 85 /**
NYX 0:85b3fd62ea1a 86 * @}
NYX 0:85b3fd62ea1a 87 */
NYX 0:85b3fd62ea1a 88
NYX 0:85b3fd62ea1a 89 /* Exported macro ------------------------------------------------------------*/
NYX 0:85b3fd62ea1a 90 /* Exported functions --------------------------------------------------------*/
NYX 0:85b3fd62ea1a 91
NYX 0:85b3fd62ea1a 92 /** @addtogroup FMPI2CEx_Exported_Functions FMPI2C Extended Exported Functions
NYX 0:85b3fd62ea1a 93 * @{
NYX 0:85b3fd62ea1a 94 */
NYX 0:85b3fd62ea1a 95
NYX 0:85b3fd62ea1a 96 /** @addtogroup FMPI2CEx_Exported_Functions_Group1 Extended features functions
NYX 0:85b3fd62ea1a 97 * @brief Extended features functions
NYX 0:85b3fd62ea1a 98 * @{
NYX 0:85b3fd62ea1a 99 */
NYX 0:85b3fd62ea1a 100
NYX 0:85b3fd62ea1a 101 /* Peripheral Control functions ************************************************/
NYX 0:85b3fd62ea1a 102 HAL_StatusTypeDef HAL_FMPI2CEx_ConfigAnalogFilter(FMPI2C_HandleTypeDef *hfmpi2c, uint32_t AnalogFilter);
NYX 0:85b3fd62ea1a 103 HAL_StatusTypeDef HAL_FMPI2CEx_ConfigDigitalFilter(FMPI2C_HandleTypeDef *hfmpi2c, uint32_t DigitalFilter);
NYX 0:85b3fd62ea1a 104 void HAL_FMPI2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus);
NYX 0:85b3fd62ea1a 105 void HAL_FMPI2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus);
NYX 0:85b3fd62ea1a 106
NYX 0:85b3fd62ea1a 107 /* Private constants ---------------------------------------------------------*/
NYX 0:85b3fd62ea1a 108 /** @defgroup FMPI2CEx_Private_Constants FMPI2C Extended Private Constants
NYX 0:85b3fd62ea1a 109 * @{
NYX 0:85b3fd62ea1a 110 */
NYX 0:85b3fd62ea1a 111
NYX 0:85b3fd62ea1a 112 /**
NYX 0:85b3fd62ea1a 113 * @}
NYX 0:85b3fd62ea1a 114 */
NYX 0:85b3fd62ea1a 115
NYX 0:85b3fd62ea1a 116 /* Private macros ------------------------------------------------------------*/
NYX 0:85b3fd62ea1a 117 /** @defgroup FMPI2CEx_Private_Macro FMPI2C Extended Private Macros
NYX 0:85b3fd62ea1a 118 * @{
NYX 0:85b3fd62ea1a 119 */
NYX 0:85b3fd62ea1a 120 #define IS_FMPI2C_ANALOG_FILTER(FILTER) (((FILTER) == FMPI2C_ANALOGFILTER_ENABLE) || \
NYX 0:85b3fd62ea1a 121 ((FILTER) == FMPI2C_ANALOGFILTER_DISABLE))
NYX 0:85b3fd62ea1a 122
NYX 0:85b3fd62ea1a 123 #define IS_FMPI2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000FU)
NYX 0:85b3fd62ea1a 124
NYX 0:85b3fd62ea1a 125 #define IS_FMPI2C_FASTMODEPLUS(__CONFIG__) ((((__CONFIG__) & (FMPI2C_FASTMODEPLUS_SCL)) == FMPI2C_FASTMODEPLUS_SCL) || \
NYX 0:85b3fd62ea1a 126 (((__CONFIG__) & (FMPI2C_FASTMODEPLUS_SDA)) == FMPI2C_FASTMODEPLUS_SDA))
NYX 0:85b3fd62ea1a 127 /**
NYX 0:85b3fd62ea1a 128 * @}
NYX 0:85b3fd62ea1a 129 */
NYX 0:85b3fd62ea1a 130
NYX 0:85b3fd62ea1a 131 /* Private Functions ---------------------------------------------------------*/
NYX 0:85b3fd62ea1a 132 /** @defgroup FMPI2CEx_Private_Functions FMPI2C Extended Private Functions
NYX 0:85b3fd62ea1a 133 * @{
NYX 0:85b3fd62ea1a 134 */
NYX 0:85b3fd62ea1a 135 /* Private functions are defined in stm32f4xx_hal_fmpi2c_ex.c file */
NYX 0:85b3fd62ea1a 136 /**
NYX 0:85b3fd62ea1a 137 * @}
NYX 0:85b3fd62ea1a 138 */
NYX 0:85b3fd62ea1a 139
NYX 0:85b3fd62ea1a 140 /**
NYX 0:85b3fd62ea1a 141 * @}
NYX 0:85b3fd62ea1a 142 */
NYX 0:85b3fd62ea1a 143
NYX 0:85b3fd62ea1a 144 /**
NYX 0:85b3fd62ea1a 145 * @}
NYX 0:85b3fd62ea1a 146 */
NYX 0:85b3fd62ea1a 147
NYX 0:85b3fd62ea1a 148 /**
NYX 0:85b3fd62ea1a 149 * @}
NYX 0:85b3fd62ea1a 150 */
NYX 0:85b3fd62ea1a 151
NYX 0:85b3fd62ea1a 152 /**
NYX 0:85b3fd62ea1a 153 * @}
NYX 0:85b3fd62ea1a 154 */
NYX 0:85b3fd62ea1a 155 #endif /* STM32F410xx || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx || STM32F413xx || STM32F423xx */
NYX 0:85b3fd62ea1a 156 #ifdef __cplusplus
NYX 0:85b3fd62ea1a 157 }
NYX 0:85b3fd62ea1a 158 #endif
NYX 0:85b3fd62ea1a 159
NYX 0:85b3fd62ea1a 160 #endif /* __STM32F4xx_HAL_FMPI2C_EX_H */
NYX 0:85b3fd62ea1a 161
NYX 0:85b3fd62ea1a 162
NYX 0:85b3fd62ea1a 163 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/