RTEMS 6.1-rc5
Loading...
Searching...
No Matches
stm32h7xx_ll_i2c.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef STM32H7xx_LL_I2C_H
21#define STM32H7xx_LL_I2C_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* Includes ------------------------------------------------------------------*/
28#include "stm32h7xx.h"
29
34#if defined (I2C1) || defined (I2C2) || defined (I2C3) || defined (I2C4) || defined (I2C5)
35
41/* Private types -------------------------------------------------------------*/
42/* Private variables ---------------------------------------------------------*/
43
44/* Private constants ---------------------------------------------------------*/
53/* Private macros ------------------------------------------------------------*/
54#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
62#endif /*USE_FULL_LL_DRIVER*/
63
64/* Exported types ------------------------------------------------------------*/
65#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
70typedef struct
71{
72 uint32_t PeripheralMode;
78 uint32_t Timing;
85 uint32_t AnalogFilter;
91 uint32_t DigitalFilter;
97 uint32_t OwnAddress1;
103 uint32_t TypeAcknowledge;
110 uint32_t OwnAddrSize;
115} LL_I2C_InitTypeDef;
119#endif /*USE_FULL_LL_DRIVER*/
120
121/* Exported constants --------------------------------------------------------*/
132#define LL_I2C_ICR_ADDRCF I2C_ICR_ADDRCF
133#define LL_I2C_ICR_NACKCF I2C_ICR_NACKCF
134#define LL_I2C_ICR_STOPCF I2C_ICR_STOPCF
135#define LL_I2C_ICR_BERRCF I2C_ICR_BERRCF
136#define LL_I2C_ICR_ARLOCF I2C_ICR_ARLOCF
137#define LL_I2C_ICR_OVRCF I2C_ICR_OVRCF
138#define LL_I2C_ICR_PECCF I2C_ICR_PECCF
139#define LL_I2C_ICR_TIMOUTCF I2C_ICR_TIMOUTCF
140#define LL_I2C_ICR_ALERTCF I2C_ICR_ALERTCF
150#define LL_I2C_ISR_TXE I2C_ISR_TXE
151#define LL_I2C_ISR_TXIS I2C_ISR_TXIS
152#define LL_I2C_ISR_RXNE I2C_ISR_RXNE
153#define LL_I2C_ISR_ADDR I2C_ISR_ADDR
154#define LL_I2C_ISR_NACKF I2C_ISR_NACKF
155#define LL_I2C_ISR_STOPF I2C_ISR_STOPF
156#define LL_I2C_ISR_TC I2C_ISR_TC
157#define LL_I2C_ISR_TCR I2C_ISR_TCR
158#define LL_I2C_ISR_BERR I2C_ISR_BERR
159#define LL_I2C_ISR_ARLO I2C_ISR_ARLO
160#define LL_I2C_ISR_OVR I2C_ISR_OVR
161#define LL_I2C_ISR_PECERR I2C_ISR_PECERR
162#define LL_I2C_ISR_TIMEOUT I2C_ISR_TIMEOUT
163#define LL_I2C_ISR_ALERT I2C_ISR_ALERT
164#define LL_I2C_ISR_BUSY I2C_ISR_BUSY
174#define LL_I2C_CR1_TXIE I2C_CR1_TXIE
175#define LL_I2C_CR1_RXIE I2C_CR1_RXIE
176#define LL_I2C_CR1_ADDRIE I2C_CR1_ADDRIE
177#define LL_I2C_CR1_NACKIE I2C_CR1_NACKIE
178#define LL_I2C_CR1_STOPIE I2C_CR1_STOPIE
179#define LL_I2C_CR1_TCIE I2C_CR1_TCIE
180#define LL_I2C_CR1_ERRIE I2C_CR1_ERRIE
189#define LL_I2C_MODE_I2C 0x00000000U
190#define LL_I2C_MODE_SMBUS_HOST I2C_CR1_SMBHEN
191#define LL_I2C_MODE_SMBUS_DEVICE 0x00000000U
193#define LL_I2C_MODE_SMBUS_DEVICE_ARP I2C_CR1_SMBDEN
202#define LL_I2C_ANALOGFILTER_ENABLE 0x00000000U
203#define LL_I2C_ANALOGFILTER_DISABLE I2C_CR1_ANFOFF
212#define LL_I2C_ADDRESSING_MODE_7BIT 0x00000000U
213#define LL_I2C_ADDRESSING_MODE_10BIT I2C_CR2_ADD10
222#define LL_I2C_OWNADDRESS1_7BIT 0x00000000U
223#define LL_I2C_OWNADDRESS1_10BIT I2C_OAR1_OA1MODE
232#define LL_I2C_OWNADDRESS2_NOMASK I2C_OAR2_OA2NOMASK
233#define LL_I2C_OWNADDRESS2_MASK01 I2C_OAR2_OA2MASK01
234#define LL_I2C_OWNADDRESS2_MASK02 I2C_OAR2_OA2MASK02
235#define LL_I2C_OWNADDRESS2_MASK03 I2C_OAR2_OA2MASK03
236#define LL_I2C_OWNADDRESS2_MASK04 I2C_OAR2_OA2MASK04
237#define LL_I2C_OWNADDRESS2_MASK05 I2C_OAR2_OA2MASK05
238#define LL_I2C_OWNADDRESS2_MASK06 I2C_OAR2_OA2MASK06
239#define LL_I2C_OWNADDRESS2_MASK07 I2C_OAR2_OA2MASK07
249#define LL_I2C_ACK 0x00000000U
250#define LL_I2C_NACK I2C_CR2_NACK
259#define LL_I2C_ADDRSLAVE_7BIT 0x00000000U
260#define LL_I2C_ADDRSLAVE_10BIT I2C_CR2_ADD10
269#define LL_I2C_REQUEST_WRITE 0x00000000U
270#define LL_I2C_REQUEST_READ I2C_CR2_RD_WRN
279#define LL_I2C_MODE_RELOAD I2C_CR2_RELOAD
280#define LL_I2C_MODE_AUTOEND I2C_CR2_AUTOEND
282#define LL_I2C_MODE_SOFTEND 0x00000000U
284#define LL_I2C_MODE_SMBUS_RELOAD LL_I2C_MODE_RELOAD
286#define LL_I2C_MODE_SMBUS_AUTOEND_NO_PEC LL_I2C_MODE_AUTOEND
288#define LL_I2C_MODE_SMBUS_SOFTEND_NO_PEC LL_I2C_MODE_SOFTEND
290#define LL_I2C_MODE_SMBUS_AUTOEND_WITH_PEC (uint32_t)(LL_I2C_MODE_AUTOEND | I2C_CR2_PECBYTE)
292#define LL_I2C_MODE_SMBUS_SOFTEND_WITH_PEC (uint32_t)(LL_I2C_MODE_SOFTEND | I2C_CR2_PECBYTE)
302#define LL_I2C_GENERATE_NOSTARTSTOP 0x00000000U
304#define LL_I2C_GENERATE_STOP (uint32_t)(0x80000000U | I2C_CR2_STOP)
306#define LL_I2C_GENERATE_START_READ (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN)
308#define LL_I2C_GENERATE_START_WRITE (uint32_t)(0x80000000U | I2C_CR2_START)
310#define LL_I2C_GENERATE_RESTART_7BIT_READ (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN)
312#define LL_I2C_GENERATE_RESTART_7BIT_WRITE (uint32_t)(0x80000000U | I2C_CR2_START)
314#define LL_I2C_GENERATE_RESTART_10BIT_READ (uint32_t)(0x80000000U | I2C_CR2_START | \
315 I2C_CR2_RD_WRN | I2C_CR2_HEAD10R)
317#define LL_I2C_GENERATE_RESTART_10BIT_WRITE (uint32_t)(0x80000000U | I2C_CR2_START)
327#define LL_I2C_DIRECTION_WRITE 0x00000000U
329#define LL_I2C_DIRECTION_READ I2C_ISR_DIR
339#define LL_I2C_DMA_REG_DATA_TRANSMIT 0x00000000U
341#define LL_I2C_DMA_REG_DATA_RECEIVE 0x00000001U
351#define LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW 0x00000000U
353#define LL_I2C_SMBUS_TIMEOUTA_MODE_SDA_SCL_HIGH I2C_TIMEOUTR_TIDLE
363#define LL_I2C_SMBUS_TIMEOUTA I2C_TIMEOUTR_TIMOUTEN
364#define LL_I2C_SMBUS_TIMEOUTB I2C_TIMEOUTR_TEXTEN
366#define LL_I2C_SMBUS_ALL_TIMEOUT (uint32_t)(I2C_TIMEOUTR_TIMOUTEN | \
367 I2C_TIMEOUTR_TEXTEN)
377/* Exported macro ------------------------------------------------------------*/
395#define LL_I2C_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
396
403#define LL_I2C_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
425#define __LL_I2C_CONVERT_TIMINGS(__PRESCALER__, __SETUP_TIME__, __HOLD_TIME__, __SCLH_PERIOD__, __SCLL_PERIOD__) \
426 ((((uint32_t)(__PRESCALER__) << I2C_TIMINGR_PRESC_Pos) & I2C_TIMINGR_PRESC) | \
427 (((uint32_t)(__SETUP_TIME__) << I2C_TIMINGR_SCLDEL_Pos) & I2C_TIMINGR_SCLDEL) | \
428 (((uint32_t)(__HOLD_TIME__) << I2C_TIMINGR_SDADEL_Pos) & I2C_TIMINGR_SDADEL) | \
429 (((uint32_t)(__SCLH_PERIOD__) << I2C_TIMINGR_SCLH_Pos) & I2C_TIMINGR_SCLH) | \
430 (((uint32_t)(__SCLL_PERIOD__) << I2C_TIMINGR_SCLL_Pos) & I2C_TIMINGR_SCLL))
439/* Exported functions --------------------------------------------------------*/
456__STATIC_INLINE void LL_I2C_Enable(I2C_TypeDef *I2Cx)
457{
458 SET_BIT(I2Cx->CR1, I2C_CR1_PE);
459}
460
470__STATIC_INLINE void LL_I2C_Disable(I2C_TypeDef *I2Cx)
471{
472 CLEAR_BIT(I2Cx->CR1, I2C_CR1_PE);
473}
474
481__STATIC_INLINE uint32_t LL_I2C_IsEnabled(const I2C_TypeDef *I2Cx)
482{
483 return ((READ_BIT(I2Cx->CR1, I2C_CR1_PE) == (I2C_CR1_PE)) ? 1UL : 0UL);
484}
485
502__STATIC_INLINE void LL_I2C_ConfigFilters(I2C_TypeDef *I2Cx, uint32_t AnalogFilter, uint32_t DigitalFilter)
503{
504 MODIFY_REG(I2Cx->CR1, I2C_CR1_ANFOFF | I2C_CR1_DNF, AnalogFilter | (DigitalFilter << I2C_CR1_DNF_Pos));
505}
506
519__STATIC_INLINE void LL_I2C_SetDigitalFilter(I2C_TypeDef *I2Cx, uint32_t DigitalFilter)
520{
521 MODIFY_REG(I2Cx->CR1, I2C_CR1_DNF, DigitalFilter << I2C_CR1_DNF_Pos);
522}
523
530__STATIC_INLINE uint32_t LL_I2C_GetDigitalFilter(const I2C_TypeDef *I2Cx)
531{
532 return (uint32_t)(READ_BIT(I2Cx->CR1, I2C_CR1_DNF) >> I2C_CR1_DNF_Pos);
533}
534
542__STATIC_INLINE void LL_I2C_EnableAnalogFilter(I2C_TypeDef *I2Cx)
543{
544 CLEAR_BIT(I2Cx->CR1, I2C_CR1_ANFOFF);
545}
546
554__STATIC_INLINE void LL_I2C_DisableAnalogFilter(I2C_TypeDef *I2Cx)
555{
556 SET_BIT(I2Cx->CR1, I2C_CR1_ANFOFF);
557}
558
565__STATIC_INLINE uint32_t LL_I2C_IsEnabledAnalogFilter(const I2C_TypeDef *I2Cx)
566{
567 return ((READ_BIT(I2Cx->CR1, I2C_CR1_ANFOFF) != (I2C_CR1_ANFOFF)) ? 1UL : 0UL);
568}
569
576__STATIC_INLINE void LL_I2C_EnableDMAReq_TX(I2C_TypeDef *I2Cx)
577{
578 SET_BIT(I2Cx->CR1, I2C_CR1_TXDMAEN);
579}
580
587__STATIC_INLINE void LL_I2C_DisableDMAReq_TX(I2C_TypeDef *I2Cx)
588{
589 CLEAR_BIT(I2Cx->CR1, I2C_CR1_TXDMAEN);
590}
591
598__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_TX(const I2C_TypeDef *I2Cx)
599{
600 return ((READ_BIT(I2Cx->CR1, I2C_CR1_TXDMAEN) == (I2C_CR1_TXDMAEN)) ? 1UL : 0UL);
601}
602
609__STATIC_INLINE void LL_I2C_EnableDMAReq_RX(I2C_TypeDef *I2Cx)
610{
611 SET_BIT(I2Cx->CR1, I2C_CR1_RXDMAEN);
612}
613
620__STATIC_INLINE void LL_I2C_DisableDMAReq_RX(I2C_TypeDef *I2Cx)
621{
622 CLEAR_BIT(I2Cx->CR1, I2C_CR1_RXDMAEN);
623}
624
631__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_RX(const I2C_TypeDef *I2Cx)
632{
633 return ((READ_BIT(I2Cx->CR1, I2C_CR1_RXDMAEN) == (I2C_CR1_RXDMAEN)) ? 1UL : 0UL);
634}
635
646__STATIC_INLINE uint32_t LL_I2C_DMA_GetRegAddr(const I2C_TypeDef *I2Cx, uint32_t Direction)
647{
648 uint32_t data_reg_addr;
649
650 if (Direction == LL_I2C_DMA_REG_DATA_TRANSMIT)
651 {
652 /* return address of TXDR register */
653 data_reg_addr = (uint32_t) &(I2Cx->TXDR);
654 }
655 else
656 {
657 /* return address of RXDR register */
658 data_reg_addr = (uint32_t) &(I2Cx->RXDR);
659 }
660
661 return data_reg_addr;
662}
663
671__STATIC_INLINE void LL_I2C_EnableClockStretching(I2C_TypeDef *I2Cx)
672{
673 CLEAR_BIT(I2Cx->CR1, I2C_CR1_NOSTRETCH);
674}
675
683__STATIC_INLINE void LL_I2C_DisableClockStretching(I2C_TypeDef *I2Cx)
684{
685 SET_BIT(I2Cx->CR1, I2C_CR1_NOSTRETCH);
686}
687
694__STATIC_INLINE uint32_t LL_I2C_IsEnabledClockStretching(const I2C_TypeDef *I2Cx)
695{
696 return ((READ_BIT(I2Cx->CR1, I2C_CR1_NOSTRETCH) != (I2C_CR1_NOSTRETCH)) ? 1UL : 0UL);
697}
698
705__STATIC_INLINE void LL_I2C_EnableSlaveByteControl(I2C_TypeDef *I2Cx)
706{
707 SET_BIT(I2Cx->CR1, I2C_CR1_SBC);
708}
709
716__STATIC_INLINE void LL_I2C_DisableSlaveByteControl(I2C_TypeDef *I2Cx)
717{
718 CLEAR_BIT(I2Cx->CR1, I2C_CR1_SBC);
719}
720
727__STATIC_INLINE uint32_t LL_I2C_IsEnabledSlaveByteControl(const I2C_TypeDef *I2Cx)
728{
729 return ((READ_BIT(I2Cx->CR1, I2C_CR1_SBC) == (I2C_CR1_SBC)) ? 1UL : 0UL);
730}
731
741__STATIC_INLINE void LL_I2C_EnableWakeUpFromStop(I2C_TypeDef *I2Cx)
742{
743 SET_BIT(I2Cx->CR1, I2C_CR1_WUPEN);
744}
745
754__STATIC_INLINE void LL_I2C_DisableWakeUpFromStop(I2C_TypeDef *I2Cx)
755{
756 CLEAR_BIT(I2Cx->CR1, I2C_CR1_WUPEN);
757}
758
767__STATIC_INLINE uint32_t LL_I2C_IsEnabledWakeUpFromStop(const I2C_TypeDef *I2Cx)
768{
769 return ((READ_BIT(I2Cx->CR1, I2C_CR1_WUPEN) == (I2C_CR1_WUPEN)) ? 1UL : 0UL);
770}
771
779__STATIC_INLINE void LL_I2C_EnableGeneralCall(I2C_TypeDef *I2Cx)
780{
781 SET_BIT(I2Cx->CR1, I2C_CR1_GCEN);
782}
783
791__STATIC_INLINE void LL_I2C_DisableGeneralCall(I2C_TypeDef *I2Cx)
792{
793 CLEAR_BIT(I2Cx->CR1, I2C_CR1_GCEN);
794}
795
802__STATIC_INLINE uint32_t LL_I2C_IsEnabledGeneralCall(const I2C_TypeDef *I2Cx)
803{
804 return ((READ_BIT(I2Cx->CR1, I2C_CR1_GCEN) == (I2C_CR1_GCEN)) ? 1UL : 0UL);
805}
806
817__STATIC_INLINE void LL_I2C_SetMasterAddressingMode(I2C_TypeDef *I2Cx, uint32_t AddressingMode)
818{
819 MODIFY_REG(I2Cx->CR2, I2C_CR2_ADD10, AddressingMode);
820}
821
830__STATIC_INLINE uint32_t LL_I2C_GetMasterAddressingMode(const I2C_TypeDef *I2Cx)
831{
832 return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_ADD10));
833}
834
846__STATIC_INLINE void LL_I2C_SetOwnAddress1(I2C_TypeDef *I2Cx, uint32_t OwnAddress1, uint32_t OwnAddrSize)
847{
848 MODIFY_REG(I2Cx->OAR1, I2C_OAR1_OA1 | I2C_OAR1_OA1MODE, OwnAddress1 | OwnAddrSize);
849}
850
857__STATIC_INLINE void LL_I2C_EnableOwnAddress1(I2C_TypeDef *I2Cx)
858{
859 SET_BIT(I2Cx->OAR1, I2C_OAR1_OA1EN);
860}
861
868__STATIC_INLINE void LL_I2C_DisableOwnAddress1(I2C_TypeDef *I2Cx)
869{
870 CLEAR_BIT(I2Cx->OAR1, I2C_OAR1_OA1EN);
871}
872
879__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress1(const I2C_TypeDef *I2Cx)
880{
881 return ((READ_BIT(I2Cx->OAR1, I2C_OAR1_OA1EN) == (I2C_OAR1_OA1EN)) ? 1UL : 0UL);
882}
883
902__STATIC_INLINE void LL_I2C_SetOwnAddress2(I2C_TypeDef *I2Cx, uint32_t OwnAddress2, uint32_t OwnAddrMask)
903{
904 MODIFY_REG(I2Cx->OAR2, I2C_OAR2_OA2 | I2C_OAR2_OA2MSK, OwnAddress2 | OwnAddrMask);
905}
906
913__STATIC_INLINE void LL_I2C_EnableOwnAddress2(I2C_TypeDef *I2Cx)
914{
915 SET_BIT(I2Cx->OAR2, I2C_OAR2_OA2EN);
916}
917
924__STATIC_INLINE void LL_I2C_DisableOwnAddress2(I2C_TypeDef *I2Cx)
925{
926 CLEAR_BIT(I2Cx->OAR2, I2C_OAR2_OA2EN);
927}
928
935__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress2(const I2C_TypeDef *I2Cx)
936{
937 return ((READ_BIT(I2Cx->OAR2, I2C_OAR2_OA2EN) == (I2C_OAR2_OA2EN)) ? 1UL : 0UL);
938}
939
949__STATIC_INLINE void LL_I2C_SetTiming(I2C_TypeDef *I2Cx, uint32_t Timing)
950{
951 WRITE_REG(I2Cx->TIMINGR, Timing);
952}
953
960__STATIC_INLINE uint32_t LL_I2C_GetTimingPrescaler(const I2C_TypeDef *I2Cx)
961{
962 return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_PRESC) >> I2C_TIMINGR_PRESC_Pos);
963}
964
971__STATIC_INLINE uint32_t LL_I2C_GetClockLowPeriod(const I2C_TypeDef *I2Cx)
972{
973 return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SCLL) >> I2C_TIMINGR_SCLL_Pos);
974}
975
982__STATIC_INLINE uint32_t LL_I2C_GetClockHighPeriod(const I2C_TypeDef *I2Cx)
983{
984 return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SCLH) >> I2C_TIMINGR_SCLH_Pos);
985}
986
993__STATIC_INLINE uint32_t LL_I2C_GetDataHoldTime(const I2C_TypeDef *I2Cx)
994{
995 return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SDADEL) >> I2C_TIMINGR_SDADEL_Pos);
996}
997
1004__STATIC_INLINE uint32_t LL_I2C_GetDataSetupTime(const I2C_TypeDef *I2Cx)
1005{
1006 return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SCLDEL) >> I2C_TIMINGR_SCLDEL_Pos);
1007}
1008
1023__STATIC_INLINE void LL_I2C_SetMode(I2C_TypeDef *I2Cx, uint32_t PeripheralMode)
1024{
1025 MODIFY_REG(I2Cx->CR1, I2C_CR1_SMBHEN | I2C_CR1_SMBDEN, PeripheralMode);
1026}
1027
1041__STATIC_INLINE uint32_t LL_I2C_GetMode(const I2C_TypeDef *I2Cx)
1042{
1043 return (uint32_t)(READ_BIT(I2Cx->CR1, I2C_CR1_SMBHEN | I2C_CR1_SMBDEN));
1044}
1045
1059__STATIC_INLINE void LL_I2C_EnableSMBusAlert(I2C_TypeDef *I2Cx)
1060{
1061 SET_BIT(I2Cx->CR1, I2C_CR1_ALERTEN);
1062}
1063
1077__STATIC_INLINE void LL_I2C_DisableSMBusAlert(I2C_TypeDef *I2Cx)
1078{
1079 CLEAR_BIT(I2Cx->CR1, I2C_CR1_ALERTEN);
1080}
1081
1090__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusAlert(const I2C_TypeDef *I2Cx)
1091{
1092 return ((READ_BIT(I2Cx->CR1, I2C_CR1_ALERTEN) == (I2C_CR1_ALERTEN)) ? 1UL : 0UL);
1093}
1094
1103__STATIC_INLINE void LL_I2C_EnableSMBusPEC(I2C_TypeDef *I2Cx)
1104{
1105 SET_BIT(I2Cx->CR1, I2C_CR1_PECEN);
1106}
1107
1116__STATIC_INLINE void LL_I2C_DisableSMBusPEC(I2C_TypeDef *I2Cx)
1117{
1118 CLEAR_BIT(I2Cx->CR1, I2C_CR1_PECEN);
1119}
1120
1129__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPEC(const I2C_TypeDef *I2Cx)
1130{
1131 return ((READ_BIT(I2Cx->CR1, I2C_CR1_PECEN) == (I2C_CR1_PECEN)) ? 1UL : 0UL);
1132}
1133
1150__STATIC_INLINE void LL_I2C_ConfigSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t TimeoutA, uint32_t TimeoutAMode,
1151 uint32_t TimeoutB)
1152{
1154 TimeoutA | TimeoutAMode | (TimeoutB << I2C_TIMEOUTR_TIMEOUTB_Pos));
1155}
1156
1167__STATIC_INLINE void LL_I2C_SetSMBusTimeoutA(I2C_TypeDef *I2Cx, uint32_t TimeoutA)
1168{
1169 WRITE_REG(I2Cx->TIMEOUTR, TimeoutA);
1170}
1171
1180__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutA(const I2C_TypeDef *I2Cx)
1181{
1182 return (uint32_t)(READ_BIT(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIMEOUTA));
1183}
1184
1197__STATIC_INLINE void LL_I2C_SetSMBusTimeoutAMode(I2C_TypeDef *I2Cx, uint32_t TimeoutAMode)
1198{
1199 WRITE_REG(I2Cx->TIMEOUTR, TimeoutAMode);
1200}
1201
1212__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutAMode(const I2C_TypeDef *I2Cx)
1213{
1214 return (uint32_t)(READ_BIT(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIDLE));
1215}
1216
1227__STATIC_INLINE void LL_I2C_SetSMBusTimeoutB(I2C_TypeDef *I2Cx, uint32_t TimeoutB)
1228{
1229 WRITE_REG(I2Cx->TIMEOUTR, TimeoutB << I2C_TIMEOUTR_TIMEOUTB_Pos);
1230}
1231
1240__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutB(const I2C_TypeDef *I2Cx)
1241{
1242 return (uint32_t)(READ_BIT(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIMEOUTB) >> I2C_TIMEOUTR_TIMEOUTB_Pos);
1243}
1244
1258__STATIC_INLINE void LL_I2C_EnableSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t ClockTimeout)
1259{
1260 SET_BIT(I2Cx->TIMEOUTR, ClockTimeout);
1261}
1262
1276__STATIC_INLINE void LL_I2C_DisableSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t ClockTimeout)
1277{
1278 CLEAR_BIT(I2Cx->TIMEOUTR, ClockTimeout);
1279}
1280
1294__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusTimeout(const I2C_TypeDef *I2Cx, uint32_t ClockTimeout)
1295{
1296 return ((READ_BIT(I2Cx->TIMEOUTR, (I2C_TIMEOUTR_TIMOUTEN | I2C_TIMEOUTR_TEXTEN)) == \
1297 (ClockTimeout)) ? 1UL : 0UL);
1298}
1299
1315__STATIC_INLINE void LL_I2C_EnableIT_TX(I2C_TypeDef *I2Cx)
1316{
1317 SET_BIT(I2Cx->CR1, I2C_CR1_TXIE);
1318}
1319
1326__STATIC_INLINE void LL_I2C_DisableIT_TX(I2C_TypeDef *I2Cx)
1327{
1328 CLEAR_BIT(I2Cx->CR1, I2C_CR1_TXIE);
1329}
1330
1337__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TX(const I2C_TypeDef *I2Cx)
1338{
1339 return ((READ_BIT(I2Cx->CR1, I2C_CR1_TXIE) == (I2C_CR1_TXIE)) ? 1UL : 0UL);
1340}
1341
1348__STATIC_INLINE void LL_I2C_EnableIT_RX(I2C_TypeDef *I2Cx)
1349{
1350 SET_BIT(I2Cx->CR1, I2C_CR1_RXIE);
1351}
1352
1359__STATIC_INLINE void LL_I2C_DisableIT_RX(I2C_TypeDef *I2Cx)
1360{
1361 CLEAR_BIT(I2Cx->CR1, I2C_CR1_RXIE);
1362}
1363
1370__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_RX(const I2C_TypeDef *I2Cx)
1371{
1372 return ((READ_BIT(I2Cx->CR1, I2C_CR1_RXIE) == (I2C_CR1_RXIE)) ? 1UL : 0UL);
1373}
1374
1381__STATIC_INLINE void LL_I2C_EnableIT_ADDR(I2C_TypeDef *I2Cx)
1382{
1383 SET_BIT(I2Cx->CR1, I2C_CR1_ADDRIE);
1384}
1385
1392__STATIC_INLINE void LL_I2C_DisableIT_ADDR(I2C_TypeDef *I2Cx)
1393{
1394 CLEAR_BIT(I2Cx->CR1, I2C_CR1_ADDRIE);
1395}
1396
1403__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ADDR(const I2C_TypeDef *I2Cx)
1404{
1405 return ((READ_BIT(I2Cx->CR1, I2C_CR1_ADDRIE) == (I2C_CR1_ADDRIE)) ? 1UL : 0UL);
1406}
1407
1414__STATIC_INLINE void LL_I2C_EnableIT_NACK(I2C_TypeDef *I2Cx)
1415{
1416 SET_BIT(I2Cx->CR1, I2C_CR1_NACKIE);
1417}
1418
1425__STATIC_INLINE void LL_I2C_DisableIT_NACK(I2C_TypeDef *I2Cx)
1426{
1427 CLEAR_BIT(I2Cx->CR1, I2C_CR1_NACKIE);
1428}
1429
1436__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_NACK(const I2C_TypeDef *I2Cx)
1437{
1438 return ((READ_BIT(I2Cx->CR1, I2C_CR1_NACKIE) == (I2C_CR1_NACKIE)) ? 1UL : 0UL);
1439}
1440
1447__STATIC_INLINE void LL_I2C_EnableIT_STOP(I2C_TypeDef *I2Cx)
1448{
1449 SET_BIT(I2Cx->CR1, I2C_CR1_STOPIE);
1450}
1451
1458__STATIC_INLINE void LL_I2C_DisableIT_STOP(I2C_TypeDef *I2Cx)
1459{
1460 CLEAR_BIT(I2Cx->CR1, I2C_CR1_STOPIE);
1461}
1462
1469__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_STOP(const I2C_TypeDef *I2Cx)
1470{
1471 return ((READ_BIT(I2Cx->CR1, I2C_CR1_STOPIE) == (I2C_CR1_STOPIE)) ? 1UL : 0UL);
1472}
1473
1483__STATIC_INLINE void LL_I2C_EnableIT_TC(I2C_TypeDef *I2Cx)
1484{
1485 SET_BIT(I2Cx->CR1, I2C_CR1_TCIE);
1486}
1487
1497__STATIC_INLINE void LL_I2C_DisableIT_TC(I2C_TypeDef *I2Cx)
1498{
1499 CLEAR_BIT(I2Cx->CR1, I2C_CR1_TCIE);
1500}
1501
1508__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TC(const I2C_TypeDef *I2Cx)
1509{
1510 return ((READ_BIT(I2Cx->CR1, I2C_CR1_TCIE) == (I2C_CR1_TCIE)) ? 1UL : 0UL);
1511}
1512
1528__STATIC_INLINE void LL_I2C_EnableIT_ERR(I2C_TypeDef *I2Cx)
1529{
1530 SET_BIT(I2Cx->CR1, I2C_CR1_ERRIE);
1531}
1532
1548__STATIC_INLINE void LL_I2C_DisableIT_ERR(I2C_TypeDef *I2Cx)
1549{
1550 CLEAR_BIT(I2Cx->CR1, I2C_CR1_ERRIE);
1551}
1552
1559__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ERR(const I2C_TypeDef *I2Cx)
1560{
1561 return ((READ_BIT(I2Cx->CR1, I2C_CR1_ERRIE) == (I2C_CR1_ERRIE)) ? 1UL : 0UL);
1562}
1563
1581__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXE(const I2C_TypeDef *I2Cx)
1582{
1583 return ((READ_BIT(I2Cx->ISR, I2C_ISR_TXE) == (I2C_ISR_TXE)) ? 1UL : 0UL);
1584}
1585
1594__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXIS(const I2C_TypeDef *I2Cx)
1595{
1596 return ((READ_BIT(I2Cx->ISR, I2C_ISR_TXIS) == (I2C_ISR_TXIS)) ? 1UL : 0UL);
1597}
1598
1607__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_RXNE(const I2C_TypeDef *I2Cx)
1608{
1609 return ((READ_BIT(I2Cx->ISR, I2C_ISR_RXNE) == (I2C_ISR_RXNE)) ? 1UL : 0UL);
1610}
1611
1620__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADDR(const I2C_TypeDef *I2Cx)
1621{
1622 return ((READ_BIT(I2Cx->ISR, I2C_ISR_ADDR) == (I2C_ISR_ADDR)) ? 1UL : 0UL);
1623}
1624
1633__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_NACK(const I2C_TypeDef *I2Cx)
1634{
1635 return ((READ_BIT(I2Cx->ISR, I2C_ISR_NACKF) == (I2C_ISR_NACKF)) ? 1UL : 0UL);
1636}
1637
1646__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_STOP(const I2C_TypeDef *I2Cx)
1647{
1648 return ((READ_BIT(I2Cx->ISR, I2C_ISR_STOPF) == (I2C_ISR_STOPF)) ? 1UL : 0UL);
1649}
1650
1659__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TC(const I2C_TypeDef *I2Cx)
1660{
1661 return ((READ_BIT(I2Cx->ISR, I2C_ISR_TC) == (I2C_ISR_TC)) ? 1UL : 0UL);
1662}
1663
1672__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TCR(const I2C_TypeDef *I2Cx)
1673{
1674 return ((READ_BIT(I2Cx->ISR, I2C_ISR_TCR) == (I2C_ISR_TCR)) ? 1UL : 0UL);
1675}
1676
1685__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BERR(const I2C_TypeDef *I2Cx)
1686{
1687 return ((READ_BIT(I2Cx->ISR, I2C_ISR_BERR) == (I2C_ISR_BERR)) ? 1UL : 0UL);
1688}
1689
1698__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ARLO(const I2C_TypeDef *I2Cx)
1699{
1700 return ((READ_BIT(I2Cx->ISR, I2C_ISR_ARLO) == (I2C_ISR_ARLO)) ? 1UL : 0UL);
1701}
1702
1711__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_OVR(const I2C_TypeDef *I2Cx)
1712{
1713 return ((READ_BIT(I2Cx->ISR, I2C_ISR_OVR) == (I2C_ISR_OVR)) ? 1UL : 0UL);
1714}
1715
1726__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_PECERR(const I2C_TypeDef *I2Cx)
1727{
1728 return ((READ_BIT(I2Cx->ISR, I2C_ISR_PECERR) == (I2C_ISR_PECERR)) ? 1UL : 0UL);
1729}
1730
1741__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_TIMEOUT(const I2C_TypeDef *I2Cx)
1742{
1743 return ((READ_BIT(I2Cx->ISR, I2C_ISR_TIMEOUT) == (I2C_ISR_TIMEOUT)) ? 1UL : 0UL);
1744}
1745
1757__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_ALERT(const I2C_TypeDef *I2Cx)
1758{
1759 return ((READ_BIT(I2Cx->ISR, I2C_ISR_ALERT) == (I2C_ISR_ALERT)) ? 1UL : 0UL);
1760}
1761
1770__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BUSY(const I2C_TypeDef *I2Cx)
1771{
1772 return ((READ_BIT(I2Cx->ISR, I2C_ISR_BUSY) == (I2C_ISR_BUSY)) ? 1UL : 0UL);
1773}
1774
1781__STATIC_INLINE void LL_I2C_ClearFlag_ADDR(I2C_TypeDef *I2Cx)
1782{
1783 SET_BIT(I2Cx->ICR, I2C_ICR_ADDRCF);
1784}
1785
1792__STATIC_INLINE void LL_I2C_ClearFlag_NACK(I2C_TypeDef *I2Cx)
1793{
1794 SET_BIT(I2Cx->ICR, I2C_ICR_NACKCF);
1795}
1796
1803__STATIC_INLINE void LL_I2C_ClearFlag_STOP(I2C_TypeDef *I2Cx)
1804{
1805 SET_BIT(I2Cx->ICR, I2C_ICR_STOPCF);
1806}
1807
1815__STATIC_INLINE void LL_I2C_ClearFlag_TXE(I2C_TypeDef *I2Cx)
1816{
1817 WRITE_REG(I2Cx->ISR, I2C_ISR_TXE);
1818}
1819
1826__STATIC_INLINE void LL_I2C_ClearFlag_BERR(I2C_TypeDef *I2Cx)
1827{
1828 SET_BIT(I2Cx->ICR, I2C_ICR_BERRCF);
1829}
1830
1837__STATIC_INLINE void LL_I2C_ClearFlag_ARLO(I2C_TypeDef *I2Cx)
1838{
1839 SET_BIT(I2Cx->ICR, I2C_ICR_ARLOCF);
1840}
1841
1848__STATIC_INLINE void LL_I2C_ClearFlag_OVR(I2C_TypeDef *I2Cx)
1849{
1850 SET_BIT(I2Cx->ICR, I2C_ICR_OVRCF);
1851}
1852
1861__STATIC_INLINE void LL_I2C_ClearSMBusFlag_PECERR(I2C_TypeDef *I2Cx)
1862{
1863 SET_BIT(I2Cx->ICR, I2C_ICR_PECCF);
1864}
1865
1874__STATIC_INLINE void LL_I2C_ClearSMBusFlag_TIMEOUT(I2C_TypeDef *I2Cx)
1875{
1876 SET_BIT(I2Cx->ICR, I2C_ICR_TIMOUTCF);
1877}
1878
1887__STATIC_INLINE void LL_I2C_ClearSMBusFlag_ALERT(I2C_TypeDef *I2Cx)
1888{
1889 SET_BIT(I2Cx->ICR, I2C_ICR_ALERTCF);
1890}
1891
1909__STATIC_INLINE void LL_I2C_EnableAutoEndMode(I2C_TypeDef *I2Cx)
1910{
1911 SET_BIT(I2Cx->CR2, I2C_CR2_AUTOEND);
1912}
1913
1921__STATIC_INLINE void LL_I2C_DisableAutoEndMode(I2C_TypeDef *I2Cx)
1922{
1923 CLEAR_BIT(I2Cx->CR2, I2C_CR2_AUTOEND);
1924}
1925
1932__STATIC_INLINE uint32_t LL_I2C_IsEnabledAutoEndMode(const I2C_TypeDef *I2Cx)
1933{
1934 return ((READ_BIT(I2Cx->CR2, I2C_CR2_AUTOEND) == (I2C_CR2_AUTOEND)) ? 1UL : 0UL);
1935}
1936
1944__STATIC_INLINE void LL_I2C_EnableReloadMode(I2C_TypeDef *I2Cx)
1945{
1946 SET_BIT(I2Cx->CR2, I2C_CR2_RELOAD);
1947}
1948
1956__STATIC_INLINE void LL_I2C_DisableReloadMode(I2C_TypeDef *I2Cx)
1957{
1958 CLEAR_BIT(I2Cx->CR2, I2C_CR2_RELOAD);
1959}
1960
1967__STATIC_INLINE uint32_t LL_I2C_IsEnabledReloadMode(const I2C_TypeDef *I2Cx)
1968{
1969 return ((READ_BIT(I2Cx->CR2, I2C_CR2_RELOAD) == (I2C_CR2_RELOAD)) ? 1UL : 0UL);
1970}
1971
1980__STATIC_INLINE void LL_I2C_SetTransferSize(I2C_TypeDef *I2Cx, uint32_t TransferSize)
1981{
1982 MODIFY_REG(I2Cx->CR2, I2C_CR2_NBYTES, TransferSize << I2C_CR2_NBYTES_Pos);
1983}
1984
1991__STATIC_INLINE uint32_t LL_I2C_GetTransferSize(const I2C_TypeDef *I2Cx)
1992{
1993 return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_NBYTES) >> I2C_CR2_NBYTES_Pos);
1994}
1995
2007__STATIC_INLINE void LL_I2C_AcknowledgeNextData(I2C_TypeDef *I2Cx, uint32_t TypeAcknowledge)
2008{
2009 MODIFY_REG(I2Cx->CR2, I2C_CR2_NACK, TypeAcknowledge);
2010}
2011
2020__STATIC_INLINE void LL_I2C_GenerateStartCondition(I2C_TypeDef *I2Cx)
2021{
2022 SET_BIT(I2Cx->CR2, I2C_CR2_START);
2023}
2024
2031__STATIC_INLINE void LL_I2C_GenerateStopCondition(I2C_TypeDef *I2Cx)
2032{
2033 SET_BIT(I2Cx->CR2, I2C_CR2_STOP);
2034}
2035
2045__STATIC_INLINE void LL_I2C_EnableAuto10BitRead(I2C_TypeDef *I2Cx)
2046{
2047 CLEAR_BIT(I2Cx->CR2, I2C_CR2_HEAD10R);
2048}
2049
2057__STATIC_INLINE void LL_I2C_DisableAuto10BitRead(I2C_TypeDef *I2Cx)
2058{
2059 SET_BIT(I2Cx->CR2, I2C_CR2_HEAD10R);
2060}
2061
2068__STATIC_INLINE uint32_t LL_I2C_IsEnabledAuto10BitRead(const I2C_TypeDef *I2Cx)
2069{
2070 return ((READ_BIT(I2Cx->CR2, I2C_CR2_HEAD10R) != (I2C_CR2_HEAD10R)) ? 1UL : 0UL);
2071}
2072
2083__STATIC_INLINE void LL_I2C_SetTransferRequest(I2C_TypeDef *I2Cx, uint32_t TransferRequest)
2084{
2085 MODIFY_REG(I2Cx->CR2, I2C_CR2_RD_WRN, TransferRequest);
2086}
2087
2096__STATIC_INLINE uint32_t LL_I2C_GetTransferRequest(const I2C_TypeDef *I2Cx)
2097{
2098 return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_RD_WRN));
2099}
2100
2109__STATIC_INLINE void LL_I2C_SetSlaveAddr(I2C_TypeDef *I2Cx, uint32_t SlaveAddr)
2110{
2111 MODIFY_REG(I2Cx->CR2, I2C_CR2_SADD, SlaveAddr);
2112}
2113
2120__STATIC_INLINE uint32_t LL_I2C_GetSlaveAddr(const I2C_TypeDef *I2Cx)
2121{
2122 return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_SADD));
2123}
2124
2163__STATIC_INLINE void LL_I2C_HandleTransfer(I2C_TypeDef *I2Cx, uint32_t SlaveAddr, uint32_t SlaveAddrSize,
2164 uint32_t TransferSize, uint32_t EndMode, uint32_t Request)
2165{
2166 /* Declaration of tmp to prevent undefined behavior of volatile usage */
2167 uint32_t tmp = ((uint32_t)(((uint32_t)SlaveAddr & I2C_CR2_SADD) | \
2168 ((uint32_t)SlaveAddrSize & I2C_CR2_ADD10) | \
2169 (((uint32_t)TransferSize << I2C_CR2_NBYTES_Pos) & I2C_CR2_NBYTES) | \
2170 (uint32_t)EndMode | (uint32_t)Request) & (~0x80000000U));
2171
2172 /* update CR2 register */
2173 MODIFY_REG(I2Cx->CR2, I2C_CR2_SADD | I2C_CR2_ADD10 |
2174 (I2C_CR2_RD_WRN & (uint32_t)(Request >> (31U - I2C_CR2_RD_WRN_Pos))) |
2177 tmp);
2178}
2179
2190__STATIC_INLINE uint32_t LL_I2C_GetTransferDirection(const I2C_TypeDef *I2Cx)
2191{
2192 return (uint32_t)(READ_BIT(I2Cx->ISR, I2C_ISR_DIR));
2193}
2194
2201__STATIC_INLINE uint32_t LL_I2C_GetAddressMatchCode(const I2C_TypeDef *I2Cx)
2202{
2203 return (uint32_t)(READ_BIT(I2Cx->ISR, I2C_ISR_ADDCODE) >> I2C_ISR_ADDCODE_Pos << 1);
2204}
2205
2218__STATIC_INLINE void LL_I2C_EnableSMBusPECCompare(I2C_TypeDef *I2Cx)
2219{
2220 SET_BIT(I2Cx->CR2, I2C_CR2_PECBYTE);
2221}
2222
2231__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPECCompare(const I2C_TypeDef *I2Cx)
2232{
2233 return ((READ_BIT(I2Cx->CR2, I2C_CR2_PECBYTE) == (I2C_CR2_PECBYTE)) ? 1UL : 0UL);
2234}
2235
2244__STATIC_INLINE uint32_t LL_I2C_GetSMBusPEC(const I2C_TypeDef *I2Cx)
2245{
2246 return (uint32_t)(READ_BIT(I2Cx->PECR, I2C_PECR_PEC));
2247}
2248
2255__STATIC_INLINE uint8_t LL_I2C_ReceiveData8(const I2C_TypeDef *I2Cx)
2256{
2257 return (uint8_t)(READ_BIT(I2Cx->RXDR, I2C_RXDR_RXDATA));
2258}
2259
2267__STATIC_INLINE void LL_I2C_TransmitData8(I2C_TypeDef *I2Cx, uint8_t Data)
2268{
2269 WRITE_REG(I2Cx->TXDR, Data);
2270}
2271
2276#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
2282ErrorStatus LL_I2C_Init(I2C_TypeDef *I2Cx, const LL_I2C_InitTypeDef *I2C_InitStruct);
2283ErrorStatus LL_I2C_DeInit(const I2C_TypeDef *I2Cx);
2284void LL_I2C_StructInit(LL_I2C_InitTypeDef *I2C_InitStruct);
2285
2286
2290#endif /* USE_FULL_LL_DRIVER */
2291
2300#endif /* I2C1 || I2C2 || I2C3 || I2C4 || I2C5 */
2301
2306#ifdef __cplusplus
2307}
2308#endif
2309
2310#endif /* STM32H7xx_LL_I2C_H */
#define I2C_ISR_RXNE
Definition: stm32h723xx.h:13136
#define I2C_ISR_ADDR
Definition: stm32h723xx.h:13139
#define I2C_ISR_BERR
Definition: stm32h723xx.h:13154
#define I2C_ISR_BUSY
Definition: stm32h723xx.h:13172
#define I2C_CR1_NOSTRETCH
Definition: stm32h723xx.h:12994
#define I2C_CR2_SADD
Definition: stm32h723xx.h:13017
#define I2C_ICR_ARLOCF
Definition: stm32h723xx.h:13195
#define I2C_CR1_TXDMAEN
Definition: stm32h723xx.h:12985
#define I2C_ISR_TXE
Definition: stm32h723xx.h:13130
#define I2C_TIMINGR_SCLH
Definition: stm32h723xx.h:13099
#define I2C_CR1_STOPIE
Definition: stm32h723xx.h:12970
#define I2C_CR1_ALERTEN
Definition: stm32h723xx.h:13009
#define I2C_CR2_RELOAD
Definition: stm32h723xx.h:13041
#define I2C_CR2_NBYTES
Definition: stm32h723xx.h:13038
#define I2C_ISR_STOPF
Definition: stm32h723xx.h:13145
#define I2C_CR2_RD_WRN
Definition: stm32h723xx.h:13020
#define I2C_CR1_ADDRIE
Definition: stm32h723xx.h:12964
#define I2C_OAR2_OA2MSK
Definition: stm32h723xx.h:13066
#define I2C_CR2_HEAD10R
Definition: stm32h723xx.h:13026
#define I2C_CR2_STOP
Definition: stm32h723xx.h:13032
#define I2C_CR1_PECEN
Definition: stm32h723xx.h:13012
#define I2C_TIMINGR_SDADEL
Definition: stm32h723xx.h:13102
#define I2C_OAR2_OA2
Definition: stm32h723xx.h:13063
#define I2C_TIMEOUTR_TIMOUTEN
Definition: stm32h723xx.h:13119
#define I2C_CR1_ANFOFF
Definition: stm32h723xx.h:12982
#define I2C_ISR_ALERT
Definition: stm32h723xx.h:13169
#define I2C_CR2_ADD10
Definition: stm32h723xx.h:13023
#define I2C_RXDR_RXDATA
Definition: stm32h723xx.h:13217
#define I2C_ISR_ARLO
Definition: stm32h723xx.h:13157
#define I2C_CR2_START
Definition: stm32h723xx.h:13029
#define I2C_ICR_OVRCF
Definition: stm32h723xx.h:13198
#define I2C_TIMEOUTR_TIMEOUTB
Definition: stm32h723xx.h:13122
#define I2C_OAR1_OA1MODE
Definition: stm32h723xx.h:13055
#define I2C_ISR_TIMEOUT
Definition: stm32h723xx.h:13166
#define I2C_CR1_SMBDEN
Definition: stm32h723xx.h:13006
#define I2C_CR2_PECBYTE
Definition: stm32h723xx.h:13047
#define I2C_CR1_TCIE
Definition: stm32h723xx.h:12973
#define I2C_CR1_WUPEN
Definition: stm32h723xx.h:12997
#define I2C_CR1_ERRIE
Definition: stm32h723xx.h:12976
#define I2C_ISR_TCR
Definition: stm32h723xx.h:13151
#define I2C_ICR_PECCF
Definition: stm32h723xx.h:13201
#define I2C_CR1_RXDMAEN
Definition: stm32h723xx.h:12988
#define I2C_ISR_PECERR
Definition: stm32h723xx.h:13163
#define I2C_CR2_NACK
Definition: stm32h723xx.h:13035
#define I2C_CR1_TXIE
Definition: stm32h723xx.h:12958
#define I2C_ISR_ADDCODE
Definition: stm32h723xx.h:13178
#define I2C_TIMINGR_SCLDEL
Definition: stm32h723xx.h:13105
#define I2C_CR1_PE
Definition: stm32h723xx.h:12955
#define I2C_TIMEOUTR_TEXTEN
Definition: stm32h723xx.h:13125
#define I2C_CR1_SBC
Definition: stm32h723xx.h:12991
#define I2C_ICR_BERRCF
Definition: stm32h723xx.h:13192
#define I2C_ICR_TIMOUTCF
Definition: stm32h723xx.h:13204
#define I2C_ISR_DIR
Definition: stm32h723xx.h:13175
#define I2C_OAR2_OA2EN
Definition: stm32h723xx.h:13091
#define I2C_ISR_TXIS
Definition: stm32h723xx.h:13133
#define I2C_TIMEOUTR_TIDLE
Definition: stm32h723xx.h:13116
#define I2C_OAR1_OA1EN
Definition: stm32h723xx.h:13058
#define I2C_ICR_NACKCF
Definition: stm32h723xx.h:13186
#define I2C_OAR1_OA1
Definition: stm32h723xx.h:13052
#define I2C_CR2_AUTOEND
Definition: stm32h723xx.h:13044
#define I2C_ICR_STOPCF
Definition: stm32h723xx.h:13189
#define I2C_CR1_GCEN
Definition: stm32h723xx.h:13000
#define I2C_PECR_PEC
Definition: stm32h723xx.h:13212
#define I2C_ICR_ADDRCF
Definition: stm32h723xx.h:13183
#define I2C_ISR_TC
Definition: stm32h723xx.h:13148
#define I2C_TIMEOUTR_TIMEOUTA
Definition: stm32h723xx.h:13113
#define I2C_CR1_SMBHEN
Definition: stm32h723xx.h:13003
#define I2C_TIMINGR_SCLL
Definition: stm32h723xx.h:13096
#define I2C_ISR_NACKF
Definition: stm32h723xx.h:13142
#define I2C_CR1_DNF
Definition: stm32h723xx.h:12979
#define I2C_CR1_NACKIE
Definition: stm32h723xx.h:12967
#define I2C_TIMINGR_PRESC
Definition: stm32h723xx.h:13108
#define I2C_ICR_ALERTCF
Definition: stm32h723xx.h:13207
#define I2C_CR1_RXIE
Definition: stm32h723xx.h:12961
#define I2C_ISR_OVR
Definition: stm32h723xx.h:13160
CMSIS STM32H7xx Device Peripheral Access Layer Header File.
Inter-integrated Circuit Interface.
Definition: stm32h723xx.h:1133
__IO uint32_t ISR
Definition: stm32h723xx.h:1140
__IO uint32_t CR2
Definition: stm32h723xx.h:1135
__IO uint32_t RXDR
Definition: stm32h723xx.h:1143
__IO uint32_t PECR
Definition: stm32h723xx.h:1142
__IO uint32_t OAR2
Definition: stm32h723xx.h:1137
__IO uint32_t ICR
Definition: stm32h723xx.h:1141
__IO uint32_t CR1
Definition: stm32h723xx.h:1134
__IO uint32_t TIMINGR
Definition: stm32h723xx.h:1138
__IO uint32_t TIMEOUTR
Definition: stm32h723xx.h:1139
__IO uint32_t TXDR
Definition: stm32h723xx.h:1144
__IO uint32_t OAR1
Definition: stm32h723xx.h:1136