From 78bd57f464411cff106c569e0e51164974ef8ba9 Mon Sep 17 00:00:00 2001 From: bwisn Date: Sat, 13 Nov 2021 17:30:45 +0100 Subject: [PATCH] update IAP comments, defines --- keyboards/annepro2/annepro2.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/keyboards/annepro2/annepro2.c b/keyboards/annepro2/annepro2.c index 4545a839ddf..74bb2edcf76 100644 --- a/keyboards/annepro2/annepro2.c +++ b/keyboards/annepro2/annepro2.c @@ -21,8 +21,8 @@ #include "ap2_led.h" #include "protocol.h" -#define MSP_STACK_POINTER 0x20001ffc -#define IAP_MODE 0x0000fab2 +#define RAM_MAGIC_LOCATION 0x20001ffc +#define IAP_MAGIC_VALUE 0x0000fab2 static const SerialConfig ledUartInitConfig = { .speed = 115200, @@ -64,7 +64,9 @@ void bootloader_jump(void) { wait_ms(15); // Magic key to set keyboard to IAP - *((uint32_t *)MSP_STACK_POINTER) = IAP_MODE; + // It’s from reversing original boot loader + // If value is that it stays in boot loader aka IAP + *((uint32_t *)RAM_MAGIC_LOCATION) = IAP_MAGIC_VALUE; // Load the main MCU into IAP __disable_irq();