Should have mentioned - Arduino V1.5.3
but I guess the real question is whether or not there is a working SPI library for Galileo (specifically gen2)? Am I incorrect in assuming that all of the examples bundles with the Intel IDE should work (at least compile) without modification - I see the SPI library still contains avr specific references.
I'm just looking to get access to SPI so I can interface my current SPI components (LCD displays, digital pots, memory etc). I would have thought that it would be straightforward.
I'm familiar with atmel based arduino, and am now in the process of trying to use Galileo. SPCR SPDR and SPSR are atmel spi registers, I was assuming that there would be equivalents for Galileo with a mapping to the legacy naming (or some equivalent mechanism).
I'd welcome any advice on how best to proceed.
The SPI library has been rewritten and works on Gen 2. I am not sure if the examples have been rewritten or checked to make sure they still work as well. I don't remember seeing any AVR in the SPI library, but it's been a little while since I looked at it. Still, make sure you are looking at the correct SPI library inside the Galileo IDE.
Again thanks Guys.
As you've suggested, it's looking like the IDE is picking up the wrong SPI library -
It's picking up a version of SPI from 'Robot_Control' - I'm not sure why, it must have something to do with the way I've installed the IDE & libraries.
I then looked to see what versions I seem to have ...
/opt/intel$ find . -iname 'spi.h'
The top one looks correct; the one in Robot_Control is definitely incorrect - at a glance it's just the old one (with avr refs etc.) ; hence the errors.
When I get a chance I'll see how to make sure it's picking up the correct one, and then give it a go.