Open terrillmoore opened 2 years ago
@terrillmoore have tested with these changes. application works good but that requires changes in Sigfox library where interrupt_enable function is being called.
I will do the necessary changes and push them to the Sigfox lib.
Also for PR #187 I will include the changes of branch issue188
.
requires changes in Sigfox library where interrupt_enable function is being called.
That's as expected. Thanks!
It appears that the intent was that
stm32_interrupt_enable()
andstm32_interrupt_disable()
should be callable from C. But the header file (cores/arduino/stm32/interrupt.h) neglected to declare themextern "C"
, so they can't be. (There's an overload fromstm32_interrupt_enable()
using astd::function<>
wrapper, and the header file makes that invisible when included in a.c
file. But since the visiblestm32_interrupt_enable()
is implemented in a C++ file, you get a link error when you try to link. Ditto forstm32_interrupt_disable()
.The solution is to wrap in the C-ish things in
extern "C"
ininterrupt.h
when compiling in C++; that way, the functions will be callable from C.