diff options
| author | tmk <nobody@nowhere> | 2013-04-12 21:52:34 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2013-04-12 22:49:16 +0900 |
| commit | 2b33ecad57f80d9235665ecfbe477c098494468b (patch) | |
| tree | 3d47bf4dd1bc7e326eb2bc1775b80c6a7c11244e | |
| parent | 2372029de5f595f496bd6cd803f9b0a1bb5bd5ee (diff) | |
| download | qmk_firmware-2b33ecad57f80d9235665ecfbe477c098494468b.tar.gz qmk_firmware-2b33ecad57f80d9235665ecfbe477c098494468b.zip | |
Add new build options on m0110_usb
| -rw-r--r-- | converter/m0110_usb/Makefile | 18 | ||||
| -rw-r--r-- | converter/m0110_usb/Makefile.lufa | 25 | ||||
| -rw-r--r-- | converter/m0110_usb/config.h | 18 | ||||
| -rw-r--r-- | converter/m0110_usb/matrix.c | 20 |
4 files changed, 36 insertions, 45 deletions
diff --git a/converter/m0110_usb/Makefile b/converter/m0110_usb/Makefile index bf0f083f6..d98e68556 100644 --- a/converter/m0110_usb/Makefile +++ b/converter/m0110_usb/Makefile | |||
| @@ -32,13 +32,23 @@ MCU = atmega32u4 # Teensy 2.0 | |||
| 32 | F_CPU = 16000000 | 32 | F_CPU = 16000000 |
| 33 | 33 | ||
| 34 | 34 | ||
| 35 | # Boot Section Size in bytes | ||
| 36 | # Teensy halfKay 512 | ||
| 37 | # Atmel DFU loader 4096 | ||
| 38 | # LUFA bootloader 4096 | ||
| 39 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 40 | |||
| 41 | |||
| 35 | # Build Options | 42 | # Build Options |
| 36 | # *Comment out* to disable the options. | 43 | # *Comment out* to disable the options. |
| 37 | # | 44 | # |
| 38 | #MOUSEKEY_ENABLE = yes # Mouse keys | 45 | #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) |
| 39 | #PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support | 46 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) |
| 40 | #EXTRAKEY_ENABLE = yes # Audio control and System control | 47 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
| 41 | #NKRO_ENABLE = yes # USB Nkey Rollover | 48 | CONSOLE_ENABLE = yes # Console for debug(+400) |
| 49 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 50 | #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | ||
| 51 | #NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA | ||
| 42 | 52 | ||
| 43 | 53 | ||
| 44 | 54 | ||
diff --git a/converter/m0110_usb/Makefile.lufa b/converter/m0110_usb/Makefile.lufa index 8c12ca783..8266409c8 100644 --- a/converter/m0110_usb/Makefile.lufa +++ b/converter/m0110_usb/Makefile.lufa | |||
| @@ -55,16 +55,6 @@ F_USB = $(F_CPU) | |||
| 55 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | 55 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT |
| 56 | 56 | ||
| 57 | 57 | ||
| 58 | # Build Options | ||
| 59 | # *Comment out* to disable the options. | ||
| 60 | # | ||
| 61 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 62 | #PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support | ||
| 63 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 64 | CONSOLE_ENABLE = yes # Console for debug | ||
| 65 | #NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 66 | |||
| 67 | |||
| 68 | # Boot Section Size in bytes | 58 | # Boot Section Size in bytes |
| 69 | # Teensy halfKay 512 | 59 | # Teensy halfKay 512 |
| 70 | # Atmel DFU loader 4096 | 60 | # Atmel DFU loader 4096 |
| @@ -72,6 +62,18 @@ CONSOLE_ENABLE = yes # Console for debug | |||
| 72 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | 62 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 |
| 73 | 63 | ||
| 74 | 64 | ||
| 65 | # Build Options | ||
| 66 | # comment out to disable the options. | ||
| 67 | # | ||
| 68 | #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) | ||
| 69 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
| 70 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 71 | CONSOLE_ENABLE = yes # Console for debug(+400) | ||
| 72 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 73 | #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | ||
| 74 | #NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA | ||
| 75 | |||
| 76 | |||
| 75 | 77 | ||
| 76 | #---------------- Programming Options -------------------------- | 78 | #---------------- Programming Options -------------------------- |
| 77 | PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex | 79 | PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex |
| @@ -86,6 +88,3 @@ include $(TOP_DIR)/protocol/lufa.mk | |||
| 86 | include $(TOP_DIR)/protocol.mk | 88 | include $(TOP_DIR)/protocol.mk |
| 87 | include $(TOP_DIR)/common.mk | 89 | include $(TOP_DIR)/common.mk |
| 88 | include $(TOP_DIR)/rules.mk | 90 | include $(TOP_DIR)/rules.mk |
| 89 | |||
| 90 | hasu: EXTRAFLAGS += -DHASU | ||
| 91 | hasu: all | ||
diff --git a/converter/m0110_usb/config.h b/converter/m0110_usb/config.h index d43f28383..f7a4b9bc9 100644 --- a/converter/m0110_usb/config.h +++ b/converter/m0110_usb/config.h | |||
| @@ -34,8 +34,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 34 | #define MATRIX_ROWS 14 | 34 | #define MATRIX_ROWS 14 |
| 35 | #define MATRIX_COLS 8 | 35 | #define MATRIX_COLS 8 |
| 36 | 36 | ||
| 37 | /* Locking Caps Lock support */ | 37 | |
| 38 | //#define MATRIX_HAS_LOCKING_CAPS | 38 | /* legacy keymap support */ |
| 39 | #define USE_LEGACY_KEYMAP | ||
| 40 | |||
| 41 | |||
| 42 | /* Mechanical locking CapsLock support. Use KC_LCAP instead of KC_CAPS in keymap */ | ||
| 43 | #define CAPSLOCK_LOCKING_ENABLE | ||
| 44 | /* Locking CapsLock resynchronize hack */ | ||
| 45 | #define CAPSLOCK_LOCKING_RESYNC_ENABLE | ||
| 46 | |||
| 39 | 47 | ||
| 40 | /* magic key */ | 48 | /* magic key */ |
| 41 | #define IS_COMMAND() ( \ | 49 | #define IS_COMMAND() ( \ |
| @@ -44,12 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 44 | ) | 52 | ) |
| 45 | 53 | ||
| 46 | 54 | ||
| 47 | /* mouse keys */ | ||
| 48 | #ifdef MOUSEKEY_ENABLE | ||
| 49 | # define MOUSEKEY_DELAY_TIME 192 | ||
| 50 | #endif | ||
| 51 | |||
| 52 | |||
| 53 | /* ports */ | 55 | /* ports */ |
| 54 | #define M0110_CLOCK_PORT PORTF | 56 | #define M0110_CLOCK_PORT PORTF |
| 55 | #define M0110_CLOCK_PIN PINF | 57 | #define M0110_CLOCK_PIN PINF |
diff --git a/converter/m0110_usb/matrix.c b/converter/m0110_usb/matrix.c index c71a4874c..2189c0b56 100644 --- a/converter/m0110_usb/matrix.c +++ b/converter/m0110_usb/matrix.c | |||
| @@ -74,31 +74,11 @@ uint8_t matrix_scan(void) | |||
| 74 | is_modified = false; | 74 | is_modified = false; |
| 75 | key = m0110_recv_key(); | 75 | key = m0110_recv_key(); |
| 76 | 76 | ||
| 77 | #ifdef MATRIX_HAS_LOCKING_CAPS | ||
| 78 | // Send Caps key up event | ||
| 79 | if (matrix_is_on(ROW(CAPS), COL(CAPS))) { | ||
| 80 | is_modified = true; | ||
| 81 | register_key(CAPS_BREAK); | ||
| 82 | } | ||
| 83 | #endif | ||
| 84 | if (key == M0110_NULL) { | 77 | if (key == M0110_NULL) { |
| 85 | return 0; | 78 | return 0; |
| 86 | } else if (key == M0110_ERROR) { | 79 | } else if (key == M0110_ERROR) { |
| 87 | return 0; | 80 | return 0; |
| 88 | } else { | 81 | } else { |
| 89 | #ifdef MATRIX_HAS_LOCKING_CAPS | ||
| 90 | if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { | ||
| 91 | // CAPS LOCK on: | ||
| 92 | // Ignore LockingCaps key down event | ||
| 93 | if (key == CAPS) return 0; | ||
| 94 | // Convert LockingCaps key up event into down event | ||
| 95 | if (key == CAPS_BREAK) key = CAPS; | ||
| 96 | } else { | ||
| 97 | // CAPS LOCK off: | ||
| 98 | // Ignore LockingCaps key up event | ||
| 99 | if (key == CAPS_BREAK) return 0; | ||
| 100 | } | ||
| 101 | #endif | ||
| 102 | is_modified = true; | 82 | is_modified = true; |
| 103 | register_key(key); | 83 | register_key(key); |
| 104 | } | 84 | } |
