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:
@@ -34,7 +34,8 @@ static void slaveCallback(I2C_Type *base, i2c_master_handle_t *handle, status_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
status_t currentStatus = currentSlave->update(currentSlave->perDriverId);
|
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) {
|
if (isTransferScheduled) {
|
||||||
currentSlave->isConnected = true;
|
currentSlave->isConnected = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user