Merge pull request #462 from stevstrong/patch-11

Update i2c.c to fix bug with devices where ID = 0x7x
This commit is contained in:
Roger Clark 2018-03-18 20:21:11 +11:00 committed by GitHub
commit 0ac3df5628
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -324,7 +324,7 @@ void _i2c_irq_handler(i2c_dev *dev) {
/*
* EV6: Slave address sent
*/
if (sr1 & I2C_SR1_ADDR) {
if (sr1 & (I2C_SR1_ADDR|I2C_SR1_ADD10)) {
/*
* Special case event EV6_1 for master receiver.
* Generate NACK and restart/stop condition after ADDR