]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
ChibiOS: Update infinity bootloader code to match updated ChibiOS.
authorflabbergast <s3+flabbergast@sdfeu.org>
Sun, 18 Oct 2015 10:55:39 +0000 (11:55 +0100)
committerflabbergast <s3+flabbergast@sdfeu.org>
Sun, 18 Oct 2015 10:55:39 +0000 (11:55 +0100)
tmk_core/common/chibios/bootloader.c

index d19aab89a56701acfac6cccb5fa9e79d0e449ce3..c8888f3cda87410461735749a3361daea45c39f4 100644 (file)
@@ -26,10 +26,9 @@ void bootloader_jump(void) {
 #if defined(KIIBOHD_BOOTLOADER)
 /* Kiibohd Bootloader (MCHCK and Infinity KB) */
 #define SCB_AIRCR_VECTKEY_WRITEMAGIC 0x05FA0000
-#define VBAT        (*(volatile uint8_t  *)0x4003E000) // VBAT register file (32 bytes)
 const uint8_t sys_reset_to_loader_magic[] = "\xff\x00\x7fRESET TO LOADER\x7f\x00\xff";
 void bootloader_jump(void) {
-  __builtin_memcpy((void *)&VBAT, (const void *)sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic));
+  __builtin_memcpy((void *)VBAT, (const void *)sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic));
   // request reset
   SCB->AIRCR = SCB_AIRCR_VECTKEY_WRITEMAGIC | SCB_AIRCR_SYSRESETREQ_Msk;
 }