Merge pull request #598 from toyowata/master

HAL: LPC824 - Fix multi channel I2C issue
pull/602/head
Martin Kojtal 2014-10-24 11:20:48 +01:00
commit 2fe9871855
1 changed files with 1 additions and 0 deletions

View File

@ -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);