Hello again,
my timer interrupt is this:
void Encoder::timer_interrupt_handler(){
if (this->Direction() == POSITIVE) _revolutions++;
if (this->Direction() == NEGATIVE) _revolutions--;
}
And I try to attach it to the timer as this:
timer_attach_interrupt(_TIMER, TIMER_UPDATE_INTERRUPT, timer_interrupt_handler);
I get this error:
Also note that because of preprocessing, line numbers won't match up exactly. We're working on a fix.
/Users/bubulindo/Documents/MapleIDE/libraries/Encoder/encoder.cpp: In constructor 'Encoder::Encoder(timer_dev*, unsigned char, unsigned int, unsigned int)':
/Users/bubulindo/Documents/MapleIDE/libraries/Encoder/encoder.cpp:104: error: argument of type 'void (Encoder::)()' does not match 'void (*)()'
Casting gives me a similar error, if I try this:
timer_attach_interrupt(_TIMER, TIMER_UPDATE_INTERRUPT, (voidFuncPtr)timer_interrupt_handler);
I get this error:
Also note that because of preprocessing, line numbers won't match up exactly. We're working on a fix.
/Users/bubulindo/Documents/MapleIDE/libraries/Encoder/encoder.cpp: In constructor 'Encoder::Encoder(timer_dev*, unsigned char, unsigned int, unsigned int)':
/Users/bubulindo/Documents/MapleIDE/libraries/Encoder/encoder.cpp:104: error: invalid use of member (did you forget the '&' ?
Any thoughts?