diff --git a/lib/LinkWireless.hpp b/lib/LinkWireless.hpp index 7c91823..14ebbc5 100644 --- a/lib/LinkWireless.hpp +++ b/lib/LinkWireless.hpp @@ -1902,4 +1902,21 @@ inline void LINK_WIRELESS_ISR_TIMER() { linkWireless->_onTimer(); } +/** + * NOTES: + * When using `LINK_WIRELESS_ENABLE_NESTED_IRQ`: + * - Any user ISR can interrupt the library ISRs. + * * The SERIAL ISR only enables nested interrupts after completing the + * acknowledge with the Wireless Adapter. + * - SERIAL ISR can interrupt TIMER ISR. + * -> This doesn't cause data races since TIMER ISR only works when + * there is no active async task. + * -> When TIMER ISR starts an async task (`transferAsync(...)`), + * nested interrupts are disabled (`REG_IME = 0`) and SERIAL cannot + * interrupt anymore. + * - TIMER interrupts are skipped if SERIAL ISR is running. + * - VBLANK interrupts are postponed if SERIAL or TIMER ISRs are running. + * - Nobody can interrupt VBLANK ISR. + */ + #endif // LINK_WIRELESS_H diff --git a/lib/iwram_code/LinkWireless.cpp b/lib/iwram_code/LinkWireless.cpp index 7a99dea..4a7c615 100644 --- a/lib/iwram_code/LinkWireless.cpp +++ b/lib/iwram_code/LinkWireless.cpp @@ -35,21 +35,4 @@ _LINK_SERIAL_ISR void LinkWireless::processMessage(u32 playerId, playerBitMapCount); } -/** - * NOTES: - * When using `LINK_WIRELESS_ENABLE_NESTED_IRQ`: - * - Any user ISR can interrupt the library ISRs. - * * The SERIAL ISR only enables nested interrupts after completing the - * acknowledge with the Wireless Adapter. - * - SERIAL ISR can interrupt TIMER ISR. - * -> This doesn't cause data races since TIMER ISR only works when - * there is no active async task. - * -> When TIMER ISR starts an async task (`transferAsync(...)`), - * nested interrupts are disabled (`REG_IME = 0`) and SERIAL cannot - * interrupt anymore. - * - TIMER interrupts are skipped if SERIAL ISR is running. - * - VBLANK interrupts are postponed if SERIAL or TIMER ISRs are running. - * - Nobody can interrupt VBLANK ISR. - */ - #endif