Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
elijahorr
Date:
Thu Apr 14 07:28:54 2016 +0000
Revision:
121:672067c3ada4
Parent:
110:165afa46840b
.

Who changed what in which revision?

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