Executing "i2c stop" and "i2c start" for repeated start condition does
NOT work for LP3979. For LP3979, I've implemented repeated start
condition.
We need to consider using this as the standard repeated start condition.
}
/*-----------------------------------------------------------------------
+ * REPEATED START: Low -> High -> Low on SDA while SCL is High
+ */
+static void send_repeated_start(void)
+{
+ I2C_SOFT_DECLARATIONS /* intentional without ';' */
+
+ I2C_DELAY;
+ I2C_SCL(0);
+ I2C_DELAY;
+ I2C_SDA(0);
+ I2C_DELAY;
+
+ I2C_DELAY;
+ I2C_SDA(1);
+ I2C_DELAY;
+ I2C_SCL(1);
+ I2C_DELAY;
+ I2C_SDA(0);
+ I2C_DELAY;
+}
+
+/*-----------------------------------------------------------------------
* STOP: Low -> High on SDA while SCL is High
*/
static void send_stop(void)
* stop/start sequence.
*/
#ifdef CONFIG_SOFT_I2C_READ_REPEATED_START
- send_start();
+ send_repeated_start();
#else
send_stop();
send_start();