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

[Core] Fix ChibiOS i2c_master error codes #17808

Merged
merged 1 commit into from
Jul 28, 2022
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
4 changes: 2 additions & 2 deletions platforms/chibios/drivers/i2c_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static const I2CConfig i2cconfig = {
* @return i2c_status_t QMK specific I2C status code
*/
static i2c_status_t i2c_epilogue(const msg_t status) {
if (status == I2C_NO_ERROR) {
if (status == MSG_OK) {
return I2C_STATUS_SUCCESS;
}

Expand All @@ -125,7 +125,7 @@ static i2c_status_t i2c_epilogue(const msg_t status) {
// hard stop in case of any error.
i2c_stop();

return status == I2C_TIMEOUT ? I2C_STATUS_TIMEOUT : I2C_STATUS_ERROR;
return status == MSG_TIMEOUT ? I2C_STATUS_TIMEOUT : I2C_STATUS_ERROR;
}

__attribute__((weak)) void i2c_init(void) {
Expand Down