mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-22 03:19:24 +00:00
update bootloader
This commit is contained in:
parent
0cc83e4886
commit
240745dc05
@ -21,9 +21,6 @@
|
||||
#include "ap2_led.h"
|
||||
#include "protocol.h"
|
||||
|
||||
#define RAM_MAGIC_LOCATION 0x20001ffc
|
||||
#define IAP_MAGIC_VALUE 0x0000fab2
|
||||
|
||||
static const SerialConfig ledUartInitConfig = {
|
||||
.speed = 115200,
|
||||
};
|
||||
@ -44,27 +41,6 @@ static uint8_t ledMcuWakeup[11] = {0x7b, 0x10, 0x43, 0x10, 0x03, 0x00, 0x00, 0x7
|
||||
|
||||
ble_capslock_t BLECapsLock = {._dummy = {0}, .caps_lock = false};
|
||||
|
||||
void bootloader_jump(void) {
|
||||
// Send msg to shine to boot into IAP
|
||||
annepro2SetIAP();
|
||||
|
||||
// wait for shine to boot into IAP
|
||||
wait_ms(15);
|
||||
|
||||
// Load ble into IAP
|
||||
annepro2_ble_bootload();
|
||||
wait_ms(15);
|
||||
|
||||
// Magic key to set keyboard to IAP
|
||||
// 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();
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
// Start LED UART
|
||||
sdStart(&SD0, &ledUartInitConfig);
|
||||
|
@ -16,6 +16,8 @@ MCU_STARTUP = ht32f523xx
|
||||
|
||||
BOARD = ANNEPRO2_C15
|
||||
|
||||
BOOTLOADER=annepro2
|
||||
|
||||
# Options
|
||||
|
||||
# Keys
|
||||
|
@ -16,6 +16,8 @@ MCU_STARTUP = ht32f523xx
|
||||
|
||||
BOARD = ANNEPRO2_C18
|
||||
|
||||
BOOTLOADER=annepro2
|
||||
|
||||
# Options
|
||||
|
||||
# Keys
|
||||
|
Loading…
Reference in New Issue
Block a user