I2C设备的写地址 = I2C设备地址 << 1
I2C设备的读地址 = (I2C设备地址 << 2) + 1
例如:
#define MAX_17040_BATTERY_I2C_ADDR (0x36)
#define MAX_17040_BATTERY_WRITE_ADDR (MAX_17040_BATTERY_I2C_ADDR << 1)
#define MAX_17040_BATTERY_READ_ADDR ((MAX_17040_BATTERY_I2C_ADDR << 1) + 1)
阅读(6744) | 评论(0) | 转发(0) |