Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(PeriphDrivers): Remove Redundant if Statement in I2C Rev A #781

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Libraries/PeriphDrivers/Source/I2C/i2c_reva.c
Original file line number Diff line number Diff line change
Expand Up @@ -1440,11 +1440,7 @@ void MXC_I2C_RevA_MasterAsyncHandler(int i2cNum)
}

/* Call the callback */
if (i2c->intfl0 & MXC_I2C_REVA_ERROR) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would we want to always pass E_COMM_ERR? I'm confused

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, cut the wrong line. e492743

MXC_I2C_RevA_AsyncCallback(i2c, E_COMM_ERR);
} else {
MXC_I2C_RevA_AsyncCallback(i2c, E_NO_ERROR);
}
MXC_I2C_RevA_AsyncCallback(i2c, E_NO_ERROR);

/* Clear the async state */
MXC_I2C_RevA_AsyncStop(i2c);
Expand Down
Loading