Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years ago.
Strange compiler Error 147 and 135 in InterruptIn
I have declared an interrupt like this:-
InterruptIn tone_isr(dp15);
My main() looks like this:-
tone.mode(PullUp); . . . tone.fall(&tone_isr);
this is the same as for all other inrterrupts I am using, but when I compile, I get the following:-
Error: Declaration is incompatible with "mbed::InterruptIn tone_isr" (declared at <a href="#" onmousedown="mbed_doc_goto('/RC5_AndrewR/Pindef1114.h', '24'); return false;">Pindef1114.h:24</a>) in "main.cpp", Line: 199, Col: 7
and a bit further down nin the compile error report
Error: Class "mbed::DigitalIn" has no member "fall" in "main.cpp", Line: 430, Col: 11
Any pointers as to what I am doing wrong?
'pointer' is the issue...
InterruptIn builds a class with a 'name' you have used tone_isr this should be (according to other line)
the line.....
so you should have a routine or similar...
Thanks Martin - clear.
posted by Andrew R 01 Dec 2015