Go Down

Topic: SPI error while using WiFly shield on Arduino Due (Read 600 times) previous topic - next topic

elnhege

Hi, I recently started with Arduino and now I want to add a WiFly shield to the Due.
When trying to run one of the demo applications (SpiUartTerminal) I got an error during the verification.
Code: [Select]
_Spi.cpp: In member function 'void SpiDevice::_initSpi()':
_Spi.cpp:62: error: 'SPCR' was not declared in this scope
_Spi.cpp:62: error: 'SPE' was not declared in this scope
_Spi.cpp:62: error: 'MSTR' was not declared in this scope
_Spi.cpp:62: error: 'SPR1' was not declared in this scope
_Spi.cpp:62: error: 'SPR0' was not declared in this scope
_Spi.cpp:63: error: 'SPSR' was not declared in this scope
_Spi.cpp:63: error: 'SPI2X' was not declared in this scope
_Spi.cpp: In member function 'byte SpiDevice::transfer(byte)':
_Spi.cpp:104: error: 'SPDR' was not declared in this scope
_Spi.cpp:105: error: 'SPSR' was not declared in this scope
_Spi.cpp:105: error: 'SPIF' was not declared in this scope


I assume it has to do with the fact that I am using the Due.

Any idea how to solve this error?

Thanks in advance,
Henk

Nick Gammon

Almost certainly the Due has completely different register names. I'll move this thread to the Due section.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Graynomad

Yes, any code written using AVR-specific register names will not work on the Due, I don't know what "SpiUartTerminal" is but it obviously falls into that category.

_____
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Go Up