This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640 的I2C问题请教

Other Parts Discussed in Thread: OPT3001, CC2640

我用CC2640 的I2C 模块给OPT3001光照芯片 写值,发现写不进去。该芯片寄存器是16位的,咱I2C模块可以写16位寄存器的值吗???

我就想给0x01寄存器写个0x54,0x10,代码如下:

void Set_OPT3001(uint8_t limit)
{

Reset_OPT3001_Register();

txBuffer[0] = 0x54;txBuffer[1] = 0x10;


i2cTrans.writeCount = 3;
i2cTrans.writeBuf = txBuffer;
i2cTrans.readCount = 0;
i2cTrans.readBuf = rxBuffer;
i2cTrans.slaveAddress = 0x44;

I2C_transfer(handle, &i2cTrans);
}