STM32G474xx HAL用户手册
宏定义
I2C起始或停止模式
I2C导出常量

宏定义

#define I2C_NO_STARTSTOP   (0x00000000U)
#define I2C_GENERATE_STOP   (uint32_t)(0x80000000U | I2C_CR2_STOP)
#define I2C_GENERATE_START_READ   (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN)
#define I2C_GENERATE_START_WRITE   (uint32_t)(0x80000000U | I2C_CR2_START)

宏定义文档

#define I2C_GENERATE_START_READ   (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN)
#define I2C_GENERATE_START_WRITE   (uint32_t)(0x80000000U | I2C_CR2_START)
#define I2C_GENERATE_STOP   (uint32_t)(0x80000000U | I2C_CR2_STOP)

定义位于第400行,文件stm32g4xx_hal_i2c.h

被以下函数引用:HAL_I2C_Master_Abort_IT()

#define I2C_NO_STARTSTOP   (0x00000000U)