mirror of https://github.com/EspoTek/Labrador.git
I2C start condition does not get detected as stop
This commit is contained in:
parent
124bcd3a61
commit
e63a97e23a
|
@ -30,7 +30,7 @@ void i2cDecoder::reset()
|
||||||
|
|
||||||
void i2cDecoder::run()
|
void i2cDecoder::run()
|
||||||
{
|
{
|
||||||
qDebug() << "i2cDecoder::run()";
|
// qDebug() << "i2cDecoder::run()";
|
||||||
while (serialDistance(sda) > SERIAL_DELAY * sda->sampleRate_bit)
|
while (serialDistance(sda) > SERIAL_DELAY * sda->sampleRate_bit)
|
||||||
{
|
{
|
||||||
updateBitValues();
|
updateBitValues();
|
||||||
|
@ -99,13 +99,13 @@ void i2cDecoder::runStateMachine()
|
||||||
|
|
||||||
if ((sdaEdge == edge::rising) && (sclEdge == edge::held_high)) // START
|
if ((sdaEdge == edge::rising) && (sclEdge == edge::held_high)) // START
|
||||||
{
|
{
|
||||||
startCondition();
|
stopCondition();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sdaEdge == edge::falling) && (sclEdge == edge::held_high)) // STOP
|
if ((sdaEdge == edge::falling) && (sclEdge == edge::held_high)) // STOP
|
||||||
{
|
{
|
||||||
stopCondition();
|
startCondition();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue