问答

汇集网友智慧,解决技术难题

yianele

TA的家园币:4  

  • CC2640的I2C问题请教

    我用CC2640的I2C模块给OPT3001光照芯片写值,发现写不进去。该芯片寄存器是16位的,咱I2C模块可以写16位寄存器的值吗???我就想给0x01寄存器写个0x54,0x10,代码如下:voidSet_OPT3001(uint8_tlimit){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);}

    CC2640 I2c AN trans buffer

    2020-12-08 4