stm32f4xx_fmpi2c.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. /**
  2. ******************************************************************************
  3. * @file stm32f4xx_fmpi2c.h
  4. * @author MCD Application Team
  5. * @version V1.8.1
  6. * @date 27-January-2022
  7. * @brief This file contains all the functions prototypes for the I2C Fast Mode
  8. * Plus firmware library.
  9. ******************************************************************************
  10. * @attention
  11. *
  12. * Copyright (c) 2016 STMicroelectronics.
  13. * All rights reserved.
  14. *
  15. * This software is licensed under terms that can be found in the LICENSE file
  16. * in the root directory of this software component.
  17. * If no LICENSE file comes with this software, it is provided AS-IS.
  18. *
  19. ******************************************************************************
  20. */
  21. /* Define to prevent recursive inclusion -------------------------------------*/
  22. #ifndef __STM32F4xx_FMPI2C_H
  23. #define __STM32F4xx_FMPI2C_H
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /* Includes ------------------------------------------------------------------*/
  28. #include "stm32f4xx.h"
  29. /** @addtogroup STM32F4xx_StdPeriph_Driver
  30. * @{
  31. */
  32. /** @addtogroup FMPI2C
  33. * @{
  34. */
  35. #if defined(STM32F410xx) || defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F446xx)
  36. /* Exported types ------------------------------------------------------------*/
  37. /**
  38. * @brief FMPI2C Init structure definition
  39. */
  40. typedef struct
  41. {
  42. uint32_t FMPI2C_Timing; /*!< Specifies the FMPI2C_TIMINGR_register value.
  43. This parameter calculated by referring to FMPI2C initialization
  44. section in Reference manual*/
  45. uint32_t FMPI2C_AnalogFilter; /*!< Enables or disables analog noise filter.
  46. This parameter can be a value of @ref FMPI2C_Analog_Filter */
  47. uint32_t FMPI2C_DigitalFilter; /*!< Configures the digital noise filter.
  48. This parameter can be a number between 0x00 and 0x0F */
  49. uint32_t FMPI2C_Mode; /*!< Specifies the FMPI2C mode.
  50. This parameter can be a value of @ref FMPI2C_mode */
  51. uint32_t FMPI2C_OwnAddress1; /*!< Specifies the device own address 1.
  52. This parameter can be a 7-bit or 10-bit address */
  53. uint32_t FMPI2C_Ack; /*!< Enables or disables the acknowledgement.
  54. This parameter can be a value of @ref FMPI2C_acknowledgement */
  55. uint32_t FMPI2C_AcknowledgedAddress; /*!< Specifies if 7-bit or 10-bit address is acknowledged.
  56. This parameter can be a value of @ref FMPI2C_acknowledged_address */
  57. }FMPI2C_InitTypeDef;
  58. /* Exported constants --------------------------------------------------------*/
  59. /** @defgroup FMPI2C_Exported_Constants
  60. * @{
  61. */
  62. #define IS_FMPI2C_ALL_PERIPH(PERIPH) ((PERIPH) == FMPI2C1)
  63. /** @defgroup FMPI2C_Analog_Filter
  64. * @{
  65. */
  66. #define FMPI2C_AnalogFilter_Enable ((uint32_t)0x00000000)
  67. #define FMPI2C_AnalogFilter_Disable FMPI2C_CR1_ANFOFF
  68. #define IS_FMPI2C_ANALOG_FILTER(FILTER) (((FILTER) == FMPI2C_AnalogFilter_Enable) || \
  69. ((FILTER) == FMPI2C_AnalogFilter_Disable))
  70. /**
  71. * @}
  72. */
  73. /** @defgroup FMPI2C_Digital_Filter
  74. * @{
  75. */
  76. #define IS_FMPI2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000F)
  77. /**
  78. * @}
  79. */
  80. /** @defgroup FMPI2C_mode
  81. * @{
  82. */
  83. #define FMPI2C_Mode_FMPI2C ((uint32_t)0x00000000)
  84. #define FMPI2C_Mode_SMBusDevice FMPI2C_CR1_SMBDEN
  85. #define FMPI2C_Mode_SMBusHost FMPI2C_CR1_SMBHEN
  86. #define IS_FMPI2C_MODE(MODE) (((MODE) == FMPI2C_Mode_FMPI2C) || \
  87. ((MODE) == FMPI2C_Mode_SMBusDevice) || \
  88. ((MODE) == FMPI2C_Mode_SMBusHost))
  89. /**
  90. * @}
  91. */
  92. /** @defgroup FMPI2C_acknowledgement
  93. * @{
  94. */
  95. #define FMPI2C_Ack_Enable ((uint32_t)0x00000000)
  96. #define FMPI2C_Ack_Disable FMPI2C_CR2_NACK
  97. #define IS_FMPI2C_ACK(ACK) (((ACK) == FMPI2C_Ack_Enable) || \
  98. ((ACK) == FMPI2C_Ack_Disable))
  99. /**
  100. * @}
  101. */
  102. /** @defgroup FMPI2C_acknowledged_address
  103. * @{
  104. */
  105. #define FMPI2C_AcknowledgedAddress_7bit ((uint32_t)0x00000000)
  106. #define FMPI2C_AcknowledgedAddress_10bit FMPI2C_OAR1_OA1MODE
  107. #define IS_FMPI2C_ACKNOWLEDGE_ADDRESS(ADDRESS) (((ADDRESS) == FMPI2C_AcknowledgedAddress_7bit) || \
  108. ((ADDRESS) == FMPI2C_AcknowledgedAddress_10bit))
  109. /**
  110. * @}
  111. */
  112. /** @defgroup FMPI2C_own_address1
  113. * @{
  114. */
  115. #define IS_FMPI2C_OWN_ADDRESS1(ADDRESS1) ((ADDRESS1) <= (uint32_t)0x000003FF)
  116. /**
  117. * @}
  118. */
  119. /** @defgroup FMPI2C_transfer_direction
  120. * @{
  121. */
  122. #define FMPI2C_Direction_Transmitter ((uint16_t)0x0000)
  123. #define FMPI2C_Direction_Receiver ((uint16_t)0x0400)
  124. #define IS_FMPI2C_DIRECTION(DIRECTION) (((DIRECTION) == FMPI2C_Direction_Transmitter) || \
  125. ((DIRECTION) == FMPI2C_Direction_Receiver))
  126. /**
  127. * @}
  128. */
  129. /** @defgroup FMPI2C_DMA_transfer_requests
  130. * @{
  131. */
  132. #define FMPI2C_DMAReq_Tx FMPI2C_CR1_TXDMAEN
  133. #define FMPI2C_DMAReq_Rx FMPI2C_CR1_RXDMAEN
  134. #define IS_FMPI2C_DMA_REQ(REQ) ((((REQ) & (uint32_t)0xFFFF3FFF) == 0x00) && ((REQ) != 0x00))
  135. /**
  136. * @}
  137. */
  138. /** @defgroup FMPI2C_slave_address
  139. * @{
  140. */
  141. #define IS_FMPI2C_SLAVE_ADDRESS(ADDRESS) ((ADDRESS) <= (uint16_t)0x03FF)
  142. /**
  143. * @}
  144. */
  145. /** @defgroup FMPI2C_own_address2
  146. * @{
  147. */
  148. #define IS_FMPI2C_OWN_ADDRESS2(ADDRESS2) ((ADDRESS2) <= (uint16_t)0x00FF)
  149. /**
  150. * @}
  151. */
  152. /** @defgroup FMPI2C_own_address2_mask
  153. * @{
  154. */
  155. #define FMPI2C_OA2_NoMask ((uint8_t)0x00)
  156. #define FMPI2C_OA2_Mask01 ((uint8_t)0x01)
  157. #define FMPI2C_OA2_Mask02 ((uint8_t)0x02)
  158. #define FMPI2C_OA2_Mask03 ((uint8_t)0x03)
  159. #define FMPI2C_OA2_Mask04 ((uint8_t)0x04)
  160. #define FMPI2C_OA2_Mask05 ((uint8_t)0x05)
  161. #define FMPI2C_OA2_Mask06 ((uint8_t)0x06)
  162. #define FMPI2C_OA2_Mask07 ((uint8_t)0x07)
  163. #define IS_FMPI2C_OWN_ADDRESS2_MASK(MASK) (((MASK) == FMPI2C_OA2_NoMask) || \
  164. ((MASK) == FMPI2C_OA2_Mask01) || \
  165. ((MASK) == FMPI2C_OA2_Mask02) || \
  166. ((MASK) == FMPI2C_OA2_Mask03) || \
  167. ((MASK) == FMPI2C_OA2_Mask04) || \
  168. ((MASK) == FMPI2C_OA2_Mask05) || \
  169. ((MASK) == FMPI2C_OA2_Mask06) || \
  170. ((MASK) == FMPI2C_OA2_Mask07))
  171. /**
  172. * @}
  173. */
  174. /** @defgroup FMPI2C_timeout
  175. * @{
  176. */
  177. #define IS_FMPI2C_TIMEOUT(TIMEOUT) ((TIMEOUT) <= (uint16_t)0x0FFF)
  178. /**
  179. * @}
  180. */
  181. /** @defgroup FMPI2C_registers
  182. * @{
  183. */
  184. #define FMPI2C_Register_CR1 ((uint8_t)0x00)
  185. #define FMPI2C_Register_CR2 ((uint8_t)0x04)
  186. #define FMPI2C_Register_OAR1 ((uint8_t)0x08)
  187. #define FMPI2C_Register_OAR2 ((uint8_t)0x0C)
  188. #define FMPI2C_Register_TIMINGR ((uint8_t)0x10)
  189. #define FMPI2C_Register_TIMEOUTR ((uint8_t)0x14)
  190. #define FMPI2C_Register_ISR ((uint8_t)0x18)
  191. #define FMPI2C_Register_ICR ((uint8_t)0x1C)
  192. #define FMPI2C_Register_PECR ((uint8_t)0x20)
  193. #define FMPI2C_Register_RXDR ((uint8_t)0x24)
  194. #define FMPI2C_Register_TXDR ((uint8_t)0x28)
  195. #define IS_FMPI2C_REGISTER(REGISTER) (((REGISTER) == FMPI2C_Register_CR1) || \
  196. ((REGISTER) == FMPI2C_Register_CR2) || \
  197. ((REGISTER) == FMPI2C_Register_OAR1) || \
  198. ((REGISTER) == FMPI2C_Register_OAR2) || \
  199. ((REGISTER) == FMPI2C_Register_TIMINGR) || \
  200. ((REGISTER) == FMPI2C_Register_TIMEOUTR) || \
  201. ((REGISTER) == FMPI2C_Register_ISR) || \
  202. ((REGISTER) == FMPI2C_Register_ICR) || \
  203. ((REGISTER) == FMPI2C_Register_PECR) || \
  204. ((REGISTER) == FMPI2C_Register_RXDR) || \
  205. ((REGISTER) == FMPI2C_Register_TXDR))
  206. /**
  207. * @}
  208. */
  209. /** @defgroup FMPI2C_interrupts_definition
  210. * @{
  211. */
  212. #define FMPI2C_IT_ERRI FMPI2C_CR1_ERRIE
  213. #define FMPI2C_IT_TCI FMPI2C_CR1_TCIE
  214. #define FMPI2C_IT_STOPI FMPI2C_CR1_STOPIE
  215. #define FMPI2C_IT_NACKI FMPI2C_CR1_NACKIE
  216. #define FMPI2C_IT_ADDRI FMPI2C_CR1_ADDRIE
  217. #define FMPI2C_IT_RXI FMPI2C_CR1_RXIE
  218. #define FMPI2C_IT_TXI FMPI2C_CR1_TXIE
  219. #define IS_FMPI2C_CONFIG_IT(IT) ((((IT) & (uint32_t)0xFFFFFF01) == 0x00) && ((IT) != 0x00))
  220. /**
  221. * @}
  222. */
  223. /** @defgroup FMPI2C_flags_definition
  224. * @{
  225. */
  226. #define FMPI2C_FLAG_TXE FMPI2C_ISR_TXE
  227. #define FMPI2C_FLAG_TXIS FMPI2C_ISR_TXIS
  228. #define FMPI2C_FLAG_RXNE FMPI2C_ISR_RXNE
  229. #define FMPI2C_FLAG_ADDR FMPI2C_ISR_ADDR
  230. #define FMPI2C_FLAG_NACKF FMPI2C_ISR_NACKF
  231. #define FMPI2C_FLAG_STOPF FMPI2C_ISR_STOPF
  232. #define FMPI2C_FLAG_TC FMPI2C_ISR_TC
  233. #define FMPI2C_FLAG_TCR FMPI2C_ISR_TCR
  234. #define FMPI2C_FLAG_BERR FMPI2C_ISR_BERR
  235. #define FMPI2C_FLAG_ARLO FMPI2C_ISR_ARLO
  236. #define FMPI2C_FLAG_OVR FMPI2C_ISR_OVR
  237. #define FMPI2C_FLAG_PECERR FMPI2C_ISR_PECERR
  238. #define FMPI2C_FLAG_TIMEOUT FMPI2C_ISR_TIMEOUT
  239. #define FMPI2C_FLAG_ALERT FMPI2C_ISR_ALERT
  240. #define FMPI2C_FLAG_BUSY FMPI2C_ISR_BUSY
  241. #define IS_FMPI2C_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFF4000) == 0x00) && ((FLAG) != 0x00))
  242. #define IS_FMPI2C_GET_FLAG(FLAG) (((FLAG) == FMPI2C_FLAG_TXE) || ((FLAG) == FMPI2C_FLAG_TXIS) || \
  243. ((FLAG) == FMPI2C_FLAG_RXNE) || ((FLAG) == FMPI2C_FLAG_ADDR) || \
  244. ((FLAG) == FMPI2C_FLAG_NACKF) || ((FLAG) == FMPI2C_FLAG_STOPF) || \
  245. ((FLAG) == FMPI2C_FLAG_TC) || ((FLAG) == FMPI2C_FLAG_TCR) || \
  246. ((FLAG) == FMPI2C_FLAG_BERR) || ((FLAG) == FMPI2C_FLAG_ARLO) || \
  247. ((FLAG) == FMPI2C_FLAG_OVR) || ((FLAG) == FMPI2C_FLAG_PECERR) || \
  248. ((FLAG) == FMPI2C_FLAG_TIMEOUT) || ((FLAG) == FMPI2C_FLAG_ALERT) || \
  249. ((FLAG) == FMPI2C_FLAG_BUSY))
  250. /**
  251. * @}
  252. */
  253. /** @defgroup FMPI2C_interrupts_definition
  254. * @{
  255. */
  256. #define FMPI2C_IT_TXIS FMPI2C_ISR_TXIS
  257. #define FMPI2C_IT_RXNE FMPI2C_ISR_RXNE
  258. #define FMPI2C_IT_ADDR FMPI2C_ISR_ADDR
  259. #define FMPI2C_IT_NACKF FMPI2C_ISR_NACKF
  260. #define FMPI2C_IT_STOPF FMPI2C_ISR_STOPF
  261. #define FMPI2C_IT_TC FMPI2C_ISR_TC
  262. #define FMPI2C_IT_TCR FMPI2C_ISR_TCR
  263. #define FMPI2C_IT_BERR FMPI2C_ISR_BERR
  264. #define FMPI2C_IT_ARLO FMPI2C_ISR_ARLO
  265. #define FMPI2C_IT_OVR FMPI2C_ISR_OVR
  266. #define FMPI2C_IT_PECERR FMPI2C_ISR_PECERR
  267. #define FMPI2C_IT_TIMEOUT FMPI2C_ISR_TIMEOUT
  268. #define FMPI2C_IT_ALERT FMPI2C_ISR_ALERT
  269. #define IS_FMPI2C_CLEAR_IT(IT) ((((IT) & (uint32_t)0xFFFFC001) == 0x00) && ((IT) != 0x00))
  270. #define IS_FMPI2C_GET_IT(IT) (((IT) == FMPI2C_IT_TXIS) || ((IT) == FMPI2C_IT_RXNE) || \
  271. ((IT) == FMPI2C_IT_ADDR) || ((IT) == FMPI2C_IT_NACKF) || \
  272. ((IT) == FMPI2C_IT_STOPF) || ((IT) == FMPI2C_IT_TC) || \
  273. ((IT) == FMPI2C_IT_TCR) || ((IT) == FMPI2C_IT_BERR) || \
  274. ((IT) == FMPI2C_IT_ARLO) || ((IT) == FMPI2C_IT_OVR) || \
  275. ((IT) == FMPI2C_IT_PECERR) || ((IT) == FMPI2C_IT_TIMEOUT) || \
  276. ((IT) == FMPI2C_IT_ALERT))
  277. /**
  278. * @}
  279. */
  280. /** @defgroup FMPI2C_ReloadEndMode_definition
  281. * @{
  282. */
  283. #define FMPI2C_Reload_Mode FMPI2C_CR2_RELOAD
  284. #define FMPI2C_AutoEnd_Mode FMPI2C_CR2_AUTOEND
  285. #define FMPI2C_SoftEnd_Mode ((uint32_t)0x00000000)
  286. #define IS_RELOAD_END_MODE(MODE) (((MODE) == FMPI2C_Reload_Mode) || \
  287. ((MODE) == FMPI2C_AutoEnd_Mode) || \
  288. ((MODE) == FMPI2C_SoftEnd_Mode))
  289. /**
  290. * @}
  291. */
  292. /** @defgroup FMPI2C_StartStopMode_definition
  293. * @{
  294. */
  295. #define FMPI2C_No_StartStop ((uint32_t)0x00000000)
  296. #define FMPI2C_Generate_Stop FMPI2C_CR2_STOP
  297. #define FMPI2C_Generate_Start_Read (uint32_t)(FMPI2C_CR2_START | FMPI2C_CR2_RD_WRN)
  298. #define FMPI2C_Generate_Start_Write FMPI2C_CR2_START
  299. #define IS_START_STOP_MODE(MODE) (((MODE) == FMPI2C_Generate_Stop) || \
  300. ((MODE) == FMPI2C_Generate_Start_Read) || \
  301. ((MODE) == FMPI2C_Generate_Start_Write) || \
  302. ((MODE) == FMPI2C_No_StartStop))
  303. /**
  304. * @}
  305. */
  306. /**
  307. * @}
  308. */
  309. /* Exported macro ------------------------------------------------------------*/
  310. /* Exported functions ------------------------------------------------------- */
  311. /* Initialization and Configuration functions *********************************/
  312. void FMPI2C_DeInit(FMPI2C_TypeDef* FMPI2Cx);
  313. void FMPI2C_Init(FMPI2C_TypeDef* FMPI2Cx, FMPI2C_InitTypeDef* FMPI2C_InitStruct);
  314. void FMPI2C_StructInit(FMPI2C_InitTypeDef* FMPI2C_InitStruct);
  315. void FMPI2C_Cmd(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  316. void FMPI2C_SoftwareResetCmd(FMPI2C_TypeDef* FMPI2Cx);
  317. void FMPI2C_ITConfig(FMPI2C_TypeDef* FMPI2Cx, uint32_t FMPI2C_IT, FunctionalState NewState);
  318. void FMPI2C_StretchClockCmd(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  319. void FMPI2C_DualAddressCmd(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  320. void FMPI2C_OwnAddress2Config(FMPI2C_TypeDef* FMPI2Cx, uint16_t Address, uint8_t Mask);
  321. void FMPI2C_GeneralCallCmd(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  322. void FMPI2C_SlaveByteControlCmd(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  323. void FMPI2C_SlaveAddressConfig(FMPI2C_TypeDef* FMPI2Cx, uint16_t Address);
  324. void FMPI2C_10BitAddressingModeCmd(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  325. /* Communications handling functions ******************************************/
  326. void FMPI2C_AutoEndCmd(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  327. void FMPI2C_ReloadCmd(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  328. void FMPI2C_NumberOfBytesConfig(FMPI2C_TypeDef* FMPI2Cx, uint8_t Number_Bytes);
  329. void FMPI2C_MasterRequestConfig(FMPI2C_TypeDef* FMPI2Cx, uint16_t FMPI2C_Direction);
  330. void FMPI2C_GenerateSTART(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  331. void FMPI2C_GenerateSTOP(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  332. void FMPI2C_10BitAddressHeaderCmd(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  333. void FMPI2C_AcknowledgeConfig(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  334. uint8_t FMPI2C_GetAddressMatched(FMPI2C_TypeDef* FMPI2Cx);
  335. uint16_t FMPI2C_GetTransferDirection(FMPI2C_TypeDef* FMPI2Cx);
  336. void FMPI2C_TransferHandling(FMPI2C_TypeDef* FMPI2Cx, uint16_t Address, uint8_t Number_Bytes, uint32_t ReloadEndMode, uint32_t StartStopMode);
  337. /* SMBUS management functions ************************************************/
  338. void FMPI2C_SMBusAlertCmd(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  339. void FMPI2C_ClockTimeoutCmd(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  340. void FMPI2C_ExtendedClockTimeoutCmd(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  341. void FMPI2C_IdleClockTimeoutCmd(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  342. void FMPI2C_TimeoutAConfig(FMPI2C_TypeDef* FMPI2Cx, uint16_t Timeout);
  343. void FMPI2C_TimeoutBConfig(FMPI2C_TypeDef* FMPI2Cx, uint16_t Timeout);
  344. void FMPI2C_CalculatePEC(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  345. void FMPI2C_PECRequestCmd(FMPI2C_TypeDef* FMPI2Cx, FunctionalState NewState);
  346. uint8_t FMPI2C_GetPEC(FMPI2C_TypeDef* FMPI2Cx);
  347. /* FMPI2C registers management functions *****************************************/
  348. uint32_t FMPI2C_ReadRegister(FMPI2C_TypeDef* FMPI2Cx, uint8_t FMPI2C_Register);
  349. /* Data transfers management functions ****************************************/
  350. void FMPI2C_SendData(FMPI2C_TypeDef* FMPI2Cx, uint8_t Data);
  351. uint8_t FMPI2C_ReceiveData(FMPI2C_TypeDef* FMPI2Cx);
  352. /* DMA transfers management functions *****************************************/
  353. void FMPI2C_DMACmd(FMPI2C_TypeDef* FMPI2Cx, uint32_t FMPI2C_DMAReq, FunctionalState NewState);
  354. /* Interrupts and flags management functions **********************************/
  355. FlagStatus FMPI2C_GetFlagStatus(FMPI2C_TypeDef* FMPI2Cx, uint32_t FMPI2C_FLAG);
  356. void FMPI2C_ClearFlag(FMPI2C_TypeDef* FMPI2Cx, uint32_t FMPI2C_FLAG);
  357. ITStatus FMPI2C_GetITStatus(FMPI2C_TypeDef* FMPI2Cx, uint32_t FMPI2C_IT);
  358. void FMPI2C_ClearITPendingBit(FMPI2C_TypeDef* FMPI2Cx, uint32_t FMPI2C_IT);
  359. #endif /* STM32F410xx || STM32F412xG || STM32F413_423xx || STM32F446xx */
  360. /**
  361. * @}
  362. */
  363. /**
  364. * @}
  365. */
  366. #ifdef __cplusplus
  367. }
  368. #endif
  369. #endif /*__STM32F4xx_FMPI2C_H */