Skip to content

Commit 240745d

Browse files
committed
update bootloader
1 parent 0cc83e4 commit 240745d

File tree

3 files changed

+4
-24
lines changed

3 files changed

+4
-24
lines changed

keyboards/annepro2/annepro2.c

-24
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
#include "ap2_led.h"
2222
#include "protocol.h"
2323

24-
#define RAM_MAGIC_LOCATION 0x20001ffc
25-
#define IAP_MAGIC_VALUE 0x0000fab2
26-
2724
static const SerialConfig ledUartInitConfig = {
2825
.speed = 115200,
2926
};
@@ -44,27 +41,6 @@ static uint8_t ledMcuWakeup[11] = {0x7b, 0x10, 0x43, 0x10, 0x03, 0x00, 0x00, 0x7
4441

4542
ble_capslock_t BLECapsLock = {._dummy = {0}, .caps_lock = false};
4643

47-
void bootloader_jump(void) {
48-
// Send msg to shine to boot into IAP
49-
annepro2SetIAP();
50-
51-
// wait for shine to boot into IAP
52-
wait_ms(15);
53-
54-
// Load ble into IAP
55-
annepro2_ble_bootload();
56-
wait_ms(15);
57-
58-
// Magic key to set keyboard to IAP
59-
// It’s from reversing original boot loader
60-
// If value is that it stays in boot loader aka IAP
61-
*((uint32_t *)RAM_MAGIC_LOCATION) = IAP_MAGIC_VALUE;
62-
63-
// Load the main MCU into IAP
64-
__disable_irq();
65-
NVIC_SystemReset();
66-
}
67-
6844
void keyboard_pre_init_kb(void) {
6945
// Start LED UART
7046
sdStart(&SD0, &ledUartInitConfig);

keyboards/annepro2/c15/rules.mk

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ MCU_STARTUP = ht32f523xx
1616

1717
BOARD = ANNEPRO2_C15
1818

19+
BOOTLOADER=annepro2
20+
1921
# Options
2022

2123
# Keys

keyboards/annepro2/c18/rules.mk

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ MCU_STARTUP = ht32f523xx
1616

1717
BOARD = ANNEPRO2_C18
1818

19+
BOOTLOADER=annepro2
20+
1921
# Options
2022

2123
# Keys

0 commit comments

Comments
 (0)