Simplified and polished a bit the code changes on tmk_core
This commit is contained in:
parent
461dfd4462
commit
9ce38cbccf
5 changed files with 8 additions and 7 deletions
|
@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#define BACKLIGHT_COLOR 0x110000
|
#define BACKLIGHT_COLOR 0x110000
|
||||||
|
|
||||||
#define NO_UART 1
|
#define NO_UART 1
|
||||||
#define EEPROM_BOOTLOADER_START 1
|
#define BOOTLOADHID_BOOTLOADER 1
|
||||||
|
|
||||||
/* key combination for command */
|
/* key combination for command */
|
||||||
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
||||||
|
|
|
@ -90,8 +90,10 @@ void bootloader_jump(void) {
|
||||||
_delay_ms(5);
|
_delay_ms(5);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EEPROM_BOOTLOADER_START
|
#ifdef BOOTLOADHID_BOOTLOADER
|
||||||
eeprom_write_byte((uint8_t *)EEPROM_BOOTLOADER_START, 0x00);
|
// 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
|
#endif
|
||||||
|
|
||||||
// watchdog reset
|
// watchdog reset
|
||||||
|
|
|
@ -65,7 +65,6 @@ static uint8_t wdt_timeout = 0;
|
||||||
|
|
||||||
static void power_down(uint8_t wdto)
|
static void power_down(uint8_t wdto)
|
||||||
{
|
{
|
||||||
#ifndef __AVR_ATmega32A__
|
|
||||||
#ifdef PROTOCOL_LUFA
|
#ifdef PROTOCOL_LUFA
|
||||||
if (USB_DeviceState == DEVICE_STATE_Configured) return;
|
if (USB_DeviceState == DEVICE_STATE_Configured) return;
|
||||||
#endif
|
#endif
|
||||||
|
@ -100,7 +99,6 @@ static void power_down(uint8_t wdto)
|
||||||
|
|
||||||
// Disable watchdog after sleep
|
// Disable watchdog after sleep
|
||||||
wdt_disable();
|
wdt_disable();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -236,6 +236,7 @@ static void print_status(void)
|
||||||
|
|
||||||
print_val_hex8(host_keyboard_leds());
|
print_val_hex8(host_keyboard_leds());
|
||||||
#ifndef PROTOCOL_VUSB
|
#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_protocol);
|
||||||
print_val_hex8(keyboard_idle);
|
print_val_hex8(keyboard_idle);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,7 +2,7 @@ VUSB_DIR = protocol/vusb
|
||||||
|
|
||||||
OPT_DEFS += -DPROTOCOL_VUSB
|
OPT_DEFS += -DPROTOCOL_VUSB
|
||||||
|
|
||||||
SRC += $(VUSB_DIR)/main.c \
|
SRC += $(VUSB_DIR)/main.c \
|
||||||
$(VUSB_DIR)/vusb.c \
|
$(VUSB_DIR)/vusb.c \
|
||||||
$(VUSB_DIR)/usbdrv/usbdrv.c \
|
$(VUSB_DIR)/usbdrv/usbdrv.c \
|
||||||
$(VUSB_DIR)/usbdrv/usbdrvasm.S \
|
$(VUSB_DIR)/usbdrv/usbdrvasm.S \
|
||||||
|
@ -16,7 +16,7 @@ SRC += $(COMMON_DIR)/sendchar_uart.c \
|
||||||
$(COMMON_DIR)/uart.c
|
$(COMMON_DIR)/uart.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
# Search Path
|
# Search Path
|
||||||
#VPATH += $(TMK_PATH)/$(VUSB_DIR)
|
|
||||||
VPATH += $(TMK_PATH)/$(VUSB_DIR)
|
VPATH += $(TMK_PATH)/$(VUSB_DIR)
|
||||||
VPATH += $(TMK_PATH)/$(VUSB_DIR)/usbdrv
|
VPATH += $(TMK_PATH)/$(VUSB_DIR)/usbdrv
|
||||||
|
|
Loading…
Reference in a new issue