I2C_EEPROM

Committer:
jhon309
Date:
Thu Aug 13 00:23:16 2015 +0000
Revision:
0:ac8863619623
I2C

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jhon309 0:ac8863619623 1 /**
jhon309 0:ac8863619623 2 ******************************************************************************
jhon309 0:ac8863619623 3 * @file stm32f0xx_hal_i2c_ex.h
jhon309 0:ac8863619623 4 * @author MCD Application Team
jhon309 0:ac8863619623 5 * @version V1.2.0
jhon309 0:ac8863619623 6 * @date 11-December-2014
jhon309 0:ac8863619623 7 * @brief Header file of I2C HAL Extension module.
jhon309 0:ac8863619623 8 ******************************************************************************
jhon309 0:ac8863619623 9 * @attention
jhon309 0:ac8863619623 10 *
jhon309 0:ac8863619623 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
jhon309 0:ac8863619623 12 *
jhon309 0:ac8863619623 13 * Redistribution and use in source and binary forms, with or without modification,
jhon309 0:ac8863619623 14 * are permitted provided that the following conditions are met:
jhon309 0:ac8863619623 15 * 1. Redistributions of source code must retain the above copyright notice,
jhon309 0:ac8863619623 16 * this list of conditions and the following disclaimer.
jhon309 0:ac8863619623 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
jhon309 0:ac8863619623 18 * this list of conditions and the following disclaimer in the documentation
jhon309 0:ac8863619623 19 * and/or other materials provided with the distribution.
jhon309 0:ac8863619623 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
jhon309 0:ac8863619623 21 * may be used to endorse or promote products derived from this software
jhon309 0:ac8863619623 22 * without specific prior written permission.
jhon309 0:ac8863619623 23 *
jhon309 0:ac8863619623 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
jhon309 0:ac8863619623 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
jhon309 0:ac8863619623 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
jhon309 0:ac8863619623 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
jhon309 0:ac8863619623 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
jhon309 0:ac8863619623 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
jhon309 0:ac8863619623 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
jhon309 0:ac8863619623 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
jhon309 0:ac8863619623 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
jhon309 0:ac8863619623 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
jhon309 0:ac8863619623 34 *
jhon309 0:ac8863619623 35 ******************************************************************************
jhon309 0:ac8863619623 36 */
jhon309 0:ac8863619623 37
jhon309 0:ac8863619623 38 /* Define to prevent recursive inclusion -------------------------------------*/
jhon309 0:ac8863619623 39 #ifndef __STM32F0xx_HAL_I2C_EX_H
jhon309 0:ac8863619623 40 #define __STM32F0xx_HAL_I2C_EX_H
jhon309 0:ac8863619623 41
jhon309 0:ac8863619623 42 #ifdef __cplusplus
jhon309 0:ac8863619623 43 extern "C" {
jhon309 0:ac8863619623 44 #endif
jhon309 0:ac8863619623 45
jhon309 0:ac8863619623 46 /* Includes ------------------------------------------------------------------*/
jhon309 0:ac8863619623 47 #include "stm32f0xx_hal_def.h"
jhon309 0:ac8863619623 48
jhon309 0:ac8863619623 49 /** @addtogroup STM32F0xx_HAL_Driver
jhon309 0:ac8863619623 50 * @{
jhon309 0:ac8863619623 51 */
jhon309 0:ac8863619623 52
jhon309 0:ac8863619623 53 /** @addtogroup I2CEx I2CEx Extended HAL module driver
jhon309 0:ac8863619623 54 * @{
jhon309 0:ac8863619623 55 */
jhon309 0:ac8863619623 56
jhon309 0:ac8863619623 57 /* Exported types ------------------------------------------------------------*/
jhon309 0:ac8863619623 58 /* Exported constants --------------------------------------------------------*/
jhon309 0:ac8863619623 59
jhon309 0:ac8863619623 60 /** @defgroup I2CEx_Exported_Constants I2CEx Exported Constants
jhon309 0:ac8863619623 61 * @{
jhon309 0:ac8863619623 62 */
jhon309 0:ac8863619623 63
jhon309 0:ac8863619623 64 /** @defgroup I2CEx_Analog_Filter I2CEx Analog Filter
jhon309 0:ac8863619623 65 * @{
jhon309 0:ac8863619623 66 */
jhon309 0:ac8863619623 67 #define I2C_ANALOGFILTER_ENABLED ((uint32_t)0x00000000)
jhon309 0:ac8863619623 68 #define I2C_ANALOGFILTER_DISABLED I2C_CR1_ANFOFF
jhon309 0:ac8863619623 69
jhon309 0:ac8863619623 70 #define IS_I2C_ANALOG_FILTER(FILTER) (((FILTER) == I2C_ANALOGFILTER_ENABLED) || \
jhon309 0:ac8863619623 71 ((FILTER) == I2C_ANALOGFILTER_DISABLED))
jhon309 0:ac8863619623 72 /**
jhon309 0:ac8863619623 73 * @}
jhon309 0:ac8863619623 74 */
jhon309 0:ac8863619623 75
jhon309 0:ac8863619623 76 /** @defgroup I2CEx_Digital_Filter I2CEx Digital Filter
jhon309 0:ac8863619623 77 * @{
jhon309 0:ac8863619623 78 */
jhon309 0:ac8863619623 79 #define IS_I2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000F)
jhon309 0:ac8863619623 80 /**
jhon309 0:ac8863619623 81 * @}
jhon309 0:ac8863619623 82 */
jhon309 0:ac8863619623 83
jhon309 0:ac8863619623 84 /**
jhon309 0:ac8863619623 85 * @}
jhon309 0:ac8863619623 86 */
jhon309 0:ac8863619623 87
jhon309 0:ac8863619623 88 /* Exported macro ------------------------------------------------------------*/
jhon309 0:ac8863619623 89 /* Exported functions --------------------------------------------------------*/
jhon309 0:ac8863619623 90
jhon309 0:ac8863619623 91 /** @addtogroup I2CEx_Exported_Functions
jhon309 0:ac8863619623 92 * @{
jhon309 0:ac8863619623 93 */
jhon309 0:ac8863619623 94
jhon309 0:ac8863619623 95 /** @addtogroup I2CEx_Exported_Functions_Group1 Extended features functions
jhon309 0:ac8863619623 96 * @brief Extended features functions
jhon309 0:ac8863619623 97 * @{
jhon309 0:ac8863619623 98 */
jhon309 0:ac8863619623 99
jhon309 0:ac8863619623 100 /* Peripheral Control functions ************************************************/
jhon309 0:ac8863619623 101 HAL_StatusTypeDef HAL_I2CEx_AnalogFilter_Config(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter);
jhon309 0:ac8863619623 102 HAL_StatusTypeDef HAL_I2CEx_DigitalFilter_Config(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter);
jhon309 0:ac8863619623 103 #if !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC)
jhon309 0:ac8863619623 104 HAL_StatusTypeDef HAL_I2CEx_EnableWakeUp (I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 105 HAL_StatusTypeDef HAL_I2CEx_DisableWakeUp (I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 106 #endif /* !(STM32F030x6) && !(STM32F030x8) && !(STM32F070x6) && !(STM32F070xB) && !(STM32F030xC) */
jhon309 0:ac8863619623 107
jhon309 0:ac8863619623 108 /**
jhon309 0:ac8863619623 109 * @}
jhon309 0:ac8863619623 110 */
jhon309 0:ac8863619623 111
jhon309 0:ac8863619623 112 /**
jhon309 0:ac8863619623 113 * @}
jhon309 0:ac8863619623 114 */
jhon309 0:ac8863619623 115
jhon309 0:ac8863619623 116 /**
jhon309 0:ac8863619623 117 * @}
jhon309 0:ac8863619623 118 */
jhon309 0:ac8863619623 119
jhon309 0:ac8863619623 120 /**
jhon309 0:ac8863619623 121 * @}
jhon309 0:ac8863619623 122 */
jhon309 0:ac8863619623 123
jhon309 0:ac8863619623 124 #ifdef __cplusplus
jhon309 0:ac8863619623 125 }
jhon309 0:ac8863619623 126 #endif
jhon309 0:ac8863619623 127
jhon309 0:ac8863619623 128 #endif /* __STM32F0xx_HAL_I2C_EX_H */
jhon309 0:ac8863619623 129
jhon309 0:ac8863619623 130
jhon309 0:ac8863619623 131 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
jhon309 0:ac8863619623 132