convert i2c peripheral to get/put