i2c state machine