From 342591ee32efc1513c468de75a382979b6cac991 Mon Sep 17 00:00:00 2001 From: Kai Ryu Date: Thu, 2 Oct 2014 13:42:33 +0900 Subject: [PATCH] Add a trick to jump to bootloader --- keyboard/tentapad/led.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/keyboard/tentapad/led.c b/keyboard/tentapad/led.c index 63d2732a..1f743c5c 100644 --- a/keyboard/tentapad/led.c +++ b/keyboard/tentapad/led.c @@ -17,11 +17,25 @@ along with this program. If not, see . #include #include "stdint.h" +#include "bootloader.h" +#include "timer.h" #include "led.h" #ifndef LEDMAP_ENABLE void led_set(uint8_t usb_led) { + static uint16_t start = 0; + static uint8_t count = 0; + if (usb_led & (1< 250) { + start = timer_read(); + count = 0; + } + count++; + if (count >= 8) { + bootloader_jump(); + } + } } #endif