mirror of https://github.com/ARMmbed/mbed-os.git
HAL [LPC824] Fix multi channel I2C issue
- Update resource count value which did not count up during multiple channel I2C resources are usedpull/598/head
parent
3dfb033226
commit
c48829330c
|
@ -121,6 +121,7 @@ void i2c_init(i2c_t *obj, PinName sda, PinName scl)
|
|||
i2c_ch = get_available_i2c();
|
||||
if (i2c_ch == -1)
|
||||
return;
|
||||
i2c_used |= (1 << (i2c_ch - 1));
|
||||
|
||||
swm = &SWM_I2C_SDA[i2c_ch - 1];
|
||||
regVal = LPC_SWM->PINASSIGN[swm->n] & ~(0xFF << swm->offset);
|
||||
|
|
Loading…
Reference in New Issue