mirror of
https://github.com/afska/gba-link-connection.git
synced 2026-10-01 21:36:53 -05:00
FIX: When using LINK_WIRELESS_ENABLE_NESTED_IRQ, preventing acknowledge from being interrupted
This commit is contained in:
@@ -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 ==
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user