I2C start condition does not get detected as stop

This commit is contained in:
Chris Esposito 2018-11-04 11:46:17 +11:00
parent 124bcd3a61
commit e63a97e23a
1 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ void i2cDecoder::reset()
void i2cDecoder::run()
{
qDebug() << "i2cDecoder::run()";
// qDebug() << "i2cDecoder::run()";
while (serialDistance(sda) > SERIAL_DELAY * sda->sampleRate_bit)
{
updateBitValues();
@ -99,13 +99,13 @@ void i2cDecoder::runStateMachine()
if ((sdaEdge == edge::rising) && (sclEdge == edge::held_high)) // START
{
startCondition();
stopCondition();
return;
}
if ((sdaEdge == edge::falling) && (sclEdge == edge::held_high)) // STOP
{
stopCondition();
startCondition();
return;
}