$(COMMON_DIR)/print.c \ | $(COMMON_DIR)/print.c \ | ||||
$(COMMON_DIR)/debug.c \ | $(COMMON_DIR)/debug.c \ | ||||
$(COMMON_DIR)/bootloader.c \ | $(COMMON_DIR)/bootloader.c \ | ||||
$(COMMON_DIR)/bootmagic.c \ | |||||
$(COMMON_DIR)/eeconfig.c \ | |||||
$(COMMON_DIR)/util.c | $(COMMON_DIR)/util.c | ||||
# Option modules | # Option modules | ||||
ifdef BOOTMAGIC_ENABLE | |||||
SRC += $(COMMON_DIR)/bootmagic.c | |||||
SRC += $(COMMON_DIR)/eeconfig.c | |||||
OPT_DEFS += -DBOOTMAGIC_ENABLE | |||||
endif | |||||
ifdef MOUSEKEY_ENABLE | ifdef MOUSEKEY_ENABLE | ||||
SRC += $(COMMON_DIR)/mousekey.c | SRC += $(COMMON_DIR)/mousekey.c | ||||
OPT_DEFS += -DMOUSEKEY_ENABLE | OPT_DEFS += -DMOUSEKEY_ENABLE |
print("Paus: jump to bootloader\n"); | print("Paus: jump to bootloader\n"); | ||||
} | } | ||||
#ifdef BOOTMAGIC_ENABLE | |||||
static void print_eeprom_config(void) | static void print_eeprom_config(void) | ||||
{ | { | ||||
uint8_t eebyte; | uint8_t eebyte; | ||||
print("keyconf.swap_grave_esc: "); print_hex8(kc.swap_grave_esc); print("\n"); | print("keyconf.swap_grave_esc: "); print_hex8(kc.swap_grave_esc); print("\n"); | ||||
print("keyconf.swap_backslash_backspace: "); print_hex8(kc.swap_backslash_backspace); print("\n"); | print("keyconf.swap_backslash_backspace: "); print_hex8(kc.swap_backslash_backspace); print("\n"); | ||||
} | } | ||||
#endif | |||||
static bool command_common(uint8_t code) | static bool command_common(uint8_t code) | ||||
{ | { | ||||
static host_driver_t *host_driver = 0; | static host_driver_t *host_driver = 0; | ||||
switch (code) { | switch (code) { | ||||
#ifdef BOOTMAGIC_ENABLE | |||||
case KC_E: | case KC_E: | ||||
print("eeprom config\n"); | print("eeprom config\n"); | ||||
print_eeprom_config(); | print_eeprom_config(); | ||||
break; | break; | ||||
#endif | |||||
case KC_CAPSLOCK: | case KC_CAPSLOCK: | ||||
if (host_get_driver()) { | if (host_get_driver()) { | ||||
host_driver = host_get_driver(); | host_driver = host_get_driver(); |
#include "util.h" | #include "util.h" | ||||
#include "sendchar.h" | #include "sendchar.h" | ||||
#include "bootmagic.h" | #include "bootmagic.h" | ||||
#ifdef MOUSEKEY_ENABLE | |||||
#include "mousekey.h" | |||||
#endif | |||||
#include "eeconfig.h" | #include "eeconfig.h" | ||||
#include "mousekey.h" | |||||
#ifdef MATRIX_HAS_GHOST | #ifdef MATRIX_HAS_GHOST | ||||
ps2_mouse_init(); | ps2_mouse_init(); | ||||
#endif | #endif | ||||
#ifdef BOOTMAGIC_ENABLE | |||||
bootmagic(); | bootmagic(); | ||||
if (eeconfig_is_enabled()) { | if (eeconfig_is_enabled()) { | ||||
} else { | } else { | ||||
eeconfig_init(); | eeconfig_init(); | ||||
} | } | ||||
#endif | |||||
} | } | ||||
/* | /* |
# Directory keyboard dependent files exist | # Directory keyboard dependent files exist | ||||
TARGET_DIR = . | TARGET_DIR = . | ||||
# List C source files here. (C dependencies are automatically generated.) | |||||
# project specific files | |||||
SRC += keymap.c \ | SRC += keymap.c \ | ||||
matrix.c \ | matrix.c \ | ||||
led.c | led.c | ||||
# Build Options | # Build Options | ||||
# comment out to disable the options. | # comment out to disable the options. | ||||
# | # | ||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) | |||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||||
CONSOLE_ENABLE = yes # Console for debug(+400) | CONSOLE_ENABLE = yes # Console for debug(+400) |
# Directory keyboard dependent files exist | # Directory keyboard dependent files exist | ||||
TARGET_DIR = . | TARGET_DIR = . | ||||
# keyboard dependent files | |||||
# project specific files | |||||
SRC = keymap.c \ | SRC = keymap.c \ | ||||
matrix.c \ | matrix.c \ | ||||
led.c | led.c | ||||
# MCU name, you MUST set this to match the board you are using | # MCU name, you MUST set this to match the board you are using | ||||
# type "make clean" after changing this, so all files will be rebuilt | # type "make clean" after changing this, so all files will be rebuilt | ||||
#MCU = at90usb162 # Teensy 1.0 | |||||
MCU = atmega32u4 # Teensy 2.0 | |||||
#MCU = at90usb646 # Teensy++ 1.0 | |||||
#MCU = at90usb1286 # Teensy++ 2.0 | |||||
MCU = atmega32u4 | |||||
#MCU = at90usb1286 | |||||
# Processor frequency. | # Processor frequency. | ||||
# Build Options | # Build Options | ||||
# comment out to disable the options. | # comment out to disable the options. | ||||
# | # | ||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) | |||||
MOUSEKEY_ENABLE = yes # Mouse keys(+5000) | MOUSEKEY_ENABLE = yes # Mouse keys(+5000) | ||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+600) | EXTRAKEY_ENABLE = yes # Audio control and System control(+600) | ||||
NKRO_ENABLE = yes # USB Nkey Rollover(+500) | NKRO_ENABLE = yes # USB Nkey Rollover(+500) |