diff options
Diffstat (limited to 'converter/next_usb')
-rw-r--r-- | converter/next_usb/Makefile | 16 | ||||
-rw-r--r-- | converter/next_usb/Makefile.pjrc | 12 | ||||
-rw-r--r-- | converter/next_usb/config.h | 18 | ||||
-rw-r--r-- | converter/next_usb/keymap.c | 2 | ||||
-rw-r--r-- | converter/next_usb/led.c | 7 | ||||
-rw-r--r-- | converter/next_usb/matrix.c | 4 |
6 files changed, 34 insertions, 25 deletions
diff --git a/converter/next_usb/Makefile b/converter/next_usb/Makefile index fef539a147..7190f1eaf4 100644 --- a/converter/next_usb/Makefile +++ b/converter/next_usb/Makefile @@ -2,7 +2,7 @@ TARGET = next_usb # Directory common source filess exist -TOP_DIR = ../.. +TMK_DIR = ../../tmk_core # Directory keyboard dependent files exist TARGET_DIR = . @@ -17,10 +17,10 @@ CONFIG_H = config.h # 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 #MCU = at90usb162 # Teensy 1.0 -MCU = atmega32u4 # Teensy 2.0 +#MCU = atmega32u4 # Teensy 2.0 #MCU = at90usb646 # Teensy++ 1.0 #MCU = at90usb1286 # Teensy++ 2.0 -#MCU = atmega32u2 # TMK converter +MCU = atmega32u2 # TMK converter # Processor frequency. @@ -78,10 +78,10 @@ SRC += next_kbd.c # Search Path VPATH += $(TARGET_DIR) -VPATH += $(TOP_DIR) +VPATH += $(TMK_DIR) -include $(TOP_DIR)/protocol.mk -include $(TOP_DIR)/protocol/lufa.mk -include $(TOP_DIR)/common.mk -include $(TOP_DIR)/rules.mk +include $(TMK_DIR)/protocol.mk +include $(TMK_DIR)/protocol/lufa.mk +include $(TMK_DIR)/common.mk +include $(TMK_DIR)/rules.mk diff --git a/converter/next_usb/Makefile.pjrc b/converter/next_usb/Makefile.pjrc index 51d9de6b11..5813c9d6d2 100644 --- a/converter/next_usb/Makefile.pjrc +++ b/converter/next_usb/Makefile.pjrc @@ -2,7 +2,7 @@ TARGET = next_usb # Directory common source filess exist -TOP_DIR = ../.. +TMK_DIR = ../../tmk_core # Directory keyboard dependent files exist TARGET_DIR = . @@ -54,10 +54,10 @@ SRC += next_kbd.c # Search Path VPATH += $(TARGET_DIR) -VPATH += $(TOP_DIR) +VPATH += $(TMK_DIR) -include $(TOP_DIR)/protocol.mk -include $(TOP_DIR)/protocol/pjrc.mk -include $(TOP_DIR)/common.mk -include $(TOP_DIR)/rules.mk +include $(TMK_DIR)/protocol.mk +include $(TMK_DIR)/protocol/pjrc.mk +include $(TMK_DIR)/common.mk +include $(TMK_DIR)/rules.mk diff --git a/converter/next_usb/config.h b/converter/next_usb/config.h index cd80b5af1b..a06affc5e8 100644 --- a/converter/next_usb/config.h +++ b/converter/next_usb/config.h @@ -45,7 +45,7 @@ POSSIBILITY OF SUCH DAMAGE. */ -#define VENDOR_ID 0xBCBC +#define VENDOR_ID 0xFEED #define PRODUCT_ID 0xBCBC #define DEVICE_VER 0x0500 #define MANUFACTURER t.m.k. @@ -56,14 +56,15 @@ POSSIBILITY OF SUCH DAMAGE. #define MATRIX_ROWS 12 // keycode bit: 3-0 #define MATRIX_COLS 8 // keycode bit: 6-4 -//#define DEBUG_ON_INIT 1 +#define DEBUG_ON_INIT 1 //#define TEENSY_CONFIG 1 -#define PRO_MICRO_CONFIG 1 -//#define TMK_CONFIG 1 +//#define PRO_MICRO_CONFIG 1 +#define TMK_CONFIG 1 -// comment out if you don't want the keyboard's LEDs to flash upon initialization -#define NEXT_KBD_INIT_FLASH_LEDS +// comment out if you don't want the keyboard's LEDs to flash upon initialization or pressing shift +//#define NEXT_KBD_INIT_FLASH_LEDS +//#define NEXT_KBD_SHIFT_FLASH_LEDS //============= Start of Arduino Pro Micro Configuration ============== #ifdef PRO_MICRO_CONFIG @@ -183,6 +184,7 @@ POSSIBILITY OF SUCH DAMAGE. /* key combination for command */ #define IS_COMMAND() ( \ - (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))|| \ - (keyboard_report->mods == (MOD_BIT(KC_RALT) | MOD_BIT(KC_RCTL))) \ + (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) || \ + (keyboard_report->mods == (MOD_BIT(KC_RALT) | MOD_BIT(KC_RALT))) || \ + (keyboard_report->mods == (MOD_BIT(KC_RGUI) | MOD_BIT(KC_RGUI))) \ ) diff --git a/converter/next_usb/keymap.c b/converter/next_usb/keymap.c index 3a51075483..0041df543f 100644 --- a/converter/next_usb/keymap.c +++ b/converter/next_usb/keymap.c @@ -159,7 +159,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,PAUS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,FN3, BSLS,TRNS, VOLD, PGDN, BTN1,MS_U,BTN2,WH_U, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, MS_L,MS_D,MS_R,WH_D, TRNS, FN4, FN5, FN6, FN7, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS, TRNS,TRNS,TRNS, - TRNS,RALT, TRNS, RGUI,TRNS, TRNS,TRNS,TRNS, TRNS, TRNS,TRNS + TRNS,TRNS, TRNS, TRNS,TRNS, TRNS,TRNS,TRNS, TRNS, TRNS,TRNS ) }; diff --git a/converter/next_usb/led.c b/converter/next_usb/led.c index 24db15e16a..2bd0ef6dd4 100644 --- a/converter/next_usb/led.c +++ b/converter/next_usb/led.c @@ -47,9 +47,14 @@ POSSIBILITY OF SUCH DAMAGE. #include "stdint.h" #include "led.h" +#include "next_kbd.h" void led_set(uint8_t usb_led) { - + if (usb_led & (1<<USB_LED_CAPS_LOCK)) { + next_kbd_set_leds(true, true); + } else { + next_kbd_set_leds(false, false); + } } diff --git a/converter/next_usb/matrix.c b/converter/next_usb/matrix.c index fd6eb9d64f..d91cd25774 100644 --- a/converter/next_usb/matrix.c +++ b/converter/next_usb/matrix.c @@ -160,7 +160,7 @@ void matrix_init(void) /* scan all key states on matrix */ uint8_t matrix_scan(void) { - _delay_ms(20); + _delay_ms(5); //next_kbd_set_leds(false, false); NEXT_KBD_LED1_OFF; @@ -194,10 +194,12 @@ uint8_t matrix_scan(void) NEXT_KBD_LED1_ON; +#ifdef NEXT_KBD_SHIFT_FLASH_LEDS next_kbd_set_leds( NEXT_KBD_PRESSED_SHIFT_LEFT(resp) ? true : false, NEXT_KBD_PRESSED_SHIFT_RGHT(resp) ? true : false ); +#endif dprintf("[ r=%04lX keycode=%02X pressed=%X CTRL=%X SHIFT_LEFT=%X SHIFT_RGHT=%X CMD_LEFT=%X CMD_RGHT=%X ALT_LEFT=%X ALT_RGHT=%X ]\n", \ resp, \ |