Skip to content

Commit b63a90d

Browse files
authored
fix(PeriphDrivers): Issue #1293: MAX32670 I2C Driver causes a Double-Read (#1359)
Signed-off-by: Dung Nguyen <dung.nguyen@analog.com>
1 parent ac5c227 commit b63a90d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Libraries/PeriphDrivers/Source/I2C/i2c_reva.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,11 @@ int MXC_I2C_RevA_MasterTransaction(mxc_i2c_reva_req_t *req)
902902
return E_BAD_STATE;
903903
}
904904

905+
// Check and return BUSY if the Bus is not ready
906+
if (i2c->status & MXC_F_I2C_REVA_STATUS_BUSY) {
907+
return E_BUSY;
908+
}
909+
905910
// if(!read | write)
906911
// Start
907912
// send addr w/ write bit

0 commit comments

Comments
 (0)