diff --git a/lib/LinkRawWireless.hpp b/lib/LinkRawWireless.hpp index 0b6b2a7..b2d1a78 100644 --- a/lib/LinkRawWireless.hpp +++ b/lib/LinkRawWireless.hpp @@ -1146,6 +1146,13 @@ class LinkRawWireless { asyncCommand.direction == AsyncCommand::Direction::SENDING) { if (!acknowledge()) return -4; + +#ifdef LINK_WIRELESS_PUT_ISR_IN_IWRAM +#ifdef LINK_WIRELESS_ENABLE_NESTED_IRQ + Link::_REG_IME = 1; +#endif +#endif + sendAsyncCommand(newData, _clockInversionSupport); } else if (_clockInversionSupport) { if (!reverseAcknowledge(asyncCommand.step == diff --git a/lib/LinkWireless.cpp b/lib/LinkWireless.cpp index dd6305d..1fdedd4 100644 --- a/lib/LinkWireless.cpp +++ b/lib/LinkWireless.cpp @@ -6,7 +6,7 @@ LINK_CODE_IWRAM void LinkWireless::_onSerial() { #ifdef LINK_WIRELESS_ENABLE_NESTED_IRQ interrupt = true; LINK_BARRIER; - Link::_REG_IME = 1; + // (nested interrupts are enabled by LinkRawWireless::_onSerial(...)) #endif __onSerial();