Regarding isTransferScheduled check for != kStatus_Uhk_IdleSlave which restores I2C fairly reliably upon disconnect instead of == kStatus_Success which for some reason doesn't.

This commit is contained in:
László Monda
2017-08-20 03:36:08 +02:00
parent 8e50712f75
commit cc1ba715bc

View File

@@ -34,7 +34,8 @@ static void slaveCallback(I2C_Type *base, i2c_master_handle_t *handle, status_t
}
status_t currentStatus = currentSlave->update(currentSlave->perDriverId);
isTransferScheduled = currentStatus == kStatus_Success;
isTransferScheduled = currentStatus != kStatus_Uhk_IdleSlave;
//isTransferScheduled = currentStatus == kStatus_Success // Why it is not working?
if (isTransferScheduled) {
currentSlave->isConnected = true;
}