I'm newbie with mBed, so I did a lot of learning those past days.
I've experimenting I2C on an chinese LPC1768 board, and on my first trial, the controller was freezing not even reaching the main().
I figured out that I2C constructor using physical pins was the issue, ie. : "I2C i2c(P0_28, P0_27);". I was trying to use the SDA0/SCL0 of the LPC1768 which are share with P0_27/P0_28 GPIOs, pure coincidence about the numbering of those pins, because on mBed board, they are not even connected, the p27/p28 of the mBed are in fact P0_10/P0_11 which are SDA2/SCL2.
If I use the same I2C port SDA2/SCL2, everything is working.
But what I should do if I really want to use SDA0/SCL0 or SDA1/SCL1 (which is also not connected on mBed) ?
I've tried the I2CX mentionned above, but I can't get it compile, it complains about missing _i2c.sda/_i2c.scl members ...
Crossposting this thread here: http://developer.mbed.org/users/nemovn/notebook/assigning-i2c-pins-manually-/
I think we need a way to support the super awesome GPIO capabilities of the NRF chip, currently the api limits pin selection.
A possible solution can be found here: http://developer.mbed.org/users/jaerts/code/I2CX/
It would be great if we can merge similar functionality into the core mbed api (so that it can be used with platforms that support this).