Fleshed out functions for read/write I2C.