Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years ago.
I2C has no member "transfer" error.
Hi,
I'm getting this error:
Error: Class "mbed::I2C" has no member "transfer" in "main.cpp", Line: 27, Col: 10
and line 27 is
`i2c.transfer(address, (char *)txBuffer, 1,(char *)rxBuffer, 1, eSwitchCb, I2C_EVENT_TRANSFER_COMPLETE, false);
I know there is a transfer function, as you can see in the documents, so why is this error happening. What is the best way to debug it?
The help page for the error says to make sure there aren't any typos, I check multiple times, also I copied and pasted the line above.
I'm following the async transfer from https://developer.mbed.org/teams/SiliconLabs/wiki/Using-the-mbed-asynchronous-APIs page Cheers