mirror of https://github.com/joan2937/pigpio
Fix Issue#402 Cannot handle multiple I2C devices on RPi 4B
This commit is contained in:
parent
258b034512
commit
55608548fc
2
pigpio.c
2
pigpio.c
|
@ -4116,7 +4116,7 @@ int i2cOpen(unsigned i2cBus, unsigned i2cAddr, unsigned i2cFlags)
|
||||||
i2cInfo[slot].addr = i2cAddr;
|
i2cInfo[slot].addr = i2cAddr;
|
||||||
i2cInfo[slot].flags = i2cFlags;
|
i2cInfo[slot].flags = i2cFlags;
|
||||||
i2cInfo[slot].funcs = funcs;
|
i2cInfo[slot].funcs = funcs;
|
||||||
i2cInfo[i].state = PI_I2C_OPENED;
|
i2cInfo[slot].state = PI_I2C_OPENED;
|
||||||
|
|
||||||
return slot;
|
return slot;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue