SPI vs SPI1 different types in particle-dev vs cloud? Can't compile

Hi all!

I seem to be having a strange issue. I have taken some code which compiles fine in the Cloud IDE and am moving it over to particle-dev (using the particle-dev plugins with Atom 1.7.3).

I’m getting the following error when trying to call SPI1.transfer(…):

“request for member “transfer” in ‘t073819648u’, which is of pointer type SPI_TypeDef (maybe you meant ->)” (slightly paraphrasing here, as the error message is truncated in Atom).

I don’t get that error if I call SPI.transfer(…).

It appears that SPI1 is declared as a SPI_TypeDef, but SPI is declared as an SPIClass.

I’m including application.h in the top of my files; the file in which I see the error is a .cpp file; my main application also has a .ino file FWIW.

Anyone seen this before? Could I be overlooking something simple?

SPI1 isn’t supported on the Spark Core - so be sure you have selected a Photon/P1/Electron in the devices drawer.

1 Like

Thanks! That was indeed my issue - I had no device selected.

1 Like