I have been updating my libraries to use This new EnableInterrupt, but I was hitting a wall with this error message: multiple definition of `__vector_1', of course the compiler flags the error in code that has no relationship with the actual cause of the problem. So I just kept simplifying my code until i found what was left.
It turns out the if you use attachInterrupt(), (the Arduino Standard procedure) it produces this collision, now I am converting all of the old attachInterrupt() calls to enableInterrupt().
I think you should add this error message to your FAQ.
chuck.
edit: Solved this error only to create a new error.
I am using EnableInterrupt to add CTS/RTS handshaking to HardwareSerial. It works just fine, BUT, of course there is a but, If I want to use EnableInterrupt in my 'Application' level code, now I get
*C:\Documents and Settings\user\My Documents\Arduino\libraries\EnableInterrupt/EnableInterrupt.h:783: multiple definition of `enableInterrupt(unsigned char, void ()(), unsigned char)'**
Here is the how I included EnableInterrupt in HardwareSerial.cpp:
#define EI_ARDUINO_INTERRUPTED_PIN // to support CTS handshaking
#include "C:\Documents and Settings\user\My Documents\Arduino\libraries\EnableInterrupt\EnableInterrupt.h"
//To support CTS handshaking 02AUG2015 Chuck Todd
Any Clues how to solve this collision?
Chuck.
Edit 27AUG15 19:41MDT
Here is a working solution, still testing, but so far it works. In the 'Application, or Application libraries' instead of #include <EnableInterrupt.h> use this:
Not a bad idea to add this to the FAQ. I will do that for the next release. Meanwhile, as per the FAQ: insert #define LIBCALL_ENABLEINTERRUPT in front of every #include in every one of the files in which you want to use EnableInterrupt library functionality- except one. In that file (often but not necessarily your sketch), just place the #include directive; don't define the LIBCALL_ENABLEINTERRUPT. This will perform an equivalent to what you did. :-)
I have been updating my libraries to use This new EnableInterrupt, but I was hitting a wall with this error message: multiple definition of `__vector_1', of course the compiler flags the error in code that has no relationship with the actual cause of the problem. So I just kept simplifying my code until i found what was left.
It turns out the if you use
attachInterrupt()
, (the Arduino Standard procedure) it produces this collision, now I am converting all of the oldattachInterrupt()
calls toenableInterrupt()
.I think you should add this error message to your FAQ.
chuck.
edit: Solved this error only to create a new error.
I am using EnableInterrupt to add CTS/RTS handshaking to HardwareSerial. It works just fine, BUT, of course there is a but, If I want to use EnableInterrupt in my 'Application' level code, now I get *C:\Documents and Settings\user\My Documents\Arduino\libraries\EnableInterrupt/EnableInterrupt.h:783: multiple definition of `enableInterrupt(unsigned char, void ()(), unsigned char)'**
Here is the how I included EnableInterrupt in HardwareSerial.cpp:
Any Clues how to solve this collision?
Chuck. Edit 27AUG15 19:41MDT
Here is a working solution, still testing, but so far it works. In the 'Application, or Application libraries' instead of
#include <EnableInterrupt.h>
use this:Chuck.