mirror of https://github.com/ARMmbed/mbed-os.git
SiLabs Pearl: I2C: Do not try to force specific locations of pins
Pearl can freely select pins, so do not force both SDA and SCL pins to have the same "location".pull/1501/head
parent
c1e5c0b907
commit
316e8733df
|
@ -107,10 +107,13 @@ void i2c_preinit(i2c_t *obj, PinName sda, PinName scl)
|
|||
obj->i2c.i2c = (I2C_TypeDef*) pinmap_merge(i2c_sda, i2c_scl);
|
||||
MBED_ASSERT(((int) obj->i2c.i2c) != NC);
|
||||
|
||||
#ifndef _SILICON_LABS_32B_PLATFORM_2
|
||||
int loc_sda = pin_location(sda, PinMap_I2C_SDA);
|
||||
int loc_scl = pin_location(scl, PinMap_I2C_SCL);
|
||||
obj->i2c.loc = pinmap_merge(loc_sda, loc_scl);
|
||||
MBED_ASSERT(obj->i2c.loc != NC);
|
||||
#endif
|
||||
|
||||
obj->i2c.sda = sda;
|
||||
obj->i2c.scl = scl;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,9 @@ struct dac_s {
|
|||
#if DEVICE_I2C
|
||||
struct i2c_s {
|
||||
I2C_TypeDef *i2c;
|
||||
#ifndef _SILICON_LABS_32B_PLATFORM_2
|
||||
int loc;
|
||||
#endif
|
||||
uint8_t index;
|
||||
PinName sda;
|
||||
PinName scl;
|
||||
|
|
Loading…
Reference in New Issue