Jump to content
43oh

error on inclusion of SPI library, help needed


Recommended Posts

hello, new here, having some problems. when I simply import the SPI library, I get numerous errors. is there a simple thing I'm doing wrong? I've tried looking but nobody else seems to be having the problem, help would be greatly appreciated. thanks.

 

here's the code

#include <SPI.h>
void setup()
{
}
void loop()
{
}

and when compiled returns this error


In file included from sketch_jun14b.cpp:1:0:
C:\Users\tgkann\Documents\Energia\libraries\SPI/SPI.h: In static member function 'static byte SPIClass::transfer(byte)':
C:\Users\tgkann\Documents\Energia\libraries\SPI/SPI.h:56:3: error: 'SPDR' was not declared in this scope
C:\Users\tgkann\Documents\Energia\libraries\SPI/SPI.h:57:12: error: 'SPSR' was not declared in this scope
C:\Users\tgkann\Documents\Energia\libraries\SPI/SPI.h:57:23: error: 'SPIF' was not declared in this scope
C:\Users\tgkann\Documents\Energia\libraries\SPI/SPI.h:57:27: error: '_BV' was not declared in this scope
C:\Users\tgkann\Documents\Energia\libraries\SPI/SPI.h: In static member function 'static void SPIClass::attachInterrupt()':
C:\Users\tgkann\Documents\Energia\libraries\SPI/SPI.h:63:3: error: 'SPCR' was not declared in this scope
C:\Users\tgkann\Documents\Energia\libraries\SPI/SPI.h:63:15: error: 'SPIE' was not declared in this scope
C:\Users\tgkann\Documents\Energia\libraries\SPI/SPI.h:63:19: error: '_BV' was not declared in this scope
C:\Users\tgkann\Documents\Energia\libraries\SPI/SPI.h: In static member function 'static void SPIClass::detachInterrupt()':
C:\Users\tgkann\Documents\Energia\libraries\SPI/SPI.h:67:3: error: 'SPCR' was not declared in this scope
C:\Users\tgkann\Documents\Energia\libraries\SPI/SPI.h:67:16: error: 'SPIE' was not declared in this scope
C:\Users\tgkann\Documents\Energia\libraries\SPI/SPI.h:67:20: error: '_BV' was not declared in this scope
Link to post
Share on other sites

ah, i figured it would get a directory not found error.

works perfectly, thank you. :)

Have a peek at <energia install location>\hardware\<platform>\libraries BTW... e.g.:

 

C:\energia-0101E0017\hardware\msp430\libraries

 

Some stuff might be in the core, which is also fun to peruse:

C:\energia-0101E0017\hardware\msp430\cores\msp430

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...