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.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 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_H
jhon309 0:ac8863619623 40 #define __STM32F0xx_HAL_I2C_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 I2C
jhon309 0:ac8863619623 54 * @{
jhon309 0:ac8863619623 55 */
jhon309 0:ac8863619623 56
jhon309 0:ac8863619623 57 /* Exported types ------------------------------------------------------------*/
jhon309 0:ac8863619623 58 /** @defgroup I2C_Exported_Types I2C Exported Types
jhon309 0:ac8863619623 59 * @{
jhon309 0:ac8863619623 60 */
jhon309 0:ac8863619623 61
jhon309 0:ac8863619623 62 /** @defgroup I2C_Configuration_Structure_definition I2C Configuration Structure definition
jhon309 0:ac8863619623 63 * @brief I2C Configuration Structure definition
jhon309 0:ac8863619623 64 * @{
jhon309 0:ac8863619623 65 */
jhon309 0:ac8863619623 66 typedef struct
jhon309 0:ac8863619623 67 {
jhon309 0:ac8863619623 68 uint32_t Timing; /*!< Specifies the I2C_TIMINGR_register value.
jhon309 0:ac8863619623 69 This parameter calculated by referring to I2C initialization
jhon309 0:ac8863619623 70 section in Reference manual */
jhon309 0:ac8863619623 71
jhon309 0:ac8863619623 72 uint32_t OwnAddress1; /*!< Specifies the first device own address.
jhon309 0:ac8863619623 73 This parameter can be a 7-bit or 10-bit address. */
jhon309 0:ac8863619623 74
jhon309 0:ac8863619623 75 uint32_t AddressingMode; /*!< Specifies if 7-bit or 10-bit addressing mode is selected.
jhon309 0:ac8863619623 76 This parameter can be a value of @ref I2C_addressing_mode */
jhon309 0:ac8863619623 77
jhon309 0:ac8863619623 78 uint32_t DualAddressMode; /*!< Specifies if dual addressing mode is selected.
jhon309 0:ac8863619623 79 This parameter can be a value of @ref I2C_dual_addressing_mode */
jhon309 0:ac8863619623 80
jhon309 0:ac8863619623 81 uint32_t OwnAddress2; /*!< Specifies the second device own address if dual addressing mode is selected
jhon309 0:ac8863619623 82 This parameter can be a 7-bit address. */
jhon309 0:ac8863619623 83
jhon309 0:ac8863619623 84 uint32_t OwnAddress2Masks; /*!< Specifies the acknoledge mask address second device own address if dual addressing mode is selected
jhon309 0:ac8863619623 85 This parameter can be a value of @ref I2C_own_address2_masks. */
jhon309 0:ac8863619623 86
jhon309 0:ac8863619623 87 uint32_t GeneralCallMode; /*!< Specifies if general call mode is selected.
jhon309 0:ac8863619623 88 This parameter can be a value of @ref I2C_general_call_addressing_mode. */
jhon309 0:ac8863619623 89
jhon309 0:ac8863619623 90 uint32_t NoStretchMode; /*!< Specifies if nostretch mode is selected.
jhon309 0:ac8863619623 91 This parameter can be a value of @ref I2C_nostretch_mode */
jhon309 0:ac8863619623 92
jhon309 0:ac8863619623 93 }I2C_InitTypeDef;
jhon309 0:ac8863619623 94
jhon309 0:ac8863619623 95 /**
jhon309 0:ac8863619623 96 * @}
jhon309 0:ac8863619623 97 */
jhon309 0:ac8863619623 98
jhon309 0:ac8863619623 99 /** @defgroup HAL_state_structure_definition HAL state structure definition
jhon309 0:ac8863619623 100 * @brief HAL State structure definition
jhon309 0:ac8863619623 101 * @{
jhon309 0:ac8863619623 102 */
jhon309 0:ac8863619623 103
jhon309 0:ac8863619623 104 typedef enum
jhon309 0:ac8863619623 105 {
jhon309 0:ac8863619623 106 HAL_I2C_STATE_RESET = 0x00, /*!< I2C not yet initialized or disabled */
jhon309 0:ac8863619623 107 HAL_I2C_STATE_READY = 0x01, /*!< I2C initialized and ready for use */
jhon309 0:ac8863619623 108 HAL_I2C_STATE_BUSY = 0x02, /*!< I2C internal process is ongoing */
jhon309 0:ac8863619623 109 HAL_I2C_STATE_MASTER_BUSY_TX = 0x12, /*!< Master Data Transmission process is ongoing */
jhon309 0:ac8863619623 110 HAL_I2C_STATE_MASTER_BUSY_RX = 0x22, /*!< Master Data Reception process is ongoing */
jhon309 0:ac8863619623 111 HAL_I2C_STATE_SLAVE_BUSY_TX = 0x32, /*!< Slave Data Transmission process is ongoing */
jhon309 0:ac8863619623 112 HAL_I2C_STATE_SLAVE_BUSY_RX = 0x42, /*!< Slave Data Reception process is ongoing */
jhon309 0:ac8863619623 113 HAL_I2C_STATE_MEM_BUSY_TX = 0x52, /*!< Memory Data Transmission process is ongoing */
jhon309 0:ac8863619623 114 HAL_I2C_STATE_MEM_BUSY_RX = 0x62, /*!< Memory Data Reception process is ongoing */
jhon309 0:ac8863619623 115 HAL_I2C_STATE_TIMEOUT = 0x03, /*!< Timeout state */
jhon309 0:ac8863619623 116 HAL_I2C_STATE_ERROR = 0x04 /*!< Reception process is ongoing */
jhon309 0:ac8863619623 117
jhon309 0:ac8863619623 118 }HAL_I2C_StateTypeDef;
jhon309 0:ac8863619623 119
jhon309 0:ac8863619623 120 /**
jhon309 0:ac8863619623 121 * @}
jhon309 0:ac8863619623 122 */
jhon309 0:ac8863619623 123
jhon309 0:ac8863619623 124 /** @defgroup I2C_handle_Structure_definition I2C handle Structure definition
jhon309 0:ac8863619623 125 * @brief I2C handle Structure definition
jhon309 0:ac8863619623 126 * @{
jhon309 0:ac8863619623 127 */
jhon309 0:ac8863619623 128
jhon309 0:ac8863619623 129 typedef struct
jhon309 0:ac8863619623 130 {
jhon309 0:ac8863619623 131 I2C_TypeDef *Instance; /*!< I2C registers base address */
jhon309 0:ac8863619623 132
jhon309 0:ac8863619623 133 I2C_InitTypeDef Init; /*!< I2C communication parameters */
jhon309 0:ac8863619623 134
jhon309 0:ac8863619623 135 uint8_t *pBuffPtr; /*!< Pointer to I2C transfer buffer */
jhon309 0:ac8863619623 136
jhon309 0:ac8863619623 137 uint16_t XferSize; /*!< I2C transfer size */
jhon309 0:ac8863619623 138
jhon309 0:ac8863619623 139 __IO uint16_t XferCount; /*!< I2C transfer counter */
jhon309 0:ac8863619623 140
jhon309 0:ac8863619623 141 DMA_HandleTypeDef *hdmatx; /*!< I2C Tx DMA handle parameters */
jhon309 0:ac8863619623 142
jhon309 0:ac8863619623 143 DMA_HandleTypeDef *hdmarx; /*!< I2C Rx DMA handle parameters */
jhon309 0:ac8863619623 144
jhon309 0:ac8863619623 145 HAL_LockTypeDef Lock; /*!< I2C locking object */
jhon309 0:ac8863619623 146
jhon309 0:ac8863619623 147 __IO HAL_I2C_StateTypeDef State; /*!< I2C communication state */
jhon309 0:ac8863619623 148
jhon309 0:ac8863619623 149 __IO uint32_t ErrorCode; /*!< I2C Error code
jhon309 0:ac8863619623 150 This parameter can be a value of @ref I2C_Error */
jhon309 0:ac8863619623 151
jhon309 0:ac8863619623 152 }I2C_HandleTypeDef;
jhon309 0:ac8863619623 153 /**
jhon309 0:ac8863619623 154 * @}
jhon309 0:ac8863619623 155 */
jhon309 0:ac8863619623 156
jhon309 0:ac8863619623 157 /**
jhon309 0:ac8863619623 158 * @}
jhon309 0:ac8863619623 159 */
jhon309 0:ac8863619623 160 /* Exported constants --------------------------------------------------------*/
jhon309 0:ac8863619623 161
jhon309 0:ac8863619623 162 /** @defgroup I2C_Exported_Constants I2C Exported Constants
jhon309 0:ac8863619623 163 * @{
jhon309 0:ac8863619623 164 */
jhon309 0:ac8863619623 165
jhon309 0:ac8863619623 166 /** @defgroup I2C_Error I2C Error
jhon309 0:ac8863619623 167 * @brief I2C Error
jhon309 0:ac8863619623 168 * @{
jhon309 0:ac8863619623 169 */
jhon309 0:ac8863619623 170
jhon309 0:ac8863619623 171 #define HAL_I2C_ERROR_NONE ((uint32_t)0x00000000) /*!< No error */
jhon309 0:ac8863619623 172 #define HAL_I2C_ERROR_BERR ((uint32_t)0x00000001) /*!< BERR error */
jhon309 0:ac8863619623 173 #define HAL_I2C_ERROR_ARLO ((uint32_t)0x00000002) /*!< ARLO error */
jhon309 0:ac8863619623 174 #define HAL_I2C_ERROR_AF ((uint32_t)0x00000004) /*!< AF error */
jhon309 0:ac8863619623 175 #define HAL_I2C_ERROR_OVR ((uint32_t)0x00000008) /*!< OVR error */
jhon309 0:ac8863619623 176 #define HAL_I2C_ERROR_DMA ((uint32_t)0x00000010) /*!< DMA transfer error */
jhon309 0:ac8863619623 177 #define HAL_I2C_ERROR_TIMEOUT ((uint32_t)0x00000020) /*!< Timeout error */
jhon309 0:ac8863619623 178 #define HAL_I2C_ERROR_SIZE ((uint32_t)0x00000040) /*!< Size Management error */
jhon309 0:ac8863619623 179
jhon309 0:ac8863619623 180 /**
jhon309 0:ac8863619623 181 * @}
jhon309 0:ac8863619623 182 */
jhon309 0:ac8863619623 183
jhon309 0:ac8863619623 184
jhon309 0:ac8863619623 185 /** @defgroup I2C_addressing_mode I2C addressing mode
jhon309 0:ac8863619623 186 * @{
jhon309 0:ac8863619623 187 */
jhon309 0:ac8863619623 188 #define I2C_ADDRESSINGMODE_7BIT ((uint32_t)0x00000001)
jhon309 0:ac8863619623 189 #define I2C_ADDRESSINGMODE_10BIT ((uint32_t)0x00000002)
jhon309 0:ac8863619623 190
jhon309 0:ac8863619623 191 #define IS_I2C_ADDRESSING_MODE(MODE) (((MODE) == I2C_ADDRESSINGMODE_7BIT) || \
jhon309 0:ac8863619623 192 ((MODE) == I2C_ADDRESSINGMODE_10BIT))
jhon309 0:ac8863619623 193 /**
jhon309 0:ac8863619623 194 * @}
jhon309 0:ac8863619623 195 */
jhon309 0:ac8863619623 196
jhon309 0:ac8863619623 197 /** @defgroup I2C_dual_addressing_mode I2C dual addressing mode
jhon309 0:ac8863619623 198 * @{
jhon309 0:ac8863619623 199 */
jhon309 0:ac8863619623 200
jhon309 0:ac8863619623 201 #define I2C_DUALADDRESS_DISABLED ((uint32_t)0x00000000)
jhon309 0:ac8863619623 202 #define I2C_DUALADDRESS_ENABLED I2C_OAR2_OA2EN
jhon309 0:ac8863619623 203
jhon309 0:ac8863619623 204 #define IS_I2C_DUAL_ADDRESS(ADDRESS) (((ADDRESS) == I2C_DUALADDRESS_DISABLED) || \
jhon309 0:ac8863619623 205 ((ADDRESS) == I2C_DUALADDRESS_ENABLED))
jhon309 0:ac8863619623 206 /**
jhon309 0:ac8863619623 207 * @}
jhon309 0:ac8863619623 208 */
jhon309 0:ac8863619623 209
jhon309 0:ac8863619623 210 /** @defgroup I2C_own_address2_masks I2C own address2 masks
jhon309 0:ac8863619623 211 * @{
jhon309 0:ac8863619623 212 */
jhon309 0:ac8863619623 213
jhon309 0:ac8863619623 214 #define I2C_OA2_NOMASK ((uint8_t)0x00)
jhon309 0:ac8863619623 215 #define I2C_OA2_MASK01 ((uint8_t)0x01)
jhon309 0:ac8863619623 216 #define I2C_OA2_MASK02 ((uint8_t)0x02)
jhon309 0:ac8863619623 217 #define I2C_OA2_MASK03 ((uint8_t)0x03)
jhon309 0:ac8863619623 218 #define I2C_OA2_MASK04 ((uint8_t)0x04)
jhon309 0:ac8863619623 219 #define I2C_OA2_MASK05 ((uint8_t)0x05)
jhon309 0:ac8863619623 220 #define I2C_OA2_MASK06 ((uint8_t)0x06)
jhon309 0:ac8863619623 221 #define I2C_OA2_MASK07 ((uint8_t)0x07)
jhon309 0:ac8863619623 222
jhon309 0:ac8863619623 223 #define IS_I2C_OWN_ADDRESS2_MASK(MASK) (((MASK) == I2C_OA2_NOMASK) || \
jhon309 0:ac8863619623 224 ((MASK) == I2C_OA2_MASK01) || \
jhon309 0:ac8863619623 225 ((MASK) == I2C_OA2_MASK02) || \
jhon309 0:ac8863619623 226 ((MASK) == I2C_OA2_MASK03) || \
jhon309 0:ac8863619623 227 ((MASK) == I2C_OA2_MASK04) || \
jhon309 0:ac8863619623 228 ((MASK) == I2C_OA2_MASK05) || \
jhon309 0:ac8863619623 229 ((MASK) == I2C_OA2_MASK06) || \
jhon309 0:ac8863619623 230 ((MASK) == I2C_OA2_MASK07))
jhon309 0:ac8863619623 231 /**
jhon309 0:ac8863619623 232 * @}
jhon309 0:ac8863619623 233 */
jhon309 0:ac8863619623 234
jhon309 0:ac8863619623 235 /** @defgroup I2C_general_call_addressing_mode I2C general call addressing mode
jhon309 0:ac8863619623 236 * @{
jhon309 0:ac8863619623 237 */
jhon309 0:ac8863619623 238 #define I2C_GENERALCALL_DISABLED ((uint32_t)0x00000000)
jhon309 0:ac8863619623 239 #define I2C_GENERALCALL_ENABLED I2C_CR1_GCEN
jhon309 0:ac8863619623 240
jhon309 0:ac8863619623 241 #define IS_I2C_GENERAL_CALL(CALL) (((CALL) == I2C_GENERALCALL_DISABLED) || \
jhon309 0:ac8863619623 242 ((CALL) == I2C_GENERALCALL_ENABLED))
jhon309 0:ac8863619623 243 /**
jhon309 0:ac8863619623 244 * @}
jhon309 0:ac8863619623 245 */
jhon309 0:ac8863619623 246
jhon309 0:ac8863619623 247 /** @defgroup I2C_nostretch_mode I2C nostretch mode
jhon309 0:ac8863619623 248 * @{
jhon309 0:ac8863619623 249 */
jhon309 0:ac8863619623 250 #define I2C_NOSTRETCH_DISABLED ((uint32_t)0x00000000)
jhon309 0:ac8863619623 251 #define I2C_NOSTRETCH_ENABLED I2C_CR1_NOSTRETCH
jhon309 0:ac8863619623 252
jhon309 0:ac8863619623 253 #define IS_I2C_NO_STRETCH(STRETCH) (((STRETCH) == I2C_NOSTRETCH_DISABLED) || \
jhon309 0:ac8863619623 254 ((STRETCH) == I2C_NOSTRETCH_ENABLED))
jhon309 0:ac8863619623 255 /**
jhon309 0:ac8863619623 256 * @}
jhon309 0:ac8863619623 257 */
jhon309 0:ac8863619623 258
jhon309 0:ac8863619623 259 /** @defgroup I2C_Memory_Address_Size I2C Memory Address Size
jhon309 0:ac8863619623 260 * @{
jhon309 0:ac8863619623 261 */
jhon309 0:ac8863619623 262 #define I2C_MEMADD_SIZE_8BIT ((uint32_t)0x00000001)
jhon309 0:ac8863619623 263 #define I2C_MEMADD_SIZE_16BIT ((uint32_t)0x00000002)
jhon309 0:ac8863619623 264
jhon309 0:ac8863619623 265 #define IS_I2C_MEMADD_SIZE(SIZE) (((SIZE) == I2C_MEMADD_SIZE_8BIT) || \
jhon309 0:ac8863619623 266 ((SIZE) == I2C_MEMADD_SIZE_16BIT))
jhon309 0:ac8863619623 267 /**
jhon309 0:ac8863619623 268 * @}
jhon309 0:ac8863619623 269 */
jhon309 0:ac8863619623 270
jhon309 0:ac8863619623 271 /** @defgroup I2C_ReloadEndMode_definition I2C ReloadEndMode definition
jhon309 0:ac8863619623 272 * @{
jhon309 0:ac8863619623 273 */
jhon309 0:ac8863619623 274
jhon309 0:ac8863619623 275 #define I2C_RELOAD_MODE I2C_CR2_RELOAD
jhon309 0:ac8863619623 276 #define I2C_AUTOEND_MODE I2C_CR2_AUTOEND
jhon309 0:ac8863619623 277 #define I2C_SOFTEND_MODE ((uint32_t)0x00000000)
jhon309 0:ac8863619623 278
jhon309 0:ac8863619623 279 #define IS_TRANSFER_MODE(MODE) (((MODE) == I2C_RELOAD_MODE) || \
jhon309 0:ac8863619623 280 ((MODE) == I2C_AUTOEND_MODE) || \
jhon309 0:ac8863619623 281 ((MODE) == I2C_SOFTEND_MODE))
jhon309 0:ac8863619623 282 /**
jhon309 0:ac8863619623 283 * @}
jhon309 0:ac8863619623 284 */
jhon309 0:ac8863619623 285
jhon309 0:ac8863619623 286 /** @defgroup I2C_StartStopMode_definition I2C StartStopMode definition
jhon309 0:ac8863619623 287 * @{
jhon309 0:ac8863619623 288 */
jhon309 0:ac8863619623 289
jhon309 0:ac8863619623 290 #define I2C_NO_STARTSTOP ((uint32_t)0x00000000)
jhon309 0:ac8863619623 291 #define I2C_GENERATE_STOP I2C_CR2_STOP
jhon309 0:ac8863619623 292 #define I2C_GENERATE_START_READ (uint32_t)(I2C_CR2_START | I2C_CR2_RD_WRN)
jhon309 0:ac8863619623 293 #define I2C_GENERATE_START_WRITE I2C_CR2_START
jhon309 0:ac8863619623 294
jhon309 0:ac8863619623 295 #define IS_TRANSFER_REQUEST(REQUEST) (((REQUEST) == I2C_GENERATE_STOP) || \
jhon309 0:ac8863619623 296 ((REQUEST) == I2C_GENERATE_START_READ) || \
jhon309 0:ac8863619623 297 ((REQUEST) == I2C_GENERATE_START_WRITE) || \
jhon309 0:ac8863619623 298 ((REQUEST) == I2C_NO_STARTSTOP))
jhon309 0:ac8863619623 299
jhon309 0:ac8863619623 300 /**
jhon309 0:ac8863619623 301 * @}
jhon309 0:ac8863619623 302 */
jhon309 0:ac8863619623 303
jhon309 0:ac8863619623 304 /** @defgroup I2C_Interrupt_configuration_definition I2C Interrupt configuration definition
jhon309 0:ac8863619623 305 * @brief I2C Interrupt definition
jhon309 0:ac8863619623 306 * Elements values convention: 0xXXXXXXXX
jhon309 0:ac8863619623 307 * - XXXXXXXX : Interrupt control mask
jhon309 0:ac8863619623 308 * @{
jhon309 0:ac8863619623 309 */
jhon309 0:ac8863619623 310 #define I2C_IT_ERRI I2C_CR1_ERRIE
jhon309 0:ac8863619623 311 #define I2C_IT_TCI I2C_CR1_TCIE
jhon309 0:ac8863619623 312 #define I2C_IT_STOPI I2C_CR1_STOPIE
jhon309 0:ac8863619623 313 #define I2C_IT_NACKI I2C_CR1_NACKIE
jhon309 0:ac8863619623 314 #define I2C_IT_ADDRI I2C_CR1_ADDRIE
jhon309 0:ac8863619623 315 #define I2C_IT_RXI I2C_CR1_RXIE
jhon309 0:ac8863619623 316 #define I2C_IT_TXI I2C_CR1_TXIE
jhon309 0:ac8863619623 317
jhon309 0:ac8863619623 318 /**
jhon309 0:ac8863619623 319 * @}
jhon309 0:ac8863619623 320 */
jhon309 0:ac8863619623 321
jhon309 0:ac8863619623 322
jhon309 0:ac8863619623 323 /** @defgroup I2C_Flag_definition I2C Flag definition
jhon309 0:ac8863619623 324 * @{
jhon309 0:ac8863619623 325 */
jhon309 0:ac8863619623 326
jhon309 0:ac8863619623 327 #define I2C_FLAG_TXE I2C_ISR_TXE
jhon309 0:ac8863619623 328 #define I2C_FLAG_TXIS I2C_ISR_TXIS
jhon309 0:ac8863619623 329 #define I2C_FLAG_RXNE I2C_ISR_RXNE
jhon309 0:ac8863619623 330 #define I2C_FLAG_ADDR I2C_ISR_ADDR
jhon309 0:ac8863619623 331 #define I2C_FLAG_AF I2C_ISR_NACKF
jhon309 0:ac8863619623 332 #define I2C_FLAG_STOPF I2C_ISR_STOPF
jhon309 0:ac8863619623 333 #define I2C_FLAG_TC I2C_ISR_TC
jhon309 0:ac8863619623 334 #define I2C_FLAG_TCR I2C_ISR_TCR
jhon309 0:ac8863619623 335 #define I2C_FLAG_BERR I2C_ISR_BERR
jhon309 0:ac8863619623 336 #define I2C_FLAG_ARLO I2C_ISR_ARLO
jhon309 0:ac8863619623 337 #define I2C_FLAG_OVR I2C_ISR_OVR
jhon309 0:ac8863619623 338 #define I2C_FLAG_PECERR I2C_ISR_PECERR
jhon309 0:ac8863619623 339 #define I2C_FLAG_TIMEOUT I2C_ISR_TIMEOUT
jhon309 0:ac8863619623 340 #define I2C_FLAG_ALERT I2C_ISR_ALERT
jhon309 0:ac8863619623 341 #define I2C_FLAG_BUSY I2C_ISR_BUSY
jhon309 0:ac8863619623 342 #define I2C_FLAG_DIR I2C_ISR_DIR
jhon309 0:ac8863619623 343 /**
jhon309 0:ac8863619623 344 * @}
jhon309 0:ac8863619623 345 */
jhon309 0:ac8863619623 346
jhon309 0:ac8863619623 347 /**
jhon309 0:ac8863619623 348 * @}
jhon309 0:ac8863619623 349 */
jhon309 0:ac8863619623 350
jhon309 0:ac8863619623 351 /* Exported macros -----------------------------------------------------------*/
jhon309 0:ac8863619623 352
jhon309 0:ac8863619623 353 /** @defgroup I2C_Exported_Macros I2C Exported Macros
jhon309 0:ac8863619623 354 * @{
jhon309 0:ac8863619623 355 */
jhon309 0:ac8863619623 356
jhon309 0:ac8863619623 357 /** @brief Reset I2C handle state
jhon309 0:ac8863619623 358 * @param __HANDLE__: I2C handle.
jhon309 0:ac8863619623 359 * @retval None
jhon309 0:ac8863619623 360 */
jhon309 0:ac8863619623 361 #define __HAL_I2C_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_I2C_STATE_RESET)
jhon309 0:ac8863619623 362
jhon309 0:ac8863619623 363 /** @brief Enables or disables the specified I2C interrupts.
jhon309 0:ac8863619623 364 * @param __HANDLE__: specifies the I2C Handle.
jhon309 0:ac8863619623 365 * This parameter can be I2Cx where x: 1 or 2 to select the I2C peripheral.
jhon309 0:ac8863619623 366 * @param __INTERRUPT__: specifies the interrupt source to enable or disable.
jhon309 0:ac8863619623 367 * This parameter can be one of the following values:
jhon309 0:ac8863619623 368 * @arg I2C_IT_ERRI: Errors interrupt enable
jhon309 0:ac8863619623 369 * @arg I2C_IT_TCI: Transfer complete interrupt enable
jhon309 0:ac8863619623 370 * @arg I2C_IT_STOPI: STOP detection interrupt enable
jhon309 0:ac8863619623 371 * @arg I2C_IT_NACKI: NACK received interrupt enable
jhon309 0:ac8863619623 372 * @arg I2C_IT_ADDRI: Address match interrupt enable
jhon309 0:ac8863619623 373 * @arg I2C_IT_RXI: RX interrupt enable
jhon309 0:ac8863619623 374 * @arg I2C_IT_TXI: TX interrupt enable
jhon309 0:ac8863619623 375 *
jhon309 0:ac8863619623 376 * @retval None
jhon309 0:ac8863619623 377 */
jhon309 0:ac8863619623 378
jhon309 0:ac8863619623 379 #define __HAL_I2C_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR1 |= (__INTERRUPT__))
jhon309 0:ac8863619623 380 #define __HAL_I2C_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR1 &= (~(__INTERRUPT__)))
jhon309 0:ac8863619623 381
jhon309 0:ac8863619623 382 /** @brief Checks if the specified I2C interrupt source is enabled or disabled.
jhon309 0:ac8863619623 383 * @param __HANDLE__: specifies the I2C Handle.
jhon309 0:ac8863619623 384 * This parameter can be I2Cx where x: 1 or 2 to select the I2C peripheral.
jhon309 0:ac8863619623 385 * @param __INTERRUPT__: specifies the I2C interrupt source to check.
jhon309 0:ac8863619623 386 * This parameter can be one of the following values:
jhon309 0:ac8863619623 387 * @arg I2C_IT_ERRI: Errors interrupt enable
jhon309 0:ac8863619623 388 * @arg I2C_IT_TCI: Transfer complete interrupt enable
jhon309 0:ac8863619623 389 * @arg I2C_IT_STOPI: STOP detection interrupt enable
jhon309 0:ac8863619623 390 * @arg I2C_IT_NACKI: NACK received interrupt enable
jhon309 0:ac8863619623 391 * @arg I2C_IT_ADDRI: Address match interrupt enable
jhon309 0:ac8863619623 392 * @arg I2C_IT_RXI: RX interrupt enable
jhon309 0:ac8863619623 393 * @arg I2C_IT_TXI: TX interrupt enable
jhon309 0:ac8863619623 394 *
jhon309 0:ac8863619623 395 * @retval The new state of __IT__ (TRUE or FALSE).
jhon309 0:ac8863619623 396 */
jhon309 0:ac8863619623 397 #define __HAL_I2C_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CR1 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
jhon309 0:ac8863619623 398
jhon309 0:ac8863619623 399 /** @brief Checks whether the specified I2C flag is set or not.
jhon309 0:ac8863619623 400 * @param __HANDLE__: specifies the I2C Handle.
jhon309 0:ac8863619623 401 * This parameter can be I2Cx where x: 1 or 2 to select the I2C peripheral.
jhon309 0:ac8863619623 402 * @param __FLAG__: specifies the flag to check.
jhon309 0:ac8863619623 403 * This parameter can be one of the following values:
jhon309 0:ac8863619623 404 * @arg I2C_FLAG_TXE: Transmit data register empty
jhon309 0:ac8863619623 405 * @arg I2C_FLAG_TXIS: Transmit interrupt status
jhon309 0:ac8863619623 406 * @arg I2C_FLAG_RXNE: Receive data register not empty
jhon309 0:ac8863619623 407 * @arg I2C_FLAG_ADDR: Address matched (slave mode)
jhon309 0:ac8863619623 408 * @arg I2C_FLAG_AF: Acknowledge failure received flag
jhon309 0:ac8863619623 409 * @arg I2C_FLAG_STOPF: STOP detection flag
jhon309 0:ac8863619623 410 * @arg I2C_FLAG_TC: Transfer complete (master mode)
jhon309 0:ac8863619623 411 * @arg I2C_FLAG_TCR: Transfer complete reload
jhon309 0:ac8863619623 412 * @arg I2C_FLAG_BERR: Bus error
jhon309 0:ac8863619623 413 * @arg I2C_FLAG_ARLO: Arbitration lost
jhon309 0:ac8863619623 414 * @arg I2C_FLAG_OVR: Overrun/Underrun
jhon309 0:ac8863619623 415 * @arg I2C_FLAG_PECERR: PEC error in reception
jhon309 0:ac8863619623 416 * @arg I2C_FLAG_TIMEOUT: Timeout or Tlow detection flag
jhon309 0:ac8863619623 417 * @arg I2C_FLAG_ALERT: SMBus alert
jhon309 0:ac8863619623 418 * @arg I2C_FLAG_BUSY: Bus busy
jhon309 0:ac8863619623 419 * @arg I2C_FLAG_DIR: Transfer direction (slave mode)
jhon309 0:ac8863619623 420 *
jhon309 0:ac8863619623 421 * @retval The new state of __FLAG__ (TRUE or FALSE).
jhon309 0:ac8863619623 422 */
jhon309 0:ac8863619623 423 #define __HAL_I2C_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->ISR) & (__FLAG__)) == (__FLAG__))
jhon309 0:ac8863619623 424
jhon309 0:ac8863619623 425 /** @brief Clears the I2C pending flags which are cleared by writing 1 in a specific bit.
jhon309 0:ac8863619623 426 * @param __HANDLE__: specifies the I2C Handle.
jhon309 0:ac8863619623 427 * This parameter can be I2Cx where x: 1 or 2 to select the I2C peripheral.
jhon309 0:ac8863619623 428 * @param __FLAG__: specifies the flag to clear.
jhon309 0:ac8863619623 429 * This parameter can be any combination of the following values:
jhon309 0:ac8863619623 430 * @arg I2C_FLAG_ADDR: Address matched (slave mode)
jhon309 0:ac8863619623 431 * @arg I2C_FLAG_AF: Acknowledge failure flag
jhon309 0:ac8863619623 432 * @arg I2C_FLAG_STOPF: STOP detection flag
jhon309 0:ac8863619623 433 * @arg I2C_FLAG_BERR: Bus error
jhon309 0:ac8863619623 434 * @arg I2C_FLAG_ARLO: Arbitration lost
jhon309 0:ac8863619623 435 * @arg I2C_FLAG_OVR: Overrun/Underrun
jhon309 0:ac8863619623 436 * @arg I2C_FLAG_PECERR: PEC error in reception
jhon309 0:ac8863619623 437 * @arg I2C_FLAG_TIMEOUT: Timeout or Tlow detection flag
jhon309 0:ac8863619623 438 * @arg I2C_FLAG_ALERT: SMBus alert
jhon309 0:ac8863619623 439 *
jhon309 0:ac8863619623 440 * @retval None
jhon309 0:ac8863619623 441 */
jhon309 0:ac8863619623 442 #define __HAL_I2C_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))
jhon309 0:ac8863619623 443
jhon309 0:ac8863619623 444
jhon309 0:ac8863619623 445 #define __HAL_I2C_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= I2C_CR1_PE)
jhon309 0:ac8863619623 446 #define __HAL_I2C_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~I2C_CR1_PE)
jhon309 0:ac8863619623 447
jhon309 0:ac8863619623 448 #define __HAL_I2C_RESET_CR2(__HANDLE__) ((__HANDLE__)->Instance->CR2 &= (uint32_t)~((uint32_t)(I2C_CR2_SADD | I2C_CR2_HEAD10R | I2C_CR2_NBYTES | I2C_CR2_RELOAD | I2C_CR2_RD_WRN)))
jhon309 0:ac8863619623 449
jhon309 0:ac8863619623 450 #define __HAL_I2C_MEM_ADD_MSB(__ADDRESS__) ((uint8_t)((uint16_t)(((uint16_t)((__ADDRESS__) & (uint16_t)(0xFF00))) >> 8)))
jhon309 0:ac8863619623 451 #define __HAL_I2C_MEM_ADD_LSB(__ADDRESS__) ((uint8_t)((uint16_t)((__ADDRESS__) & (uint16_t)(0x00FF))))
jhon309 0:ac8863619623 452
jhon309 0:ac8863619623 453 #define __HAL_I2C_GENERATE_START(__ADDMODE__,__ADDRESS__) (((__ADDMODE__) == I2C_ADDRESSINGMODE_7BIT) ? (uint32_t)((((uint32_t)(__ADDRESS__) & (I2C_CR2_SADD)) | (I2C_CR2_START) | (I2C_CR2_AUTOEND)) & (~I2C_CR2_RD_WRN)) : \
jhon309 0:ac8863619623 454 (uint32_t)((((uint32_t)(__ADDRESS__) & (I2C_CR2_SADD)) | (I2C_CR2_ADD10) | (I2C_CR2_START)) & (~I2C_CR2_RD_WRN)))
jhon309 0:ac8863619623 455
jhon309 0:ac8863619623 456 #define IS_I2C_OWN_ADDRESS1(ADDRESS1) ((ADDRESS1) <= (uint32_t)0x000003FF)
jhon309 0:ac8863619623 457 #define IS_I2C_OWN_ADDRESS2(ADDRESS2) ((ADDRESS2) <= (uint16_t)0x00FF)
jhon309 0:ac8863619623 458 /**
jhon309 0:ac8863619623 459 * @}
jhon309 0:ac8863619623 460 */
jhon309 0:ac8863619623 461
jhon309 0:ac8863619623 462 /* Include I2C HAL Extended module */
jhon309 0:ac8863619623 463 #include "stm32f0xx_hal_i2c_ex.h"
jhon309 0:ac8863619623 464
jhon309 0:ac8863619623 465 /* Exported functions --------------------------------------------------------*/
jhon309 0:ac8863619623 466 /** @addtogroup I2C_Exported_Functions
jhon309 0:ac8863619623 467 * @{
jhon309 0:ac8863619623 468 */
jhon309 0:ac8863619623 469
jhon309 0:ac8863619623 470 /** @addtogroup I2C_Exported_Functions_Group1 Initialization and de-initialization functions
jhon309 0:ac8863619623 471 * @{
jhon309 0:ac8863619623 472 */
jhon309 0:ac8863619623 473
jhon309 0:ac8863619623 474 /* Initialization/de-initialization functions **********************************/
jhon309 0:ac8863619623 475 HAL_StatusTypeDef HAL_I2C_Init(I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 476 HAL_StatusTypeDef HAL_I2C_DeInit (I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 477 void HAL_I2C_MspInit(I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 478 void HAL_I2C_MspDeInit(I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 479
jhon309 0:ac8863619623 480 /**
jhon309 0:ac8863619623 481 * @}
jhon309 0:ac8863619623 482 */
jhon309 0:ac8863619623 483
jhon309 0:ac8863619623 484 /** @addtogroup I2C_Exported_Functions_Group2 Input and Output operation functions
jhon309 0:ac8863619623 485 * @{
jhon309 0:ac8863619623 486 */
jhon309 0:ac8863619623 487
jhon309 0:ac8863619623 488 /* IO operation functions *****************************************************/
jhon309 0:ac8863619623 489
jhon309 0:ac8863619623 490 /******* Blocking mode: Polling */
jhon309 0:ac8863619623 491 HAL_StatusTypeDef HAL_I2C_Master_Transmit(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size, uint32_t Timeout);
jhon309 0:ac8863619623 492 HAL_StatusTypeDef HAL_I2C_Master_Receive(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size, uint32_t Timeout);
jhon309 0:ac8863619623 493 HAL_StatusTypeDef HAL_I2C_Slave_Transmit(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, uint32_t Timeout);
jhon309 0:ac8863619623 494 HAL_StatusTypeDef HAL_I2C_Slave_Receive(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, uint32_t Timeout);
jhon309 0:ac8863619623 495 HAL_StatusTypeDef HAL_I2C_Mem_Write(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout);
jhon309 0:ac8863619623 496 HAL_StatusTypeDef HAL_I2C_Mem_Read(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout);
jhon309 0:ac8863619623 497 HAL_StatusTypeDef HAL_I2C_IsDeviceReady(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint32_t Trials, uint32_t Timeout);
jhon309 0:ac8863619623 498
jhon309 0:ac8863619623 499 /******* Non-Blocking mode: Interrupt */
jhon309 0:ac8863619623 500 HAL_StatusTypeDef HAL_I2C_Master_Transmit_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size);
jhon309 0:ac8863619623 501 HAL_StatusTypeDef HAL_I2C_Master_Receive_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size);
jhon309 0:ac8863619623 502 HAL_StatusTypeDef HAL_I2C_Slave_Transmit_IT(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size);
jhon309 0:ac8863619623 503 HAL_StatusTypeDef HAL_I2C_Slave_Receive_IT(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size);
jhon309 0:ac8863619623 504 HAL_StatusTypeDef HAL_I2C_Mem_Write_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size);
jhon309 0:ac8863619623 505 HAL_StatusTypeDef HAL_I2C_Mem_Read_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size);
jhon309 0:ac8863619623 506
jhon309 0:ac8863619623 507 /******* Non-Blocking mode: DMA */
jhon309 0:ac8863619623 508 HAL_StatusTypeDef HAL_I2C_Master_Transmit_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size);
jhon309 0:ac8863619623 509 HAL_StatusTypeDef HAL_I2C_Master_Receive_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size);
jhon309 0:ac8863619623 510 HAL_StatusTypeDef HAL_I2C_Slave_Transmit_DMA(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size);
jhon309 0:ac8863619623 511 HAL_StatusTypeDef HAL_I2C_Slave_Receive_DMA(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size);
jhon309 0:ac8863619623 512 HAL_StatusTypeDef HAL_I2C_Mem_Write_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size);
jhon309 0:ac8863619623 513 HAL_StatusTypeDef HAL_I2C_Mem_Read_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size);
jhon309 0:ac8863619623 514
jhon309 0:ac8863619623 515 /******* I2C IRQHandler and Callbacks used in non blocking modes (Interrupt and DMA) */
jhon309 0:ac8863619623 516 void HAL_I2C_EV_IRQHandler(I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 517 void HAL_I2C_ER_IRQHandler(I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 518 void HAL_I2C_MasterTxCpltCallback(I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 519 void HAL_I2C_MasterRxCpltCallback(I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 520 void HAL_I2C_SlaveTxCpltCallback(I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 521 void HAL_I2C_SlaveRxCpltCallback(I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 522 void HAL_I2C_MemTxCpltCallback(I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 523 void HAL_I2C_MemRxCpltCallback(I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 524 void HAL_I2C_ErrorCallback(I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 525
jhon309 0:ac8863619623 526 /**
jhon309 0:ac8863619623 527 * @}
jhon309 0:ac8863619623 528 */
jhon309 0:ac8863619623 529
jhon309 0:ac8863619623 530 /** @addtogroup I2C_Exported_Functions_Group3 Peripheral State and Errors functions
jhon309 0:ac8863619623 531 * @{
jhon309 0:ac8863619623 532 */
jhon309 0:ac8863619623 533
jhon309 0:ac8863619623 534 /* Peripheral State and Errors functions **************************************/
jhon309 0:ac8863619623 535 HAL_I2C_StateTypeDef HAL_I2C_GetState(I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 536 uint32_t HAL_I2C_GetError(I2C_HandleTypeDef *hi2c);
jhon309 0:ac8863619623 537
jhon309 0:ac8863619623 538 /**
jhon309 0:ac8863619623 539 * @}
jhon309 0:ac8863619623 540 */
jhon309 0:ac8863619623 541
jhon309 0:ac8863619623 542 /**
jhon309 0:ac8863619623 543 * @}
jhon309 0:ac8863619623 544 */
jhon309 0:ac8863619623 545
jhon309 0:ac8863619623 546 /**
jhon309 0:ac8863619623 547 * @}
jhon309 0:ac8863619623 548 */
jhon309 0:ac8863619623 549
jhon309 0:ac8863619623 550 /**
jhon309 0:ac8863619623 551 * @}
jhon309 0:ac8863619623 552 */
jhon309 0:ac8863619623 553
jhon309 0:ac8863619623 554 #ifdef __cplusplus
jhon309 0:ac8863619623 555 }
jhon309 0:ac8863619623 556 #endif
jhon309 0:ac8863619623 557
jhon309 0:ac8863619623 558
jhon309 0:ac8863619623 559 #endif /* __STM32F0xx_HAL_I2C_H */
jhon309 0:ac8863619623 560
jhon309 0:ac8863619623 561 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
jhon309 0:ac8863619623 562