How would you design a software driver for an I2C-based temperature sensor? What layers of abstraction would you implement?