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, 3 months ago.
Why can't I use SPI's transfer method?
I am trying to write a program to communicate with an ADC using SPI
I have created an SPI object, etc but when I try to compile the compiler tells me that the transfer function is not a member of the SPI class. I've double, triple, quadruple and quintuple checked my spelling etc, even going so far as to copy and paste from the documentation. This is the offending line of code:
adc.transfer(NULL, 0, NULL, 0, &cb, 1);
adc is my spi object.
Any help that someone could offer would be greatly appreciated.