Add new build options on m0110_usb
This commit is contained in:
parent
2372029de5
commit
2b33ecad57
@ -32,13 +32,23 @@ MCU = atmega32u4 # Teensy 2.0
|
|||||||
F_CPU = 16000000
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in bytes
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# *Comment out* to disable the options.
|
# *Comment out* to disable the options.
|
||||||
#
|
#
|
||||||
#MOUSEKEY_ENABLE = yes # Mouse keys
|
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||||
#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
#EXTRAKEY_ENABLE = yes # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
#NKRO_ENABLE = yes # USB Nkey Rollover
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
|
#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,16 +55,6 @@ F_USB = $(F_CPU)
|
|||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
|
||||||
# *Comment out* to disable the options.
|
|
||||||
#
|
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
|
||||||
#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support
|
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
|
||||||
CONSOLE_ENABLE = yes # Console for debug
|
|
||||||
#NKRO_ENABLE = yes # USB Nkey Rollover
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in bytes
|
# Boot Section Size in bytes
|
||||||
# Teensy halfKay 512
|
# Teensy halfKay 512
|
||||||
# Atmel DFU loader 4096
|
# Atmel DFU loader 4096
|
||||||
@ -72,6 +62,18 @@ CONSOLE_ENABLE = yes # Console for debug
|
|||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
|
#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#---------------- Programming Options --------------------------
|
#---------------- Programming Options --------------------------
|
||||||
PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex
|
PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex
|
||||||
@ -86,6 +88,3 @@ include $(TOP_DIR)/protocol/lufa.mk
|
|||||||
include $(TOP_DIR)/protocol.mk
|
include $(TOP_DIR)/protocol.mk
|
||||||
include $(TOP_DIR)/common.mk
|
include $(TOP_DIR)/common.mk
|
||||||
include $(TOP_DIR)/rules.mk
|
include $(TOP_DIR)/rules.mk
|
||||||
|
|
||||||
hasu: EXTRAFLAGS += -DHASU
|
|
||||||
hasu: all
|
|
||||||
|
@ -34,8 +34,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROWS 14
|
#define MATRIX_ROWS 14
|
||||||
#define MATRIX_COLS 8
|
#define MATRIX_COLS 8
|
||||||
|
|
||||||
/* Locking Caps Lock support */
|
|
||||||
//#define MATRIX_HAS_LOCKING_CAPS
|
/* legacy keymap support */
|
||||||
|
#define USE_LEGACY_KEYMAP
|
||||||
|
|
||||||
|
|
||||||
|
/* Mechanical locking CapsLock support. Use KC_LCAP instead of KC_CAPS in keymap */
|
||||||
|
#define CAPSLOCK_LOCKING_ENABLE
|
||||||
|
/* Locking CapsLock resynchronize hack */
|
||||||
|
#define CAPSLOCK_LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
|
||||||
/* magic key */
|
/* magic key */
|
||||||
#define IS_COMMAND() ( \
|
#define IS_COMMAND() ( \
|
||||||
@ -44,12 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
/* mouse keys */
|
|
||||||
#ifdef MOUSEKEY_ENABLE
|
|
||||||
# define MOUSEKEY_DELAY_TIME 192
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* ports */
|
/* ports */
|
||||||
#define M0110_CLOCK_PORT PORTF
|
#define M0110_CLOCK_PORT PORTF
|
||||||
#define M0110_CLOCK_PIN PINF
|
#define M0110_CLOCK_PIN PINF
|
||||||
|
@ -74,31 +74,11 @@ uint8_t matrix_scan(void)
|
|||||||
is_modified = false;
|
is_modified = false;
|
||||||
key = m0110_recv_key();
|
key = m0110_recv_key();
|
||||||
|
|
||||||
#ifdef MATRIX_HAS_LOCKING_CAPS
|
|
||||||
// Send Caps key up event
|
|
||||||
if (matrix_is_on(ROW(CAPS), COL(CAPS))) {
|
|
||||||
is_modified = true;
|
|
||||||
register_key(CAPS_BREAK);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (key == M0110_NULL) {
|
if (key == M0110_NULL) {
|
||||||
return 0;
|
return 0;
|
||||||
} else if (key == M0110_ERROR) {
|
} else if (key == M0110_ERROR) {
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
#ifdef MATRIX_HAS_LOCKING_CAPS
|
|
||||||
if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) {
|
|
||||||
// CAPS LOCK on:
|
|
||||||
// Ignore LockingCaps key down event
|
|
||||||
if (key == CAPS) return 0;
|
|
||||||
// Convert LockingCaps key up event into down event
|
|
||||||
if (key == CAPS_BREAK) key = CAPS;
|
|
||||||
} else {
|
|
||||||
// CAPS LOCK off:
|
|
||||||
// Ignore LockingCaps key up event
|
|
||||||
if (key == CAPS_BREAK) return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
is_modified = true;
|
is_modified = true;
|
||||||
register_key(key);
|
register_key(key);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user