STM32L4xx_HAL_Driver  1.14.0
stm32l4xx_ll_i2c.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32L4xx_LL_I2C_H
22 #define STM32L4xx_LL_I2C_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32l4xx.h"
30 
35 #if defined (I2C1) || defined (I2C2) || defined (I2C3) || defined (I2C4)
36 
41 /* Private types -------------------------------------------------------------*/
42 /* Private variables ---------------------------------------------------------*/
43 
44 /* Private constants ---------------------------------------------------------*/
52 /* Private macros ------------------------------------------------------------*/
53 #if defined(USE_FULL_LL_DRIVER)
54 
60 #endif /*USE_FULL_LL_DRIVER*/
61 
62 /* Exported types ------------------------------------------------------------*/
63 #if defined(USE_FULL_LL_DRIVER)
64 
67 typedef struct
68 {
69  uint32_t PeripheralMode;
74  uint32_t Timing;
80  uint32_t AnalogFilter;
85  uint32_t DigitalFilter;
90  uint32_t OwnAddress1;
95  uint32_t TypeAcknowledge;
100  uint32_t OwnAddrSize;
108 #endif /*USE_FULL_LL_DRIVER*/
109 
110 /* Exported constants --------------------------------------------------------*/
119 #define LL_I2C_ICR_ADDRCF I2C_ICR_ADDRCF
120 #define LL_I2C_ICR_NACKCF I2C_ICR_NACKCF
121 #define LL_I2C_ICR_STOPCF I2C_ICR_STOPCF
122 #define LL_I2C_ICR_BERRCF I2C_ICR_BERRCF
123 #define LL_I2C_ICR_ARLOCF I2C_ICR_ARLOCF
124 #define LL_I2C_ICR_OVRCF I2C_ICR_OVRCF
125 #define LL_I2C_ICR_PECCF I2C_ICR_PECCF
126 #define LL_I2C_ICR_TIMOUTCF I2C_ICR_TIMOUTCF
127 #define LL_I2C_ICR_ALERTCF I2C_ICR_ALERTCF
136 #define LL_I2C_ISR_TXE I2C_ISR_TXE
137 #define LL_I2C_ISR_TXIS I2C_ISR_TXIS
138 #define LL_I2C_ISR_RXNE I2C_ISR_RXNE
139 #define LL_I2C_ISR_ADDR I2C_ISR_ADDR
140 #define LL_I2C_ISR_NACKF I2C_ISR_NACKF
141 #define LL_I2C_ISR_STOPF I2C_ISR_STOPF
142 #define LL_I2C_ISR_TC I2C_ISR_TC
143 #define LL_I2C_ISR_TCR I2C_ISR_TCR
144 #define LL_I2C_ISR_BERR I2C_ISR_BERR
145 #define LL_I2C_ISR_ARLO I2C_ISR_ARLO
146 #define LL_I2C_ISR_OVR I2C_ISR_OVR
147 #define LL_I2C_ISR_PECERR I2C_ISR_PECERR
148 #define LL_I2C_ISR_TIMEOUT I2C_ISR_TIMEOUT
149 #define LL_I2C_ISR_ALERT I2C_ISR_ALERT
150 #define LL_I2C_ISR_BUSY I2C_ISR_BUSY
159 #define LL_I2C_CR1_TXIE I2C_CR1_TXIE
160 #define LL_I2C_CR1_RXIE I2C_CR1_RXIE
161 #define LL_I2C_CR1_ADDRIE I2C_CR1_ADDRIE
162 #define LL_I2C_CR1_NACKIE I2C_CR1_NACKIE
163 #define LL_I2C_CR1_STOPIE I2C_CR1_STOPIE
164 #define LL_I2C_CR1_TCIE I2C_CR1_TCIE
165 #define LL_I2C_CR1_ERRIE I2C_CR1_ERRIE
173 #define LL_I2C_MODE_I2C 0x00000000U
174 #define LL_I2C_MODE_SMBUS_HOST I2C_CR1_SMBHEN
175 #define LL_I2C_MODE_SMBUS_DEVICE 0x00000000U
176 #define LL_I2C_MODE_SMBUS_DEVICE_ARP I2C_CR1_SMBDEN
184 #define LL_I2C_ANALOGFILTER_ENABLE 0x00000000U
185 #define LL_I2C_ANALOGFILTER_DISABLE I2C_CR1_ANFOFF
193 #define LL_I2C_ADDRESSING_MODE_7BIT 0x00000000U
194 #define LL_I2C_ADDRESSING_MODE_10BIT I2C_CR2_ADD10
202 #define LL_I2C_OWNADDRESS1_7BIT 0x00000000U
203 #define LL_I2C_OWNADDRESS1_10BIT I2C_OAR1_OA1MODE
211 #define LL_I2C_OWNADDRESS2_NOMASK I2C_OAR2_OA2NOMASK
212 #define LL_I2C_OWNADDRESS2_MASK01 I2C_OAR2_OA2MASK01
213 #define LL_I2C_OWNADDRESS2_MASK02 I2C_OAR2_OA2MASK02
214 #define LL_I2C_OWNADDRESS2_MASK03 I2C_OAR2_OA2MASK03
215 #define LL_I2C_OWNADDRESS2_MASK04 I2C_OAR2_OA2MASK04
216 #define LL_I2C_OWNADDRESS2_MASK05 I2C_OAR2_OA2MASK05
217 #define LL_I2C_OWNADDRESS2_MASK06 I2C_OAR2_OA2MASK06
218 #define LL_I2C_OWNADDRESS2_MASK07 I2C_OAR2_OA2MASK07
226 #define LL_I2C_ACK 0x00000000U
227 #define LL_I2C_NACK I2C_CR2_NACK
235 #define LL_I2C_ADDRSLAVE_7BIT 0x00000000U
236 #define LL_I2C_ADDRSLAVE_10BIT I2C_CR2_ADD10
244 #define LL_I2C_REQUEST_WRITE 0x00000000U
245 #define LL_I2C_REQUEST_READ I2C_CR2_RD_WRN
253 #define LL_I2C_MODE_RELOAD I2C_CR2_RELOAD
254 #define LL_I2C_MODE_AUTOEND I2C_CR2_AUTOEND
255 #define LL_I2C_MODE_SOFTEND 0x00000000U
256 #define LL_I2C_MODE_SMBUS_RELOAD LL_I2C_MODE_RELOAD
257 #define LL_I2C_MODE_SMBUS_AUTOEND_NO_PEC LL_I2C_MODE_AUTOEND
258 #define LL_I2C_MODE_SMBUS_SOFTEND_NO_PEC LL_I2C_MODE_SOFTEND
259 #define LL_I2C_MODE_SMBUS_AUTOEND_WITH_PEC (uint32_t)(LL_I2C_MODE_AUTOEND | I2C_CR2_PECBYTE)
260 #define LL_I2C_MODE_SMBUS_SOFTEND_WITH_PEC (uint32_t)(LL_I2C_MODE_SOFTEND | I2C_CR2_PECBYTE)
268 #define LL_I2C_GENERATE_NOSTARTSTOP 0x00000000U
269 #define LL_I2C_GENERATE_STOP (uint32_t)(0x80000000U | I2C_CR2_STOP)
270 #define LL_I2C_GENERATE_START_READ (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN)
271 #define LL_I2C_GENERATE_START_WRITE (uint32_t)(0x80000000U | I2C_CR2_START)
272 #define LL_I2C_GENERATE_RESTART_7BIT_READ (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN)
273 #define LL_I2C_GENERATE_RESTART_7BIT_WRITE (uint32_t)(0x80000000U | I2C_CR2_START)
274 #define LL_I2C_GENERATE_RESTART_10BIT_READ (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN | I2C_CR2_HEAD10R)
275 #define LL_I2C_GENERATE_RESTART_10BIT_WRITE (uint32_t)(0x80000000U | I2C_CR2_START)
283 #define LL_I2C_DIRECTION_WRITE 0x00000000U
284 #define LL_I2C_DIRECTION_READ I2C_ISR_DIR
292 #define LL_I2C_DMA_REG_DATA_TRANSMIT 0x00000000U
293 #define LL_I2C_DMA_REG_DATA_RECEIVE 0x00000001U
301 #define LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW 0x00000000U
302 #define LL_I2C_SMBUS_TIMEOUTA_MODE_SDA_SCL_HIGH I2C_TIMEOUTR_TIDLE
310 #define LL_I2C_SMBUS_TIMEOUTA I2C_TIMEOUTR_TIMOUTEN
311 #define LL_I2C_SMBUS_TIMEOUTB I2C_TIMEOUTR_TEXTEN
312 #define LL_I2C_SMBUS_ALL_TIMEOUT (uint32_t)(I2C_TIMEOUTR_TIMOUTEN | I2C_TIMEOUTR_TEXTEN)
321 /* Exported macro ------------------------------------------------------------*/
322 
337 #define LL_I2C_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
338 
345 #define LL_I2C_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
346 
362 #define __LL_I2C_CONVERT_TIMINGS(__PRESCALER__, __DATA_SETUP_TIME__, __DATA_HOLD_TIME__, __CLOCK_HIGH_PERIOD__, __CLOCK_LOW_PERIOD__) \
363  ((((uint32_t)(__PRESCALER__) << I2C_TIMINGR_PRESC_Pos) & I2C_TIMINGR_PRESC) | \
364  (((uint32_t)(__DATA_SETUP_TIME__) << I2C_TIMINGR_SCLDEL_Pos) & I2C_TIMINGR_SCLDEL) | \
365  (((uint32_t)(__DATA_HOLD_TIME__) << I2C_TIMINGR_SDADEL_Pos) & I2C_TIMINGR_SDADEL) | \
366  (((uint32_t)(__CLOCK_HIGH_PERIOD__) << I2C_TIMINGR_SCLH_Pos) & I2C_TIMINGR_SCLH) | \
367  (((uint32_t)(__CLOCK_LOW_PERIOD__) << I2C_TIMINGR_SCLL_Pos) & I2C_TIMINGR_SCLL))
368 
376 /* Exported functions --------------------------------------------------------*/
391 __STATIC_INLINE void LL_I2C_Enable(I2C_TypeDef *I2Cx)
392 {
393  SET_BIT(I2Cx->CR1, I2C_CR1_PE);
394 }
395 
405 __STATIC_INLINE void LL_I2C_Disable(I2C_TypeDef *I2Cx)
406 {
407  CLEAR_BIT(I2Cx->CR1, I2C_CR1_PE);
408 }
409 
416 __STATIC_INLINE uint32_t LL_I2C_IsEnabled(I2C_TypeDef *I2Cx)
417 {
418  return ((READ_BIT(I2Cx->CR1, I2C_CR1_PE) == (I2C_CR1_PE)) ? 1UL : 0UL);
419 }
420 
436 __STATIC_INLINE void LL_I2C_ConfigFilters(I2C_TypeDef *I2Cx, uint32_t AnalogFilter, uint32_t DigitalFilter)
437 {
438  MODIFY_REG(I2Cx->CR1, I2C_CR1_ANFOFF | I2C_CR1_DNF, AnalogFilter | (DigitalFilter << I2C_CR1_DNF_Pos));
439 }
440 
452 __STATIC_INLINE void LL_I2C_SetDigitalFilter(I2C_TypeDef *I2Cx, uint32_t DigitalFilter)
453 {
454  MODIFY_REG(I2Cx->CR1, I2C_CR1_DNF, DigitalFilter << I2C_CR1_DNF_Pos);
455 }
456 
463 __STATIC_INLINE uint32_t LL_I2C_GetDigitalFilter(I2C_TypeDef *I2Cx)
464 {
465  return (uint32_t)(READ_BIT(I2Cx->CR1, I2C_CR1_DNF) >> I2C_CR1_DNF_Pos);
466 }
467 
475 __STATIC_INLINE void LL_I2C_EnableAnalogFilter(I2C_TypeDef *I2Cx)
476 {
477  CLEAR_BIT(I2Cx->CR1, I2C_CR1_ANFOFF);
478 }
479 
487 __STATIC_INLINE void LL_I2C_DisableAnalogFilter(I2C_TypeDef *I2Cx)
488 {
489  SET_BIT(I2Cx->CR1, I2C_CR1_ANFOFF);
490 }
491 
498 __STATIC_INLINE uint32_t LL_I2C_IsEnabledAnalogFilter(I2C_TypeDef *I2Cx)
499 {
500  return ((READ_BIT(I2Cx->CR1, I2C_CR1_ANFOFF) != (I2C_CR1_ANFOFF)) ? 1UL : 0UL);
501 }
502 
509 __STATIC_INLINE void LL_I2C_EnableDMAReq_TX(I2C_TypeDef *I2Cx)
510 {
511  SET_BIT(I2Cx->CR1, I2C_CR1_TXDMAEN);
512 }
513 
520 __STATIC_INLINE void LL_I2C_DisableDMAReq_TX(I2C_TypeDef *I2Cx)
521 {
522  CLEAR_BIT(I2Cx->CR1, I2C_CR1_TXDMAEN);
523 }
524 
531 __STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_TX(I2C_TypeDef *I2Cx)
532 {
533  return ((READ_BIT(I2Cx->CR1, I2C_CR1_TXDMAEN) == (I2C_CR1_TXDMAEN)) ? 1UL : 0UL);
534 }
535 
542 __STATIC_INLINE void LL_I2C_EnableDMAReq_RX(I2C_TypeDef *I2Cx)
543 {
544  SET_BIT(I2Cx->CR1, I2C_CR1_RXDMAEN);
545 }
546 
553 __STATIC_INLINE void LL_I2C_DisableDMAReq_RX(I2C_TypeDef *I2Cx)
554 {
555  CLEAR_BIT(I2Cx->CR1, I2C_CR1_RXDMAEN);
556 }
557 
564 __STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_RX(I2C_TypeDef *I2Cx)
565 {
566  return ((READ_BIT(I2Cx->CR1, I2C_CR1_RXDMAEN) == (I2C_CR1_RXDMAEN)) ? 1UL : 0UL);
567 }
568 
579 __STATIC_INLINE uint32_t LL_I2C_DMA_GetRegAddr(I2C_TypeDef *I2Cx, uint32_t Direction)
580 {
581  register uint32_t data_reg_addr;
582 
583  if (Direction == LL_I2C_DMA_REG_DATA_TRANSMIT)
584  {
585  /* return address of TXDR register */
586  data_reg_addr = (uint32_t) & (I2Cx->TXDR);
587  }
588  else
589  {
590  /* return address of RXDR register */
591  data_reg_addr = (uint32_t) & (I2Cx->RXDR);
592  }
593 
594  return data_reg_addr;
595 }
596 
604 __STATIC_INLINE void LL_I2C_EnableClockStretching(I2C_TypeDef *I2Cx)
605 {
606  CLEAR_BIT(I2Cx->CR1, I2C_CR1_NOSTRETCH);
607 }
608 
616 __STATIC_INLINE void LL_I2C_DisableClockStretching(I2C_TypeDef *I2Cx)
617 {
618  SET_BIT(I2Cx->CR1, I2C_CR1_NOSTRETCH);
619 }
620 
627 __STATIC_INLINE uint32_t LL_I2C_IsEnabledClockStretching(I2C_TypeDef *I2Cx)
628 {
629  return ((READ_BIT(I2Cx->CR1, I2C_CR1_NOSTRETCH) != (I2C_CR1_NOSTRETCH)) ? 1UL : 0UL);
630 }
631 
638 __STATIC_INLINE void LL_I2C_EnableSlaveByteControl(I2C_TypeDef *I2Cx)
639 {
640  SET_BIT(I2Cx->CR1, I2C_CR1_SBC);
641 }
642 
649 __STATIC_INLINE void LL_I2C_DisableSlaveByteControl(I2C_TypeDef *I2Cx)
650 {
651  CLEAR_BIT(I2Cx->CR1, I2C_CR1_SBC);
652 }
653 
660 __STATIC_INLINE uint32_t LL_I2C_IsEnabledSlaveByteControl(I2C_TypeDef *I2Cx)
661 {
662  return ((READ_BIT(I2Cx->CR1, I2C_CR1_SBC) == (I2C_CR1_SBC)) ? 1UL : 0UL);
663 }
664 
674 __STATIC_INLINE void LL_I2C_EnableWakeUpFromStop(I2C_TypeDef *I2Cx)
675 {
676  SET_BIT(I2Cx->CR1, I2C_CR1_WUPEN);
677 }
678 
687 __STATIC_INLINE void LL_I2C_DisableWakeUpFromStop(I2C_TypeDef *I2Cx)
688 {
689  CLEAR_BIT(I2Cx->CR1, I2C_CR1_WUPEN);
690 }
691 
700 __STATIC_INLINE uint32_t LL_I2C_IsEnabledWakeUpFromStop(I2C_TypeDef *I2Cx)
701 {
702  return ((READ_BIT(I2Cx->CR1, I2C_CR1_WUPEN) == (I2C_CR1_WUPEN)) ? 1UL : 0UL);
703 }
704 
712 __STATIC_INLINE void LL_I2C_EnableGeneralCall(I2C_TypeDef *I2Cx)
713 {
714  SET_BIT(I2Cx->CR1, I2C_CR1_GCEN);
715 }
716 
724 __STATIC_INLINE void LL_I2C_DisableGeneralCall(I2C_TypeDef *I2Cx)
725 {
726  CLEAR_BIT(I2Cx->CR1, I2C_CR1_GCEN);
727 }
728 
735 __STATIC_INLINE uint32_t LL_I2C_IsEnabledGeneralCall(I2C_TypeDef *I2Cx)
736 {
737  return ((READ_BIT(I2Cx->CR1, I2C_CR1_GCEN) == (I2C_CR1_GCEN)) ? 1UL : 0UL);
738 }
739 
750 __STATIC_INLINE void LL_I2C_SetMasterAddressingMode(I2C_TypeDef *I2Cx, uint32_t AddressingMode)
751 {
752  MODIFY_REG(I2Cx->CR2, I2C_CR2_ADD10, AddressingMode);
753 }
754 
763 __STATIC_INLINE uint32_t LL_I2C_GetMasterAddressingMode(I2C_TypeDef *I2Cx)
764 {
765  return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_ADD10));
766 }
767 
779 __STATIC_INLINE void LL_I2C_SetOwnAddress1(I2C_TypeDef *I2Cx, uint32_t OwnAddress1, uint32_t OwnAddrSize)
780 {
781  MODIFY_REG(I2Cx->OAR1, I2C_OAR1_OA1 | I2C_OAR1_OA1MODE, OwnAddress1 | OwnAddrSize);
782 }
783 
790 __STATIC_INLINE void LL_I2C_EnableOwnAddress1(I2C_TypeDef *I2Cx)
791 {
792  SET_BIT(I2Cx->OAR1, I2C_OAR1_OA1EN);
793 }
794 
801 __STATIC_INLINE void LL_I2C_DisableOwnAddress1(I2C_TypeDef *I2Cx)
802 {
803  CLEAR_BIT(I2Cx->OAR1, I2C_OAR1_OA1EN);
804 }
805 
812 __STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress1(I2C_TypeDef *I2Cx)
813 {
814  return ((READ_BIT(I2Cx->OAR1, I2C_OAR1_OA1EN) == (I2C_OAR1_OA1EN)) ? 1UL : 0UL);
815 }
816 
835 __STATIC_INLINE void LL_I2C_SetOwnAddress2(I2C_TypeDef *I2Cx, uint32_t OwnAddress2, uint32_t OwnAddrMask)
836 {
837  MODIFY_REG(I2Cx->OAR2, I2C_OAR2_OA2 | I2C_OAR2_OA2MSK, OwnAddress2 | OwnAddrMask);
838 }
839 
846 __STATIC_INLINE void LL_I2C_EnableOwnAddress2(I2C_TypeDef *I2Cx)
847 {
848  SET_BIT(I2Cx->OAR2, I2C_OAR2_OA2EN);
849 }
850 
857 __STATIC_INLINE void LL_I2C_DisableOwnAddress2(I2C_TypeDef *I2Cx)
858 {
859  CLEAR_BIT(I2Cx->OAR2, I2C_OAR2_OA2EN);
860 }
861 
868 __STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress2(I2C_TypeDef *I2Cx)
869 {
870  return ((READ_BIT(I2Cx->OAR2, I2C_OAR2_OA2EN) == (I2C_OAR2_OA2EN)) ? 1UL : 0UL);
871 }
872 
882 __STATIC_INLINE void LL_I2C_SetTiming(I2C_TypeDef *I2Cx, uint32_t Timing)
883 {
884  WRITE_REG(I2Cx->TIMINGR, Timing);
885 }
886 
893 __STATIC_INLINE uint32_t LL_I2C_GetTimingPrescaler(I2C_TypeDef *I2Cx)
894 {
895  return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_PRESC) >> I2C_TIMINGR_PRESC_Pos);
896 }
897 
904 __STATIC_INLINE uint32_t LL_I2C_GetClockLowPeriod(I2C_TypeDef *I2Cx)
905 {
906  return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SCLL) >> I2C_TIMINGR_SCLL_Pos);
907 }
908 
915 __STATIC_INLINE uint32_t LL_I2C_GetClockHighPeriod(I2C_TypeDef *I2Cx)
916 {
917  return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SCLH) >> I2C_TIMINGR_SCLH_Pos);
918 }
919 
926 __STATIC_INLINE uint32_t LL_I2C_GetDataHoldTime(I2C_TypeDef *I2Cx)
927 {
928  return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SDADEL) >> I2C_TIMINGR_SDADEL_Pos);
929 }
930 
937 __STATIC_INLINE uint32_t LL_I2C_GetDataSetupTime(I2C_TypeDef *I2Cx)
938 {
939  return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SCLDEL) >> I2C_TIMINGR_SCLDEL_Pos);
940 }
941 
956 __STATIC_INLINE void LL_I2C_SetMode(I2C_TypeDef *I2Cx, uint32_t PeripheralMode)
957 {
958  MODIFY_REG(I2Cx->CR1, I2C_CR1_SMBHEN | I2C_CR1_SMBDEN, PeripheralMode);
959 }
960 
974 __STATIC_INLINE uint32_t LL_I2C_GetMode(I2C_TypeDef *I2Cx)
975 {
976  return (uint32_t)(READ_BIT(I2Cx->CR1, I2C_CR1_SMBHEN | I2C_CR1_SMBDEN));
977 }
978 
992 __STATIC_INLINE void LL_I2C_EnableSMBusAlert(I2C_TypeDef *I2Cx)
993 {
994  SET_BIT(I2Cx->CR1, I2C_CR1_ALERTEN);
995 }
996 
1010 __STATIC_INLINE void LL_I2C_DisableSMBusAlert(I2C_TypeDef *I2Cx)
1011 {
1012  CLEAR_BIT(I2Cx->CR1, I2C_CR1_ALERTEN);
1013 }
1014 
1023 __STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusAlert(I2C_TypeDef *I2Cx)
1024 {
1025  return ((READ_BIT(I2Cx->CR1, I2C_CR1_ALERTEN) == (I2C_CR1_ALERTEN)) ? 1UL : 0UL);
1026 }
1027 
1036 __STATIC_INLINE void LL_I2C_EnableSMBusPEC(I2C_TypeDef *I2Cx)
1037 {
1038  SET_BIT(I2Cx->CR1, I2C_CR1_PECEN);
1039 }
1040 
1049 __STATIC_INLINE void LL_I2C_DisableSMBusPEC(I2C_TypeDef *I2Cx)
1050 {
1051  CLEAR_BIT(I2Cx->CR1, I2C_CR1_PECEN);
1052 }
1053 
1062 __STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPEC(I2C_TypeDef *I2Cx)
1063 {
1064  return ((READ_BIT(I2Cx->CR1, I2C_CR1_PECEN) == (I2C_CR1_PECEN)) ? 1UL : 0UL);
1065 }
1066 
1083 __STATIC_INLINE void LL_I2C_ConfigSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t TimeoutA, uint32_t TimeoutAMode,
1084  uint32_t TimeoutB)
1085 {
1086  MODIFY_REG(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIMEOUTA | I2C_TIMEOUTR_TIDLE | I2C_TIMEOUTR_TIMEOUTB,
1087  TimeoutA | TimeoutAMode | (TimeoutB << I2C_TIMEOUTR_TIMEOUTB_Pos));
1088 }
1089 
1100 __STATIC_INLINE void LL_I2C_SetSMBusTimeoutA(I2C_TypeDef *I2Cx, uint32_t TimeoutA)
1101 {
1102  WRITE_REG(I2Cx->TIMEOUTR, TimeoutA);
1103 }
1104 
1113 __STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutA(I2C_TypeDef *I2Cx)
1114 {
1115  return (uint32_t)(READ_BIT(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIMEOUTA));
1116 }
1117 
1130 __STATIC_INLINE void LL_I2C_SetSMBusTimeoutAMode(I2C_TypeDef *I2Cx, uint32_t TimeoutAMode)
1131 {
1132  WRITE_REG(I2Cx->TIMEOUTR, TimeoutAMode);
1133 }
1134 
1145 __STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutAMode(I2C_TypeDef *I2Cx)
1146 {
1147  return (uint32_t)(READ_BIT(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIDLE));
1148 }
1149 
1160 __STATIC_INLINE void LL_I2C_SetSMBusTimeoutB(I2C_TypeDef *I2Cx, uint32_t TimeoutB)
1161 {
1162  WRITE_REG(I2Cx->TIMEOUTR, TimeoutB << I2C_TIMEOUTR_TIMEOUTB_Pos);
1163 }
1164 
1173 __STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutB(I2C_TypeDef *I2Cx)
1174 {
1175  return (uint32_t)(READ_BIT(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIMEOUTB) >> I2C_TIMEOUTR_TIMEOUTB_Pos);
1176 }
1177 
1191 __STATIC_INLINE void LL_I2C_EnableSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t ClockTimeout)
1192 {
1193  SET_BIT(I2Cx->TIMEOUTR, ClockTimeout);
1194 }
1195 
1209 __STATIC_INLINE void LL_I2C_DisableSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t ClockTimeout)
1210 {
1211  CLEAR_BIT(I2Cx->TIMEOUTR, ClockTimeout);
1212 }
1213 
1227 __STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t ClockTimeout)
1228 {
1229  return ((READ_BIT(I2Cx->TIMEOUTR, (I2C_TIMEOUTR_TIMOUTEN | I2C_TIMEOUTR_TEXTEN)) == (ClockTimeout)) ? 1UL : 0UL);
1230 }
1231 
1246 __STATIC_INLINE void LL_I2C_EnableIT_TX(I2C_TypeDef *I2Cx)
1247 {
1248  SET_BIT(I2Cx->CR1, I2C_CR1_TXIE);
1249 }
1250 
1257 __STATIC_INLINE void LL_I2C_DisableIT_TX(I2C_TypeDef *I2Cx)
1258 {
1259  CLEAR_BIT(I2Cx->CR1, I2C_CR1_TXIE);
1260 }
1261 
1268 __STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TX(I2C_TypeDef *I2Cx)
1269 {
1270  return ((READ_BIT(I2Cx->CR1, I2C_CR1_TXIE) == (I2C_CR1_TXIE)) ? 1UL : 0UL);
1271 }
1272 
1279 __STATIC_INLINE void LL_I2C_EnableIT_RX(I2C_TypeDef *I2Cx)
1280 {
1281  SET_BIT(I2Cx->CR1, I2C_CR1_RXIE);
1282 }
1283 
1290 __STATIC_INLINE void LL_I2C_DisableIT_RX(I2C_TypeDef *I2Cx)
1291 {
1292  CLEAR_BIT(I2Cx->CR1, I2C_CR1_RXIE);
1293 }
1294 
1301 __STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_RX(I2C_TypeDef *I2Cx)
1302 {
1303  return ((READ_BIT(I2Cx->CR1, I2C_CR1_RXIE) == (I2C_CR1_RXIE)) ? 1UL : 0UL);
1304 }
1305 
1312 __STATIC_INLINE void LL_I2C_EnableIT_ADDR(I2C_TypeDef *I2Cx)
1313 {
1314  SET_BIT(I2Cx->CR1, I2C_CR1_ADDRIE);
1315 }
1316 
1323 __STATIC_INLINE void LL_I2C_DisableIT_ADDR(I2C_TypeDef *I2Cx)
1324 {
1325  CLEAR_BIT(I2Cx->CR1, I2C_CR1_ADDRIE);
1326 }
1327 
1334 __STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ADDR(I2C_TypeDef *I2Cx)
1335 {
1336  return ((READ_BIT(I2Cx->CR1, I2C_CR1_ADDRIE) == (I2C_CR1_ADDRIE)) ? 1UL : 0UL);
1337 }
1338 
1345 __STATIC_INLINE void LL_I2C_EnableIT_NACK(I2C_TypeDef *I2Cx)
1346 {
1347  SET_BIT(I2Cx->CR1, I2C_CR1_NACKIE);
1348 }
1349 
1356 __STATIC_INLINE void LL_I2C_DisableIT_NACK(I2C_TypeDef *I2Cx)
1357 {
1358  CLEAR_BIT(I2Cx->CR1, I2C_CR1_NACKIE);
1359 }
1360 
1367 __STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_NACK(I2C_TypeDef *I2Cx)
1368 {
1369  return ((READ_BIT(I2Cx->CR1, I2C_CR1_NACKIE) == (I2C_CR1_NACKIE)) ? 1UL : 0UL);
1370 }
1371 
1378 __STATIC_INLINE void LL_I2C_EnableIT_STOP(I2C_TypeDef *I2Cx)
1379 {
1380  SET_BIT(I2Cx->CR1, I2C_CR1_STOPIE);
1381 }
1382 
1389 __STATIC_INLINE void LL_I2C_DisableIT_STOP(I2C_TypeDef *I2Cx)
1390 {
1391  CLEAR_BIT(I2Cx->CR1, I2C_CR1_STOPIE);
1392 }
1393 
1400 __STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_STOP(I2C_TypeDef *I2Cx)
1401 {
1402  return ((READ_BIT(I2Cx->CR1, I2C_CR1_STOPIE) == (I2C_CR1_STOPIE)) ? 1UL : 0UL);
1403 }
1404 
1414 __STATIC_INLINE void LL_I2C_EnableIT_TC(I2C_TypeDef *I2Cx)
1415 {
1416  SET_BIT(I2Cx->CR1, I2C_CR1_TCIE);
1417 }
1418 
1428 __STATIC_INLINE void LL_I2C_DisableIT_TC(I2C_TypeDef *I2Cx)
1429 {
1430  CLEAR_BIT(I2Cx->CR1, I2C_CR1_TCIE);
1431 }
1432 
1439 __STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TC(I2C_TypeDef *I2Cx)
1440 {
1441  return ((READ_BIT(I2Cx->CR1, I2C_CR1_TCIE) == (I2C_CR1_TCIE)) ? 1UL : 0UL);
1442 }
1443 
1459 __STATIC_INLINE void LL_I2C_EnableIT_ERR(I2C_TypeDef *I2Cx)
1460 {
1461  SET_BIT(I2Cx->CR1, I2C_CR1_ERRIE);
1462 }
1463 
1479 __STATIC_INLINE void LL_I2C_DisableIT_ERR(I2C_TypeDef *I2Cx)
1480 {
1481  CLEAR_BIT(I2Cx->CR1, I2C_CR1_ERRIE);
1482 }
1483 
1490 __STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ERR(I2C_TypeDef *I2Cx)
1491 {
1492  return ((READ_BIT(I2Cx->CR1, I2C_CR1_ERRIE) == (I2C_CR1_ERRIE)) ? 1UL : 0UL);
1493 }
1494 
1511 __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXE(I2C_TypeDef *I2Cx)
1512 {
1513  return ((READ_BIT(I2Cx->ISR, I2C_ISR_TXE) == (I2C_ISR_TXE)) ? 1UL : 0UL);
1514 }
1515 
1524 __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXIS(I2C_TypeDef *I2Cx)
1525 {
1526  return ((READ_BIT(I2Cx->ISR, I2C_ISR_TXIS) == (I2C_ISR_TXIS)) ? 1UL : 0UL);
1527 }
1528 
1537 __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_RXNE(I2C_TypeDef *I2Cx)
1538 {
1539  return ((READ_BIT(I2Cx->ISR, I2C_ISR_RXNE) == (I2C_ISR_RXNE)) ? 1UL : 0UL);
1540 }
1541 
1550 __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADDR(I2C_TypeDef *I2Cx)
1551 {
1552  return ((READ_BIT(I2Cx->ISR, I2C_ISR_ADDR) == (I2C_ISR_ADDR)) ? 1UL : 0UL);
1553 }
1554 
1563 __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_NACK(I2C_TypeDef *I2Cx)
1564 {
1565  return ((READ_BIT(I2Cx->ISR, I2C_ISR_NACKF) == (I2C_ISR_NACKF)) ? 1UL : 0UL);
1566 }
1567 
1576 __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_STOP(I2C_TypeDef *I2Cx)
1577 {
1578  return ((READ_BIT(I2Cx->ISR, I2C_ISR_STOPF) == (I2C_ISR_STOPF)) ? 1UL : 0UL);
1579 }
1580 
1589 __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TC(I2C_TypeDef *I2Cx)
1590 {
1591  return ((READ_BIT(I2Cx->ISR, I2C_ISR_TC) == (I2C_ISR_TC)) ? 1UL : 0UL);
1592 }
1593 
1602 __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TCR(I2C_TypeDef *I2Cx)
1603 {
1604  return ((READ_BIT(I2Cx->ISR, I2C_ISR_TCR) == (I2C_ISR_TCR)) ? 1UL : 0UL);
1605 }
1606 
1615 __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BERR(I2C_TypeDef *I2Cx)
1616 {
1617  return ((READ_BIT(I2Cx->ISR, I2C_ISR_BERR) == (I2C_ISR_BERR)) ? 1UL : 0UL);
1618 }
1619 
1628 __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ARLO(I2C_TypeDef *I2Cx)
1629 {
1630  return ((READ_BIT(I2Cx->ISR, I2C_ISR_ARLO) == (I2C_ISR_ARLO)) ? 1UL : 0UL);
1631 }
1632 
1641 __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_OVR(I2C_TypeDef *I2Cx)
1642 {
1643  return ((READ_BIT(I2Cx->ISR, I2C_ISR_OVR) == (I2C_ISR_OVR)) ? 1UL : 0UL);
1644 }
1645 
1656 __STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_PECERR(I2C_TypeDef *I2Cx)
1657 {
1658  return ((READ_BIT(I2Cx->ISR, I2C_ISR_PECERR) == (I2C_ISR_PECERR)) ? 1UL : 0UL);
1659 }
1660 
1671 __STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_TIMEOUT(I2C_TypeDef *I2Cx)
1672 {
1673  return ((READ_BIT(I2Cx->ISR, I2C_ISR_TIMEOUT) == (I2C_ISR_TIMEOUT)) ? 1UL : 0UL);
1674 }
1675 
1687 __STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_ALERT(I2C_TypeDef *I2Cx)
1688 {
1689  return ((READ_BIT(I2Cx->ISR, I2C_ISR_ALERT) == (I2C_ISR_ALERT)) ? 1UL : 0UL);
1690 }
1691 
1700 __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BUSY(I2C_TypeDef *I2Cx)
1701 {
1702  return ((READ_BIT(I2Cx->ISR, I2C_ISR_BUSY) == (I2C_ISR_BUSY)) ? 1UL : 0UL);
1703 }
1704 
1711 __STATIC_INLINE void LL_I2C_ClearFlag_ADDR(I2C_TypeDef *I2Cx)
1712 {
1713  SET_BIT(I2Cx->ICR, I2C_ICR_ADDRCF);
1714 }
1715 
1722 __STATIC_INLINE void LL_I2C_ClearFlag_NACK(I2C_TypeDef *I2Cx)
1723 {
1724  SET_BIT(I2Cx->ICR, I2C_ICR_NACKCF);
1725 }
1726 
1733 __STATIC_INLINE void LL_I2C_ClearFlag_STOP(I2C_TypeDef *I2Cx)
1734 {
1735  SET_BIT(I2Cx->ICR, I2C_ICR_STOPCF);
1736 }
1737 
1745 __STATIC_INLINE void LL_I2C_ClearFlag_TXE(I2C_TypeDef *I2Cx)
1746 {
1747  WRITE_REG(I2Cx->ISR, I2C_ISR_TXE);
1748 }
1749 
1756 __STATIC_INLINE void LL_I2C_ClearFlag_BERR(I2C_TypeDef *I2Cx)
1757 {
1758  SET_BIT(I2Cx->ICR, I2C_ICR_BERRCF);
1759 }
1760 
1767 __STATIC_INLINE void LL_I2C_ClearFlag_ARLO(I2C_TypeDef *I2Cx)
1768 {
1769  SET_BIT(I2Cx->ICR, I2C_ICR_ARLOCF);
1770 }
1771 
1778 __STATIC_INLINE void LL_I2C_ClearFlag_OVR(I2C_TypeDef *I2Cx)
1779 {
1780  SET_BIT(I2Cx->ICR, I2C_ICR_OVRCF);
1781 }
1782 
1791 __STATIC_INLINE void LL_I2C_ClearSMBusFlag_PECERR(I2C_TypeDef *I2Cx)
1792 {
1793  SET_BIT(I2Cx->ICR, I2C_ICR_PECCF);
1794 }
1795 
1804 __STATIC_INLINE void LL_I2C_ClearSMBusFlag_TIMEOUT(I2C_TypeDef *I2Cx)
1805 {
1806  SET_BIT(I2Cx->ICR, I2C_ICR_TIMOUTCF);
1807 }
1808 
1817 __STATIC_INLINE void LL_I2C_ClearSMBusFlag_ALERT(I2C_TypeDef *I2Cx)
1818 {
1819  SET_BIT(I2Cx->ICR, I2C_ICR_ALERTCF);
1820 }
1821 
1838 __STATIC_INLINE void LL_I2C_EnableAutoEndMode(I2C_TypeDef *I2Cx)
1839 {
1840  SET_BIT(I2Cx->CR2, I2C_CR2_AUTOEND);
1841 }
1842 
1850 __STATIC_INLINE void LL_I2C_DisableAutoEndMode(I2C_TypeDef *I2Cx)
1851 {
1852  CLEAR_BIT(I2Cx->CR2, I2C_CR2_AUTOEND);
1853 }
1854 
1861 __STATIC_INLINE uint32_t LL_I2C_IsEnabledAutoEndMode(I2C_TypeDef *I2Cx)
1862 {
1863  return ((READ_BIT(I2Cx->CR2, I2C_CR2_AUTOEND) == (I2C_CR2_AUTOEND)) ? 1UL : 0UL);
1864 }
1865 
1873 __STATIC_INLINE void LL_I2C_EnableReloadMode(I2C_TypeDef *I2Cx)
1874 {
1875  SET_BIT(I2Cx->CR2, I2C_CR2_RELOAD);
1876 }
1877 
1885 __STATIC_INLINE void LL_I2C_DisableReloadMode(I2C_TypeDef *I2Cx)
1886 {
1887  CLEAR_BIT(I2Cx->CR2, I2C_CR2_RELOAD);
1888 }
1889 
1896 __STATIC_INLINE uint32_t LL_I2C_IsEnabledReloadMode(I2C_TypeDef *I2Cx)
1897 {
1898  return ((READ_BIT(I2Cx->CR2, I2C_CR2_RELOAD) == (I2C_CR2_RELOAD)) ? 1UL : 0UL);
1899 }
1900 
1909 __STATIC_INLINE void LL_I2C_SetTransferSize(I2C_TypeDef *I2Cx, uint32_t TransferSize)
1910 {
1911  MODIFY_REG(I2Cx->CR2, I2C_CR2_NBYTES, TransferSize << I2C_CR2_NBYTES_Pos);
1912 }
1913 
1920 __STATIC_INLINE uint32_t LL_I2C_GetTransferSize(I2C_TypeDef *I2Cx)
1921 {
1922  return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_NBYTES) >> I2C_CR2_NBYTES_Pos);
1923 }
1924 
1935 __STATIC_INLINE void LL_I2C_AcknowledgeNextData(I2C_TypeDef *I2Cx, uint32_t TypeAcknowledge)
1936 {
1937  MODIFY_REG(I2Cx->CR2, I2C_CR2_NACK, TypeAcknowledge);
1938 }
1939 
1948 __STATIC_INLINE void LL_I2C_GenerateStartCondition(I2C_TypeDef *I2Cx)
1949 {
1950  SET_BIT(I2Cx->CR2, I2C_CR2_START);
1951 }
1952 
1959 __STATIC_INLINE void LL_I2C_GenerateStopCondition(I2C_TypeDef *I2Cx)
1960 {
1961  SET_BIT(I2Cx->CR2, I2C_CR2_STOP);
1962 }
1963 
1972 __STATIC_INLINE void LL_I2C_EnableAuto10BitRead(I2C_TypeDef *I2Cx)
1973 {
1974  CLEAR_BIT(I2Cx->CR2, I2C_CR2_HEAD10R);
1975 }
1976 
1984 __STATIC_INLINE void LL_I2C_DisableAuto10BitRead(I2C_TypeDef *I2Cx)
1985 {
1986  SET_BIT(I2Cx->CR2, I2C_CR2_HEAD10R);
1987 }
1988 
1995 __STATIC_INLINE uint32_t LL_I2C_IsEnabledAuto10BitRead(I2C_TypeDef *I2Cx)
1996 {
1997  return ((READ_BIT(I2Cx->CR2, I2C_CR2_HEAD10R) != (I2C_CR2_HEAD10R)) ? 1UL : 0UL);
1998 }
1999 
2010 __STATIC_INLINE void LL_I2C_SetTransferRequest(I2C_TypeDef *I2Cx, uint32_t TransferRequest)
2011 {
2012  MODIFY_REG(I2Cx->CR2, I2C_CR2_RD_WRN, TransferRequest);
2013 }
2014 
2023 __STATIC_INLINE uint32_t LL_I2C_GetTransferRequest(I2C_TypeDef *I2Cx)
2024 {
2025  return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_RD_WRN));
2026 }
2027 
2036 __STATIC_INLINE void LL_I2C_SetSlaveAddr(I2C_TypeDef *I2Cx, uint32_t SlaveAddr)
2037 {
2038  MODIFY_REG(I2Cx->CR2, I2C_CR2_SADD, SlaveAddr);
2039 }
2040 
2047 __STATIC_INLINE uint32_t LL_I2C_GetSlaveAddr(I2C_TypeDef *I2Cx)
2048 {
2049  return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_SADD));
2050 }
2051 
2090 __STATIC_INLINE void LL_I2C_HandleTransfer(I2C_TypeDef *I2Cx, uint32_t SlaveAddr, uint32_t SlaveAddrSize,
2091  uint32_t TransferSize, uint32_t EndMode, uint32_t Request)
2092 {
2093  MODIFY_REG(I2Cx->CR2, I2C_CR2_SADD | I2C_CR2_ADD10 | (I2C_CR2_RD_WRN & (uint32_t)(Request >> (31U - I2C_CR2_RD_WRN_Pos))) | I2C_CR2_START | I2C_CR2_STOP | I2C_CR2_RELOAD |
2094  I2C_CR2_NBYTES | I2C_CR2_AUTOEND | I2C_CR2_HEAD10R,
2095  SlaveAddr | SlaveAddrSize | (TransferSize << I2C_CR2_NBYTES_Pos) | EndMode | Request);
2096 }
2097 
2108 __STATIC_INLINE uint32_t LL_I2C_GetTransferDirection(I2C_TypeDef *I2Cx)
2109 {
2110  return (uint32_t)(READ_BIT(I2Cx->ISR, I2C_ISR_DIR));
2111 }
2112 
2119 __STATIC_INLINE uint32_t LL_I2C_GetAddressMatchCode(I2C_TypeDef *I2Cx)
2120 {
2121  return (uint32_t)(READ_BIT(I2Cx->ISR, I2C_ISR_ADDCODE) >> I2C_ISR_ADDCODE_Pos << 1);
2122 }
2123 
2135 __STATIC_INLINE void LL_I2C_EnableSMBusPECCompare(I2C_TypeDef *I2Cx)
2136 {
2137  SET_BIT(I2Cx->CR2, I2C_CR2_PECBYTE);
2138 }
2139 
2148 __STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPECCompare(I2C_TypeDef *I2Cx)
2149 {
2150  return ((READ_BIT(I2Cx->CR2, I2C_CR2_PECBYTE) == (I2C_CR2_PECBYTE)) ? 1UL : 0UL);
2151 }
2152 
2161 __STATIC_INLINE uint32_t LL_I2C_GetSMBusPEC(I2C_TypeDef *I2Cx)
2162 {
2163  return (uint32_t)(READ_BIT(I2Cx->PECR, I2C_PECR_PEC));
2164 }
2165 
2172 __STATIC_INLINE uint8_t LL_I2C_ReceiveData8(I2C_TypeDef *I2Cx)
2173 {
2174  return (uint8_t)(READ_BIT(I2Cx->RXDR, I2C_RXDR_RXDATA));
2175 }
2176 
2184 __STATIC_INLINE void LL_I2C_TransmitData8(I2C_TypeDef *I2Cx, uint8_t Data)
2185 {
2186  WRITE_REG(I2Cx->TXDR, Data);
2187 }
2188 
2193 #if defined(USE_FULL_LL_DRIVER)
2194 
2198 ErrorStatus LL_I2C_Init(I2C_TypeDef *I2Cx, LL_I2C_InitTypeDef *I2C_InitStruct);
2199 ErrorStatus LL_I2C_DeInit(I2C_TypeDef *I2Cx);
2200 void LL_I2C_StructInit(LL_I2C_InitTypeDef *I2C_InitStruct);
2201 
2202 
2206 #endif /* USE_FULL_LL_DRIVER */
2207 
2216 #endif /* I2C1 || I2C2 || I2C3 || I2C4 */
2217 
2222 #ifdef __cplusplus
2223 }
2224 #endif
2225 
2226 #endif /* STM32L4xx_LL_I2C_H */
2227 
2228 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
__STATIC_INLINE void LL_I2C_ClearFlag_STOP(I2C_TypeDef *I2Cx)
Clear Stop detection flag. ICR STOPCF LL_I2C_ClearFlag_STOP.
__STATIC_INLINE void LL_I2C_ClearSMBusFlag_PECERR(I2C_TypeDef *I2Cx)
Clear SMBus PEC error flag.
__STATIC_INLINE void LL_I2C_HandleTransfer(I2C_TypeDef *I2Cx, uint32_t SlaveAddr, uint32_t SlaveAddrSize, uint32_t TransferSize, uint32_t EndMode, uint32_t Request)
Handles I2Cx communication when starting transfer or during transfer (TC or TCR flag are set)...
__STATIC_INLINE uint32_t LL_I2C_IsEnabledGeneralCall(I2C_TypeDef *I2Cx)
Check if General Call is enabled or disabled. CR1 GCEN LL_I2C_IsEnabledGeneralCall.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TCR(I2C_TypeDef *I2Cx)
Indicate the status of Transfer complete flag (master mode).
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_TIMEOUT(I2C_TypeDef *I2Cx)
Indicate the status of SMBus Timeout detection flag.
__STATIC_INLINE uint32_t LL_I2C_GetSlaveAddr(I2C_TypeDef *I2Cx)
Get the slave address programmed for transfer. CR2 SADD LL_I2C_GetSlaveAddr.
__STATIC_INLINE void LL_I2C_DisableIT_STOP(I2C_TypeDef *I2Cx)
Disable STOP detection interrupt. CR1 STOPIE LL_I2C_DisableIT_STOP.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSlaveByteControl(I2C_TypeDef *I2Cx)
Check if hardware byte control in slave mode is enabled or disabled. CR1 SBC LL_I2C_IsEnabledSlaveBy...
__STATIC_INLINE void LL_I2C_EnableDMAReq_RX(I2C_TypeDef *I2Cx)
Enable DMA reception requests. CR1 RXDMAEN LL_I2C_EnableDMAReq_RX.
__STATIC_INLINE void LL_I2C_DisableClockStretching(I2C_TypeDef *I2Cx)
Disable Clock stretching.
__STATIC_INLINE void LL_I2C_ConfigFilters(I2C_TypeDef *I2Cx, uint32_t AnalogFilter, uint32_t DigitalFilter)
Configure Noise Filters (Analog and Digital).
__STATIC_INLINE void LL_I2C_DisableSlaveByteControl(I2C_TypeDef *I2Cx)
Disable hardware byte control in slave mode. CR1 SBC LL_I2C_DisableSlaveByteControl.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_RX(I2C_TypeDef *I2Cx)
Check if DMA reception requests are enabled or disabled. CR1 RXDMAEN LL_I2C_IsEnabledDMAReq_RX.
__STATIC_INLINE void LL_I2C_EnableClockStretching(I2C_TypeDef *I2Cx)
Enable Clock stretching.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXE(I2C_TypeDef *I2Cx)
Indicate the status of Transmit data register empty flag.
__STATIC_INLINE void LL_I2C_DisableIT_TC(I2C_TypeDef *I2Cx)
Disable Transfer Complete interrupt.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TC(I2C_TypeDef *I2Cx)
Indicate the status of Transfer complete flag (master mode).
__STATIC_INLINE void LL_I2C_ClearFlag_BERR(I2C_TypeDef *I2Cx)
Clear Bus error flag. ICR BERRCF LL_I2C_ClearFlag_BERR.
__STATIC_INLINE void LL_I2C_EnableAutoEndMode(I2C_TypeDef *I2Cx)
Enable automatic STOP condition generation (master mode).
__STATIC_INLINE void LL_I2C_DisableAuto10BitRead(I2C_TypeDef *I2Cx)
Disable automatic RESTART Read request condition for 10bit address header (master mode)...
__STATIC_INLINE uint32_t LL_I2C_GetTransferDirection(I2C_TypeDef *I2Cx)
Indicate the value of transfer direction (slave mode).
__STATIC_INLINE uint8_t LL_I2C_ReceiveData8(I2C_TypeDef *I2Cx)
Read Receive Data register. RXDR RXDATA LL_I2C_ReceiveData8.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusAlert(I2C_TypeDef *I2Cx)
Check if SMBus alert (Host or Device mode) is enabled or disabled.
__STATIC_INLINE void LL_I2C_ConfigSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t TimeoutA, uint32_t TimeoutAMode, uint32_t TimeoutB)
Configure the SMBus Clock Timeout.
__STATIC_INLINE void LL_I2C_DisableDMAReq_RX(I2C_TypeDef *I2Cx)
Disable DMA reception requests. CR1 RXDMAEN LL_I2C_DisableDMAReq_RX.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPEC(I2C_TypeDef *I2Cx)
Check if SMBus Packet Error Calculation (PEC) is enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableSMBusAlert(I2C_TypeDef *I2Cx)
Enable SMBus alert (Host or Device mode)
__STATIC_INLINE void LL_I2C_SetMode(I2C_TypeDef *I2Cx, uint32_t PeripheralMode)
Configure peripheral mode.
__STATIC_INLINE void LL_I2C_EnableSMBusPECCompare(I2C_TypeDef *I2Cx)
Enable internal comparison of the SMBus Packet Error byte (transmission or reception mode)...
ErrorStatus LL_I2C_DeInit(I2C_TypeDef *I2Cx)
De-initialize the I2C registers to their default reset values.
__STATIC_INLINE void LL_I2C_ClearSMBusFlag_ALERT(I2C_TypeDef *I2Cx)
Clear SMBus Alert flag.
__STATIC_INLINE void LL_I2C_DisableIT_RX(I2C_TypeDef *I2Cx)
Disable RXNE interrupt. CR1 RXIE LL_I2C_DisableIT_RX.
__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutA(I2C_TypeDef *I2Cx)
Get the SMBus Clock TimeoutA setting.
__STATIC_INLINE void LL_I2C_EnableIT_ERR(I2C_TypeDef *I2Cx)
Enable Error interrupts.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXIS(I2C_TypeDef *I2Cx)
Indicate the status of Transmit interrupt flag.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ADDR(I2C_TypeDef *I2Cx)
Check if Address match interrupt is enabled or disabled. CR1 ADDRIE LL_I2C_IsEnabledIT_ADDR.
__STATIC_INLINE void LL_I2C_SetTransferSize(I2C_TypeDef *I2Cx, uint32_t TransferSize)
Configure the number of bytes for transfer.
__STATIC_INLINE uint32_t LL_I2C_GetTimingPrescaler(I2C_TypeDef *I2Cx)
Get the Timing Prescaler setting. TIMINGR PRESC LL_I2C_GetTimingPrescaler.
__STATIC_INLINE void LL_I2C_GenerateStartCondition(I2C_TypeDef *I2Cx)
Generate a START or RESTART condition.
__STATIC_INLINE void LL_I2C_DisableWakeUpFromStop(I2C_TypeDef *I2Cx)
Disable Wakeup from STOP.
__STATIC_INLINE void LL_I2C_SetSMBusTimeoutB(I2C_TypeDef *I2Cx, uint32_t TimeoutB)
Configure the SMBus Extended Cumulative Clock TimeoutB (Master or Slave mode).
__STATIC_INLINE void LL_I2C_ClearFlag_ARLO(I2C_TypeDef *I2Cx)
Clear Arbitration lost flag. ICR ARLOCF LL_I2C_ClearFlag_ARLO.
__STATIC_INLINE void LL_I2C_Enable(I2C_TypeDef *I2Cx)
Enable I2C peripheral (PE = 1). CR1 PE LL_I2C_Enable.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPECCompare(I2C_TypeDef *I2Cx)
Check if the SMBus Packet Error byte internal comparison is requested or not.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_OVR(I2C_TypeDef *I2Cx)
Indicate the status of Overrun/Underrun flag (slave mode).
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ARLO(I2C_TypeDef *I2Cx)
Indicate the status of Arbitration lost flag.
__STATIC_INLINE void LL_I2C_DisableSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t ClockTimeout)
Disable the SMBus Clock Timeout.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_STOP(I2C_TypeDef *I2Cx)
Check if STOP detection interrupt is enabled or disabled. CR1 STOPIE LL_I2C_IsEnabledIT_STOP.
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_PECERR(I2C_TypeDef *I2Cx)
Indicate the status of SMBus PEC error flag in reception.
__STATIC_INLINE void LL_I2C_EnableAnalogFilter(I2C_TypeDef *I2Cx)
Enable Analog Noise Filter.
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)
__STATIC_INLINE void LL_I2C_EnableSlaveByteControl(I2C_TypeDef *I2Cx)
Enable hardware byte control in slave mode. CR1 SBC LL_I2C_EnableSlaveByteControl.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BUSY(I2C_TypeDef *I2Cx)
Indicate the status of Bus Busy flag.
__STATIC_INLINE void LL_I2C_DisableSMBusAlert(I2C_TypeDef *I2Cx)
Disable SMBus alert (Host or Device mode)
__STATIC_INLINE void LL_I2C_DisableIT_NACK(I2C_TypeDef *I2Cx)
Disable Not acknowledge received interrupt. CR1 NACKIE LL_I2C_DisableIT_NACK.
__STATIC_INLINE void LL_I2C_DisableReloadMode(I2C_TypeDef *I2Cx)
Disable reload mode (master mode).
__STATIC_INLINE void LL_I2C_ClearFlag_ADDR(I2C_TypeDef *I2Cx)
Clear Address Matched flag. ICR ADDRCF LL_I2C_ClearFlag_ADDR.
__STATIC_INLINE uint32_t LL_I2C_IsEnabled(I2C_TypeDef *I2Cx)
Check if the I2C peripheral is enabled or disabled. CR1 PE LL_I2C_IsEnabled.
__STATIC_INLINE void LL_I2C_SetSlaveAddr(I2C_TypeDef *I2Cx, uint32_t SlaveAddr)
Configure the slave address for transfer (master mode).
__STATIC_INLINE void LL_I2C_SetOwnAddress1(I2C_TypeDef *I2Cx, uint32_t OwnAddress1, uint32_t OwnAddrSize)
Set the Own Address1. OAR1 OA1 LL_I2C_SetOwnAddress1 OAR1 OA1MODE LL_I2C_SetOwnAddress1.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledReloadMode(I2C_TypeDef *I2Cx)
Check if reload mode is enabled or disabled. CR2 RELOAD LL_I2C_IsEnabledReloadMode.
__STATIC_INLINE void LL_I2C_EnableOwnAddress1(I2C_TypeDef *I2Cx)
Enable acknowledge on Own Address1 match address. OAR1 OA1EN LL_I2C_EnableOwnAddress1.
__STATIC_INLINE void LL_I2C_DisableOwnAddress1(I2C_TypeDef *I2Cx)
Disable acknowledge on Own Address1 match address. OAR1 OA1EN LL_I2C_DisableOwnAddress1.
__STATIC_INLINE void LL_I2C_EnableIT_TX(I2C_TypeDef *I2Cx)
Enable TXIS interrupt. CR1 TXIE LL_I2C_EnableIT_TX.
__STATIC_INLINE uint32_t LL_I2C_GetClockHighPeriod(I2C_TypeDef *I2Cx)
Get the SCL high period setting. TIMINGR SCLH LL_I2C_GetClockHighPeriod.
__STATIC_INLINE void LL_I2C_EnableAuto10BitRead(I2C_TypeDef *I2Cx)
Enable automatic RESTART Read request condition for 10bit address header (master mode).
__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress1(I2C_TypeDef *I2Cx)
Check if Own Address1 acknowledge is enabled or disabled. OAR1 OA1EN LL_I2C_IsEnabledOwnAddress1.
ErrorStatus LL_I2C_Init(I2C_TypeDef *I2Cx, LL_I2C_InitTypeDef *I2C_InitStruct)
Initialize the I2C registers according to the specified parameters in I2C_InitStruct.
__STATIC_INLINE void LL_I2C_SetDigitalFilter(I2C_TypeDef *I2Cx, uint32_t DigitalFilter)
Configure Digital Noise Filter.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_TX(I2C_TypeDef *I2Cx)
Check if DMA transmission requests are enabled or disabled. CR1 TXDMAEN LL_I2C_IsEnabledDMAReq_TX.
__STATIC_INLINE uint32_t LL_I2C_GetDataHoldTime(I2C_TypeDef *I2Cx)
Get the SDA hold time. TIMINGR SDADEL LL_I2C_GetDataHoldTime.
__STATIC_INLINE uint32_t LL_I2C_GetSMBusPEC(I2C_TypeDef *I2Cx)
Get the SMBus Packet Error byte calculated.
__STATIC_INLINE void LL_I2C_SetOwnAddress2(I2C_TypeDef *I2Cx, uint32_t OwnAddress2, uint32_t OwnAddrMask)
Set the 7bits Own Address2.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t ClockTimeout)
Check if the SMBus Clock Timeout is enabled or disabled.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BERR(I2C_TypeDef *I2Cx)
Indicate the status of Bus error flag.
__STATIC_INLINE uint32_t LL_I2C_GetTransferRequest(I2C_TypeDef *I2Cx)
Get the transfer direction requested (master mode). CR2 RD_WRN LL_I2C_GetTransferRequest.
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_ALERT(I2C_TypeDef *I2Cx)
Indicate the status of SMBus alert flag.
__STATIC_INLINE uint32_t LL_I2C_GetClockLowPeriod(I2C_TypeDef *I2Cx)
Get the SCL low period setting. TIMINGR SCLL LL_I2C_GetClockLowPeriod.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledClockStretching(I2C_TypeDef *I2Cx)
Check if Clock stretching is enabled or disabled. CR1 NOSTRETCH LL_I2C_IsEnabledClockStretching.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_RXNE(I2C_TypeDef *I2Cx)
Indicate the status of Receive data register not empty flag.
__STATIC_INLINE uint32_t LL_I2C_GetTransferSize(I2C_TypeDef *I2Cx)
Get the number of bytes configured for transfer. CR2 NBYTES LL_I2C_GetTransferSize.
__STATIC_INLINE void LL_I2C_DisableIT_TX(I2C_TypeDef *I2Cx)
Disable TXIS interrupt. CR1 TXIE LL_I2C_DisableIT_TX.
__STATIC_INLINE void LL_I2C_DisableSMBusPEC(I2C_TypeDef *I2Cx)
Disable SMBus Packet Error Calculation (PEC).
__STATIC_INLINE void LL_I2C_SetSMBusTimeoutAMode(I2C_TypeDef *I2Cx, uint32_t TimeoutAMode)
Set the SMBus Clock TimeoutA mode.
__STATIC_INLINE uint32_t LL_I2C_GetDataSetupTime(I2C_TypeDef *I2Cx)
Get the SDA setup time. TIMINGR SCLDEL LL_I2C_GetDataSetupTime.
__STATIC_INLINE void LL_I2C_EnableWakeUpFromStop(I2C_TypeDef *I2Cx)
Enable Wakeup from STOP.
__STATIC_INLINE void LL_I2C_ClearFlag_OVR(I2C_TypeDef *I2Cx)
Clear Overrun/Underrun flag. ICR OVRCF LL_I2C_ClearFlag_OVR.
__STATIC_INLINE void LL_I2C_EnableIT_NACK(I2C_TypeDef *I2Cx)
Enable Not acknowledge received interrupt. CR1 NACKIE LL_I2C_EnableIT_NACK.
__STATIC_INLINE void LL_I2C_ClearFlag_TXE(I2C_TypeDef *I2Cx)
Clear Transmit data register empty flag (TXE).
__STATIC_INLINE void LL_I2C_DisableIT_ERR(I2C_TypeDef *I2Cx)
Disable Error interrupts.
__STATIC_INLINE void LL_I2C_EnableGeneralCall(I2C_TypeDef *I2Cx)
Enable General Call.
__STATIC_INLINE void LL_I2C_EnableSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t ClockTimeout)
Enable the SMBus Clock Timeout.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_RX(I2C_TypeDef *I2Cx)
Check if the RXNE Interrupt is enabled or disabled. CR1 RXIE LL_I2C_IsEnabledIT_RX.
__STATIC_INLINE void LL_I2C_EnableSMBusPEC(I2C_TypeDef *I2Cx)
Enable SMBus Packet Error Calculation (PEC).
__STATIC_INLINE void LL_I2C_SetSMBusTimeoutA(I2C_TypeDef *I2Cx, uint32_t TimeoutA)
Configure the SMBus Clock TimeoutA (SCL low timeout or SCL and SDA high timeout depends on TimeoutA m...
__STATIC_INLINE void LL_I2C_EnableIT_STOP(I2C_TypeDef *I2Cx)
Enable STOP detection interrupt. CR1 STOPIE LL_I2C_EnableIT_STOP.
__STATIC_INLINE uint32_t LL_I2C_DMA_GetRegAddr(I2C_TypeDef *I2Cx, uint32_t Direction)
Get the data register address used for DMA transfer TXDR TXDATA LL_I2C_DMA_GetRegAddr RXDR RXDATA L...
__STATIC_INLINE void LL_I2C_Disable(I2C_TypeDef *I2Cx)
Disable I2C peripheral (PE = 0).
__STATIC_INLINE void LL_I2C_EnableIT_TC(I2C_TypeDef *I2Cx)
Enable Transfer Complete interrupt.
__STATIC_INLINE void LL_I2C_DisableIT_ADDR(I2C_TypeDef *I2Cx)
Disable Address match interrupt (slave mode only). CR1 ADDRIE LL_I2C_DisableIT_ADDR.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TC(I2C_TypeDef *I2Cx)
Check if Transfer Complete interrupt is enabled or disabled. CR1 TCIE LL_I2C_IsEnabledIT_TC.
__STATIC_INLINE void LL_I2C_SetTiming(I2C_TypeDef *I2Cx, uint32_t Timing)
Configure the SDA setup, hold time and the SCL high, low period.
__STATIC_INLINE uint32_t LL_I2C_GetDigitalFilter(I2C_TypeDef *I2Cx)
Get the current Digital Noise Filter configuration. CR1 DNF LL_I2C_GetDigitalFilter.
__STATIC_INLINE void LL_I2C_EnableReloadMode(I2C_TypeDef *I2Cx)
Enable reload mode (master mode).
__STATIC_INLINE void LL_I2C_AcknowledgeNextData(I2C_TypeDef *I2Cx, uint32_t TypeAcknowledge)
Prepare the generation of a ACKnowledge or Non ACKnowledge condition after the address receive match ...
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ERR(I2C_TypeDef *I2Cx)
Check if Error interrupts are enabled or disabled. CR1 ERRIE LL_I2C_IsEnabledIT_ERR.
__STATIC_INLINE void LL_I2C_TransmitData8(I2C_TypeDef *I2Cx, uint8_t Data)
Write in Transmit Data Register . TXDR TXDATA LL_I2C_TransmitData8.
__STATIC_INLINE uint32_t LL_I2C_GetMode(I2C_TypeDef *I2Cx)
Get peripheral mode.
__STATIC_INLINE void LL_I2C_EnableIT_RX(I2C_TypeDef *I2Cx)
Enable RXNE interrupt. CR1 RXIE LL_I2C_EnableIT_RX.
__STATIC_INLINE uint32_t LL_I2C_GetAddressMatchCode(I2C_TypeDef *I2Cx)
Return the slave matched address. ISR ADDCODE LL_I2C_GetAddressMatchCode.
__STATIC_INLINE uint32_t LL_I2C_GetMasterAddressingMode(I2C_TypeDef *I2Cx)
Get the Master addressing mode. CR2 ADD10 LL_I2C_GetMasterAddressingMode.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_NACK(I2C_TypeDef *I2Cx)
Indicate the status of Not Acknowledge received flag.
__STATIC_INLINE void LL_I2C_SetTransferRequest(I2C_TypeDef *I2Cx, uint32_t TransferRequest)
Configure the transfer direction (master mode).
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TX(I2C_TypeDef *I2Cx)
Check if the TXIS Interrupt is enabled or disabled. CR1 TXIE LL_I2C_IsEnabledIT_TX.
__STATIC_INLINE void LL_I2C_GenerateStopCondition(I2C_TypeDef *I2Cx)
Generate a STOP condition after the current byte transfer (master mode). CR2 STOP LL_I2C_GenerateSto...
__STATIC_INLINE void LL_I2C_ClearFlag_NACK(I2C_TypeDef *I2Cx)
Clear Not Acknowledge flag. ICR NACKCF LL_I2C_ClearFlag_NACK.
__STATIC_INLINE void LL_I2C_DisableGeneralCall(I2C_TypeDef *I2Cx)
Disable General Call.
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_STOP(I2C_TypeDef *I2Cx)
Indicate the status of Stop detection flag.
void LL_I2C_StructInit(LL_I2C_InitTypeDef *I2C_InitStruct)
Set each LL_I2C_InitTypeDef field to default value.
__STATIC_INLINE void LL_I2C_SetMasterAddressingMode(I2C_TypeDef *I2Cx, uint32_t AddressingMode)
Configure the Master to operate in 7-bit or 10-bit addressing mode.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress2(I2C_TypeDef *I2Cx)
Check if Own Address1 acknowledge is enabled or disabled. OAR2 OA2EN LL_I2C_IsEnabledOwnAddress2.
__STATIC_INLINE void LL_I2C_DisableDMAReq_TX(I2C_TypeDef *I2Cx)
Disable DMA transmission requests. CR1 TXDMAEN LL_I2C_DisableDMAReq_TX.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledWakeUpFromStop(I2C_TypeDef *I2Cx)
Check if Wakeup from STOP is enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableIT_ADDR(I2C_TypeDef *I2Cx)
Enable Address match interrupt (slave mode only). CR1 ADDRIE LL_I2C_EnableIT_ADDR.
__STATIC_INLINE void LL_I2C_ClearSMBusFlag_TIMEOUT(I2C_TypeDef *I2Cx)
Clear SMBus Timeout detection flag.
__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutB(I2C_TypeDef *I2Cx)
Get the SMBus Extented Cumulative Clock TimeoutB setting.
__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutAMode(I2C_TypeDef *I2Cx)
Get the SMBus Clock TimeoutA mode.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledAnalogFilter(I2C_TypeDef *I2Cx)
Check if Analog Noise Filter is enabled or disabled. CR1 ANFOFF LL_I2C_IsEnabledAnalogFilter.
__STATIC_INLINE void LL_I2C_DisableAutoEndMode(I2C_TypeDef *I2Cx)
Disable automatic STOP condition generation (master mode).
__STATIC_INLINE uint32_t LL_I2C_IsEnabledAutoEndMode(I2C_TypeDef *I2Cx)
Check if automatic STOP condition is enabled or disabled. CR2 AUTOEND LL_I2C_IsEnabledAutoEndMode.
__STATIC_INLINE void LL_I2C_DisableOwnAddress2(I2C_TypeDef *I2Cx)
Disable acknowledge on Own Address2 match address. OAR2 OA2EN LL_I2C_DisableOwnAddress2.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledAuto10BitRead(I2C_TypeDef *I2Cx)
Check if automatic RESTART Read request condition for 10bit address header is enabled or disabled...
__STATIC_INLINE void LL_I2C_EnableDMAReq_TX(I2C_TypeDef *I2Cx)
Enable DMA transmission requests. CR1 TXDMAEN LL_I2C_EnableDMAReq_TX.
__STATIC_INLINE void LL_I2C_EnableOwnAddress2(I2C_TypeDef *I2Cx)
Enable acknowledge on Own Address2 match address. OAR2 OA2EN LL_I2C_EnableOwnAddress2.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_NACK(I2C_TypeDef *I2Cx)
Check if Not acknowledge received interrupt is enabled or disabled. CR1 NACKIE LL_I2C_IsEnabledIT_NA...
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADDR(I2C_TypeDef *I2Cx)
Indicate the status of Address matched flag (slave mode).
__STATIC_INLINE void LL_I2C_DisableAnalogFilter(I2C_TypeDef *I2Cx)
Disable Analog Noise Filter.