diff options
| -rw-r--r-- | common.mk | 8 | ||||
| -rw-r--r-- | common/command.c | 4 | ||||
| -rw-r--r-- | common/keyboard.c | 6 | ||||
| -rw-r--r-- | keyboard/gh60/Makefile.lufa | 4 | ||||
| -rw-r--r-- | keyboard/gh60/Makefile.pjrc | 9 |
5 files changed, 19 insertions, 12 deletions
| @@ -10,12 +10,16 @@ SRC += $(COMMON_DIR)/host.c \ | |||
| 10 | $(COMMON_DIR)/print.c \ | 10 | $(COMMON_DIR)/print.c \ |
| 11 | $(COMMON_DIR)/debug.c \ | 11 | $(COMMON_DIR)/debug.c \ |
| 12 | $(COMMON_DIR)/bootloader.c \ | 12 | $(COMMON_DIR)/bootloader.c \ |
| 13 | $(COMMON_DIR)/bootmagic.c \ | ||
| 14 | $(COMMON_DIR)/eeconfig.c \ | ||
| 15 | $(COMMON_DIR)/util.c | 13 | $(COMMON_DIR)/util.c |
| 16 | 14 | ||
| 17 | 15 | ||
| 18 | # Option modules | 16 | # Option modules |
| 17 | ifdef BOOTMAGIC_ENABLE | ||
| 18 | SRC += $(COMMON_DIR)/bootmagic.c | ||
| 19 | SRC += $(COMMON_DIR)/eeconfig.c | ||
| 20 | OPT_DEFS += -DBOOTMAGIC_ENABLE | ||
| 21 | endif | ||
| 22 | |||
| 19 | ifdef MOUSEKEY_ENABLE | 23 | ifdef MOUSEKEY_ENABLE |
| 20 | SRC += $(COMMON_DIR)/mousekey.c | 24 | SRC += $(COMMON_DIR)/mousekey.c |
| 21 | OPT_DEFS += -DMOUSEKEY_ENABLE | 25 | OPT_DEFS += -DMOUSEKEY_ENABLE |
diff --git a/common/command.c b/common/command.c index d7ba3f232..372ca291e 100644 --- a/common/command.c +++ b/common/command.c | |||
| @@ -123,6 +123,7 @@ static void command_common_help(void) | |||
| 123 | print("Paus: jump to bootloader\n"); | 123 | print("Paus: jump to bootloader\n"); |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | #ifdef BOOTMAGIC_ENABLE | ||
| 126 | static void print_eeprom_config(void) | 127 | static void print_eeprom_config(void) |
| 127 | { | 128 | { |
| 128 | uint8_t eebyte; | 129 | uint8_t eebyte; |
| @@ -145,15 +146,18 @@ static void print_eeprom_config(void) | |||
| 145 | print("keyconf.swap_grave_esc: "); print_hex8(kc.swap_grave_esc); print("\n"); | 146 | print("keyconf.swap_grave_esc: "); print_hex8(kc.swap_grave_esc); print("\n"); |
| 146 | print("keyconf.swap_backslash_backspace: "); print_hex8(kc.swap_backslash_backspace); print("\n"); | 147 | print("keyconf.swap_backslash_backspace: "); print_hex8(kc.swap_backslash_backspace); print("\n"); |
| 147 | } | 148 | } |
| 149 | #endif | ||
| 148 | 150 | ||
| 149 | static bool command_common(uint8_t code) | 151 | static bool command_common(uint8_t code) |
| 150 | { | 152 | { |
| 151 | static host_driver_t *host_driver = 0; | 153 | static host_driver_t *host_driver = 0; |
| 152 | switch (code) { | 154 | switch (code) { |
| 155 | #ifdef BOOTMAGIC_ENABLE | ||
| 153 | case KC_E: | 156 | case KC_E: |
| 154 | print("eeprom config\n"); | 157 | print("eeprom config\n"); |
| 155 | print_eeprom_config(); | 158 | print_eeprom_config(); |
| 156 | break; | 159 | break; |
| 160 | #endif | ||
| 157 | case KC_CAPSLOCK: | 161 | case KC_CAPSLOCK: |
| 158 | if (host_get_driver()) { | 162 | if (host_get_driver()) { |
| 159 | host_driver = host_get_driver(); | 163 | host_driver = host_get_driver(); |
diff --git a/common/keyboard.c b/common/keyboard.c index 1acb79861..401fdb4e1 100644 --- a/common/keyboard.c +++ b/common/keyboard.c | |||
| @@ -29,10 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 29 | #include "util.h" | 29 | #include "util.h" |
| 30 | #include "sendchar.h" | 30 | #include "sendchar.h" |
| 31 | #include "bootmagic.h" | 31 | #include "bootmagic.h" |
| 32 | #ifdef MOUSEKEY_ENABLE | ||
| 33 | #include "mousekey.h" | ||
| 34 | #endif | ||
| 35 | #include "eeconfig.h" | 32 | #include "eeconfig.h" |
| 33 | #include "mousekey.h" | ||
| 36 | 34 | ||
| 37 | 35 | ||
| 38 | #ifdef MATRIX_HAS_GHOST | 36 | #ifdef MATRIX_HAS_GHOST |
| @@ -64,6 +62,7 @@ void keyboard_init(void) | |||
| 64 | ps2_mouse_init(); | 62 | ps2_mouse_init(); |
| 65 | #endif | 63 | #endif |
| 66 | 64 | ||
| 65 | #ifdef BOOTMAGIC_ENABLE | ||
| 67 | bootmagic(); | 66 | bootmagic(); |
| 68 | 67 | ||
| 69 | if (eeconfig_is_enabled()) { | 68 | if (eeconfig_is_enabled()) { |
| @@ -77,6 +76,7 @@ void keyboard_init(void) | |||
| 77 | } else { | 76 | } else { |
| 78 | eeconfig_init(); | 77 | eeconfig_init(); |
| 79 | } | 78 | } |
| 79 | #endif | ||
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | /* | 82 | /* |
diff --git a/keyboard/gh60/Makefile.lufa b/keyboard/gh60/Makefile.lufa index b885b7dfa..a5ff609a7 100644 --- a/keyboard/gh60/Makefile.lufa +++ b/keyboard/gh60/Makefile.lufa | |||
| @@ -47,8 +47,7 @@ TOP_DIR = ../.. | |||
| 47 | # Directory keyboard dependent files exist | 47 | # Directory keyboard dependent files exist |
| 48 | TARGET_DIR = . | 48 | TARGET_DIR = . |
| 49 | 49 | ||
| 50 | 50 | # project specific files | |
| 51 | # List C source files here. (C dependencies are automatically generated.) | ||
| 52 | SRC += keymap.c \ | 51 | SRC += keymap.c \ |
| 53 | matrix.c \ | 52 | matrix.c \ |
| 54 | led.c | 53 | led.c |
| @@ -100,6 +99,7 @@ F_USB = $(F_CPU) | |||
| 100 | # Build Options | 99 | # Build Options |
| 101 | # comment out to disable the options. | 100 | # comment out to disable the options. |
| 102 | # | 101 | # |
| 102 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) | ||
| 103 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | 103 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) |
| 104 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 104 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
| 105 | CONSOLE_ENABLE = yes # Console for debug(+400) | 105 | CONSOLE_ENABLE = yes # Console for debug(+400) |
diff --git a/keyboard/gh60/Makefile.pjrc b/keyboard/gh60/Makefile.pjrc index 2538c0c6b..f03ca9416 100644 --- a/keyboard/gh60/Makefile.pjrc +++ b/keyboard/gh60/Makefile.pjrc | |||
| @@ -47,7 +47,7 @@ TOP_DIR = ../.. | |||
| 47 | # Directory keyboard dependent files exist | 47 | # Directory keyboard dependent files exist |
| 48 | TARGET_DIR = . | 48 | TARGET_DIR = . |
| 49 | 49 | ||
| 50 | # keyboard dependent files | 50 | # project specific files |
| 51 | SRC = keymap.c \ | 51 | SRC = keymap.c \ |
| 52 | matrix.c \ | 52 | matrix.c \ |
| 53 | led.c | 53 | led.c |
| @@ -57,10 +57,8 @@ CONFIG_H = config.h | |||
| 57 | 57 | ||
| 58 | # MCU name, you MUST set this to match the board you are using | 58 | # MCU name, you MUST set this to match the board you are using |
| 59 | # type "make clean" after changing this, so all files will be rebuilt | 59 | # type "make clean" after changing this, so all files will be rebuilt |
| 60 | #MCU = at90usb162 # Teensy 1.0 | 60 | MCU = atmega32u4 |
| 61 | MCU = atmega32u4 # Teensy 2.0 | 61 | #MCU = at90usb1286 |
| 62 | #MCU = at90usb646 # Teensy++ 1.0 | ||
| 63 | #MCU = at90usb1286 # Teensy++ 2.0 | ||
| 64 | 62 | ||
| 65 | 63 | ||
| 66 | # Processor frequency. | 64 | # Processor frequency. |
| @@ -79,6 +77,7 @@ OPT_DEFS += -DBOOT_SIZE=4096 | |||
| 79 | # Build Options | 77 | # Build Options |
| 80 | # comment out to disable the options. | 78 | # comment out to disable the options. |
| 81 | # | 79 | # |
| 80 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) | ||
| 82 | MOUSEKEY_ENABLE = yes # Mouse keys(+5000) | 81 | MOUSEKEY_ENABLE = yes # Mouse keys(+5000) |
| 83 | EXTRAKEY_ENABLE = yes # Audio control and System control(+600) | 82 | EXTRAKEY_ENABLE = yes # Audio control and System control(+600) |
| 84 | NKRO_ENABLE = yes # USB Nkey Rollover(+500) | 83 | NKRO_ENABLE = yes # USB Nkey Rollover(+500) |
