For a preconfigured pin, the first parameter is the pin number for which you want to enable interrupts, the second is the interrupt direction (rising, falling.
Basic definition of the application behavior myAppClass. Details are omitted.
myAppClass.cpp
/*****************************************************************/// MUST DEFINE CLASS NAME HERE#define__MWX_APP_CLASS_NAME myAppClass#include"_mwx_cbs_cpphead.hpp"/*****************************************************************/MWX_DIO_INT(PIN_DIGITAL::DIO5,uint32_t arg,uint8_t& handled) {staticuint8_t ct;digitalWrite(PIN_DIGITAL::DIO12, (++ct &1) ? HIGH : LOW); handled =false; // if true, no further event.}MWX_DIO_EVENT(PIN_DIGITAL::DIO5,uint32_t arg) { Serial <<'*'; }/*****************************************************************/// common procedure (DO NOT REMOVE)#include"_mwx_cbs_cpptail.cpp"// MUST UNDEF CLASS NAME HERE#undef__MWX_APP_CLASS_NAME} // mwx/*****************************************************************/
Description of the interrupt handler of the application behavior myAppClass, which inverts the output setting of DIO12 when an interrupt of DIO5 is generated and displays * on the serial port Serial for events occurring after the interrupt handler is finished.