For everybody who expects a simple I2C program which runs on the LPC17xx platform will also run on Nucleo will be disapointed. The normal I2C procedure: start(), write(addr), write(data), stop() will NOT work with the nucleo API.
Instead you have to use i2c.write(address,data,length,repeat) only, because the method contains allready the start and stop function and a special addressing function.
When I looked at the example Nucleo_ic_master I first noticed the missing start and stop functions, but thought the LM75 does not need this functions. After looking into the API-code I could see that the both implemented write functions are very different which can be not recognized by reading the API-documentation only. The documentation gives the impression that one method is for sending a single byte and the other one for sending multiple bytes.
This is not my understanding of cross-platform portability.
Hopefully this will save some time for others who are using the Nucleo I2C functions.
For everybody who expects a simple I2C program which runs on the LPC17xx platform will also run on Nucleo will be disapointed. The normal I2C procedure: start(), write(addr), write(data), stop() will NOT work with the nucleo API.
Instead you have to use i2c.write(address,data,length,repeat) only, because the method contains allready the start and stop function and a special addressing function.
When I looked at the example Nucleo_ic_master I first noticed the missing start and stop functions, but thought the LM75 does not need this functions. After looking into the API-code I could see that the both implemented write functions are very different which can be not recognized by reading the API-documentation only. The documentation gives the impression that one method is for sending a single byte and the other one for sending multiple bytes.
This is not my understanding of cross-platform portability.
Hopefully this will save some time for others who are using the Nucleo I2C functions.