void I2C_Init(I2C_TypeDef * I2Cx, I2C_InitStructure * initStruct);
在SWM181_i2c.h文件中就提供了这么几个函数
void I2C_Open(I2C_TypeDef * I2Cx);
void I2C_Close(I2C_TypeDef * I2Cx);
uint8_t I2C_Start(I2C_TypeDef * I2Cx, uint8_t addr);
void I2C_Stop(I2C_TypeDef * I2Cx);
uint8_t I2C_Write(I2C_TypeDef * I2Cx, uint8_t data);
uint8_t I2C_Read(I2C_TypeDef * I2Cx, uint8_t ack);
void I2C_INTEn(I2C_TypeDef * I2Cx);
void I2C_INTDis(I2C_TypeDef * I2Cx);
void I2C_INTClr(I2C_TypeDef * I2Cx);
uint32_t I2C_INTStat(I2C_TypeDef * I2Cx);
|