Code: Select all
// turn the data to input
i2c.sda :> Temp;
gt :> time;
time += (I2C_BIT_TIME / 2);
gt when timerafter(time) :> void;
i2c.scl <: 1;
// sample first ACK.
i2c.sda :> ack[0];
gt :> time;
time += (I2C_BIT_TIME / 2);
gt when timerafter(time) :> void;
i2c.scl <: 0;
Is this how an XMOS I2C master "releases" the I2C bus so the slave can drive it?
Landon