FIX: When using LINK_WIRELESS_ENABLE_NESTED_IRQ, preventing acknowledge from being interrupted

This commit is contained in:
Rodrigo Alfonso
2025-01-27 09:32:59 -03:00
parent 25788dc238
commit f5f1bde1fe
2 changed files with 8 additions and 1 deletions

View File

@@ -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 ==

View File

@@ -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();