aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-04-12 21:52:34 +0900
committertmk <nobody@nowhere>2013-04-12 22:49:16 +0900
commit2b33ecad57f80d9235665ecfbe477c098494468b (patch)
tree3d47bf4dd1bc7e326eb2bc1775b80c6a7c11244e
parent2372029de5f595f496bd6cd803f9b0a1bb5bd5ee (diff)
downloadqmk_firmware-2b33ecad57f80d9235665ecfbe477c098494468b.tar.gz
qmk_firmware-2b33ecad57f80d9235665ecfbe477c098494468b.zip
Add new build options on m0110_usb
-rw-r--r--converter/m0110_usb/Makefile18
-rw-r--r--converter/m0110_usb/Makefile.lufa25
-rw-r--r--converter/m0110_usb/config.h18
-rw-r--r--converter/m0110_usb/matrix.c20
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
32F_CPU = 16000000 32F_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
39OPT_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 46MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
40#EXTRAKEY_ENABLE = yes # Audio control and System control 47EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
41#NKRO_ENABLE = yes # USB Nkey Rollover 48CONSOLE_ENABLE = yes # Console for debug(+400)
49COMMAND_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)
55OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT 55OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
56 56
57 57
58# Build Options
59# *Comment out* to disable the options.
60#
61MOUSEKEY_ENABLE = yes # Mouse keys
62#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support
63EXTRAKEY_ENABLE = yes # Audio control and System control
64CONSOLE_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
72OPT_DEFS += -DBOOTLOADER_SIZE=4096 62OPT_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)
69MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
70EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
71CONSOLE_ENABLE = yes # Console for debug(+400)
72COMMAND_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 --------------------------
77PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex 79PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex
@@ -86,6 +88,3 @@ include $(TOP_DIR)/protocol/lufa.mk
86include $(TOP_DIR)/protocol.mk 88include $(TOP_DIR)/protocol.mk
87include $(TOP_DIR)/common.mk 89include $(TOP_DIR)/common.mk
88include $(TOP_DIR)/rules.mk 90include $(TOP_DIR)/rules.mk
89
90hasu: EXTRAFLAGS += -DHASU
91hasu: 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 }