improve i2c write/read.