void Engine::Start(){
attachInterrupt(_rpmpin, RpmTick, RISING);
}
void Engine::RpmTick(){
noInterrupts();
_rpmTicks++;
interrupts();
}
//Error msg: error: argument of type 'void (Engine::)()' does not match 'void (*)()'
You can't do it directly. You need to attach a function (not a method) - in the function, you can call a static method, or a non-static method of a static instance, or of an instance visible to your interrupt handling function by any other means.
PeterH:
You can't do it directly. You need to attach a function (not a method) - in the function, you can call a static method, or a non-static method of a static instance, or of an instance visible to your interrupt handling function by any other means.