第二个参数是要读取的数据块的起始的寄存器的地址,也就是通过I2C总线从0x00寄存器开始连续读sizeof(struct xydata_t)个数据到y_data中。
在下文中一共展示了i2c_smbus_read_i2c_block_data函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。 示例1: max14656_read_block_reg ▲點讚 9▼ staticintmax14656_read_block_reg(struct i2c_client *client, u8 r...
# 需要導入模塊: from smbus import SMBus [as 別名]# 或者: from smbus.SMBus importread_i2c_block_data[as 別名]classHTU21D:def__init__(self, busno):self.bus = SMBus(busno)defread_temperature(self):self.reset() msb, lsb, crc = self.bus.read_i2c_block_data(I2C_ADDR, CMD_TRIG_...
i2c: Fix the i2c_smbus_read_i2c_block_data() prototype Let the drivers specify how many bytes they want to read with i2c_smbus_read_i2c_block_data(). So far, the block count was hard-coded to I2C_SMBUS_BLOCK_MAX (32), which did not make much sense. Many driver authors complained...
ret =i2c_smbus_read_i2c_block_data(client, reg, length, val);if(ret <0) { dev_err(&client->dev,"failed to block read reg 0x%x: %d\n", reg, ret);returnret; }return0; } 开发者ID:GameTheory-,项目名称:android_kernel_g4stylusn2,代码行数:16,代码来源:max14656_charger_detector.c ...