6 years, 3 months ago.

normal STM32 I2C code ,how move to MBED ?

I2c_ReadByte(&bytes[1], ACK, 0);

how move to MBED

mi2c.read()

1 Answer

6 years, 3 months ago.

Hi Liu, Please refer to I2C HelloWorld example program for MBED.

https://os.mbed.com/teams/mbed_example/code/I2C_HelloWorld/file/fa13d56ff9ff/main.cpp. In essence, you will need to create an I2C object and make a read call on the object.

Hope this helps. Please let us know if you have any questions.

Thanks,

Naveen, team MBED.