diff --git a/Add-Sleep-Mode.md b/Add-Sleep-Mode.md index dcf316a..6c87d17 100644 --- a/Add-Sleep-Mode.md +++ b/Add-Sleep-Mode.md @@ -37,7 +37,7 @@ static void ReadKeys(void) + IeBak = REG_IE; // IE save + REG_IE = INTR_FLAG_KEYPAD; // Enable Key interrupt + REG_IME = 1; -+ asm("swi 0X03"); // This is the Stop command ++ asm("swi #3" : : : "r2", "r12", "memory"); // This is the Stop command; + REG_IME = 0; + REG_IE = IeBak; // IE return + REG_IME = 1;