TI中文支持网
TI专业的中文技术问题搜集分享网站

I2C.c移入motorware

在i2c.c文件中,void I2C_MasterControl(I2C_Handle i2cHandle, I2C_Control_e action, uint16_t bitCount, uint16_t bytes)函数中,bitCount是用于什么,代表什么?该如何操作这个变量(赋什么值合适)?

void I2C_MasterControl(I2C_Handle i2cHandle, I2C_Control_e action, uint16_t bitCount, uint16_t bytes)
{
// Check the arguments.
assert(I2C_isHandleValid(i2cHandle));
assert(bitCount <= 7);
I2C_Obj *i2c = (I2C_Obj *)i2cHandle;
// Write the number of bytes to send or receive
i2c->I2CCNT = bytes;

// Send the command.
i2c->I2CMDR = action | bitCount;
}

赞(0)
未经允许不得转载:TI中文支持网 » I2C.c移入motorware
分享到: 更多 (0)