summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Ribeiro <luizribeiro@gmail.com>2017-01-21 23:09:17 +0100
committerLuiz Ribeiro <luizribeiro@gmail.com>2017-01-21 23:18:05 +0100
commit9ce38cbccf073fccea6f7ee6492bf472a48852b8 (patch)
treec98d5fd54bd84b1c72338a72b06490270d8b50ac
parent461dfd44621ef31cabc08136d4714ca24ed651fa (diff)
downloadqmk_firmware-9ce38cbccf073fccea6f7ee6492bf472a48852b8.tar.gz
qmk_firmware-9ce38cbccf073fccea6f7ee6492bf472a48852b8.tar.xz
Simplified and polished a bit the code changes on tmk_core
-rw-r--r--keyboards/ps2avrGB/config.h2
-rw-r--r--tmk_core/common/avr/bootloader.c6
-rw-r--r--tmk_core/common/avr/suspend.c2
-rw-r--r--tmk_core/common/command.c1
-rw-r--r--tmk_core/protocol/vusb.mk4
5 files changed, 8 insertions, 7 deletions
diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h
index dfaea5979..f0bef2464 100644
--- a/keyboards/ps2avrGB/config.h
+++ b/keyboards/ps2avrGB/config.h
@@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_COLOR 0x110000
#define NO_UART 1
-#define EEPROM_BOOTLOADER_START 1
+#define BOOTLOADHID_BOOTLOADER 1
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c
index 98a24d178..34db8d0b0 100644
--- a/tmk_core/common/avr/bootloader.c
+++ b/tmk_core/common/avr/bootloader.c
@@ -90,8 +90,10 @@ void bootloader_jump(void) {
_delay_ms(5);
#endif
- #ifdef EEPROM_BOOTLOADER_START
- eeprom_write_byte((uint8_t *)EEPROM_BOOTLOADER_START, 0x00);
+ #ifdef BOOTLOADHID_BOOTLOADER
+ // force bootloadHID to stay in bootloader mode, so that it waits
+ // for a new firmware to be flashed
+ eeprom_write_byte((uint8_t *)1, 0x00);
#endif
// watchdog reset
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c
index 0e97892d9..0c81e8361 100644
--- a/tmk_core/common/avr/suspend.c
+++ b/tmk_core/common/avr/suspend.c
@@ -65,7 +65,6 @@ static uint8_t wdt_timeout = 0;
static void power_down(uint8_t wdto)
{
-#ifndef __AVR_ATmega32A__
#ifdef PROTOCOL_LUFA
if (USB_DeviceState == DEVICE_STATE_Configured) return;
#endif
@@ -100,7 +99,6 @@ static void power_down(uint8_t wdto)
// Disable watchdog after sleep
wdt_disable();
-#endif
}
#endif
diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c
index beba768ec..f79d5a257 100644
--- a/tmk_core/common/command.c
+++ b/tmk_core/common/command.c
@@ -236,6 +236,7 @@ static void print_status(void)
print_val_hex8(host_keyboard_leds());
#ifndef PROTOCOL_VUSB
+ // these aren't set on the V-USB protocol, so we just ignore them for now
print_val_hex8(keyboard_protocol);
print_val_hex8(keyboard_idle);
#endif
diff --git a/tmk_core/protocol/vusb.mk b/tmk_core/protocol/vusb.mk
index 4d90510af..897b833e1 100644
--- a/tmk_core/protocol/vusb.mk
+++ b/tmk_core/protocol/vusb.mk
@@ -2,7 +2,7 @@ VUSB_DIR = protocol/vusb
OPT_DEFS += -DPROTOCOL_VUSB
-SRC += $(VUSB_DIR)/main.c \
+SRC += $(VUSB_DIR)/main.c \
$(VUSB_DIR)/vusb.c \
$(VUSB_DIR)/usbdrv/usbdrv.c \
$(VUSB_DIR)/usbdrv/usbdrvasm.S \
@@ -16,7 +16,7 @@ SRC += $(COMMON_DIR)/sendchar_uart.c \
$(COMMON_DIR)/uart.c
endif
+
# Search Path
-#VPATH += $(TMK_PATH)/$(VUSB_DIR)
VPATH += $(TMK_PATH)/$(VUSB_DIR)
VPATH += $(TMK_PATH)/$(VUSB_DIR)/usbdrv