temp=penConfig.xfac*100000000;//保存x校正因素I2C_WriteByte(temp&0xff,0, ADDR_24LC08);I2C_WriteByte((temp>>8)&0xff,1, ADDR_24LC08);I2C_WriteByte((temp>>16)&0xff,2, ADDR_24LC08);I2C_WriteByte((temp>>24)&0xff,3, ADDR_24LC08); temp=penConfig.yfac*100000000;//保存y校正因素I2C...
ret =i2c_smbus_write_byte(client, TSL2550_POWER_DOWN);else{ ret =i2c_smbus_write_byte(client, TSL2550_POWER_UP);/* On power up we should reset operating mode also... */tsl2550_set_operating_mode(client, data->operating_mode); } data->power_state = state;returnret; } 开发者ID:...
u8 out;/* Clear any previous over-temperature alert */rc = i2c_smbus_read_byte_data(hwmon_client, MAX664X_REG_RSL);if(rc <0)returnrc;/* Enable port 0 and port 1 outputs on IO expander */rc =i2c_smbus_write_byte_data(ioexp_client, P0_CONFIG,0x00);if(rc)returnrc; rc =i2c_...
omap_i2c_outw(val, I2C_SCLH); omap_i2c_outw(1, I2C_OA); omap_i2c_outw(I2C_CON_EN, I2C_CON); omap_i2c_outw(0x1F, I2C_IE); i2c_flush(); omap_i2c_outw(0xFFFF, I2C_STAT); omap_i2c_outw(0, I2C_CNT);// init dispi2c_write_byte(0x49,0x9B,0x80);i2c_write_byte(0x49,...