Fix the scheduler by making it maintain previousSlaveId correctly.

This commit is contained in:
László Monda
2017-09-28 21:44:51 +02:00
parent 6c2e806d6d
commit 5eb82c262a

View File

@@ -42,9 +42,8 @@ static void masterCallback(I2C_Type *base, i2c_master_handle_t *handle, status_t
currentSlave->isConnected = true;
}
previousSlaveId = currentSlaveId;
if (currentStatus != kStatus_Uhk_NoTransfer) {
currentSlaveId++;
previousSlaveId = currentSlaveId++;
}
if (currentSlaveId >= (sizeof(Slaves) / sizeof(uhk_slave_t))) {