diff options
author | tmk <nobody@nowhere> | 2013-03-05 15:41:21 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2013-03-05 15:41:21 +0900 |
commit | 5808317b694004c43a6e0f76e9715415cce19a25 (patch) | |
tree | 9814dbe96eecbb940a710505feb82125a483dc2d /converter | |
parent | 633d9aa53e3fc2b9fa9f01475cba9c151ab31d9a (diff) |
Fix keymap for new framework
Diffstat (limited to 'converter')
-rw-r--r-- | converter/m0110_usb/Makefile.lufa | 91 | ||||
-rw-r--r-- | converter/m0110_usb/README.md | 7 | ||||
-rw-r--r-- | converter/m0110_usb/config.h | 1 | ||||
-rw-r--r-- | converter/m0110_usb/keymap.c | 9 | ||||
-rw-r--r-- | converter/pc98_usb/keymap.c | 2 |
5 files changed, 101 insertions, 9 deletions
diff --git a/converter/m0110_usb/Makefile.lufa b/converter/m0110_usb/Makefile.lufa new file mode 100644 index 0000000000..028bdf9331 --- /dev/null +++ b/converter/m0110_usb/Makefile.lufa @@ -0,0 +1,91 @@ +# Target file name (without extension). +TARGET = m0110_lufa + +# Directory common source filess exist +TOP_DIR = ../.. + +# Directory keyboard dependent files exist +TARGET_DIR = . + +# keyboard dependent files +SRC = keymap.c \ + matrix.c \ + led.c \ + m0110.c + +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 = at90usb646 # Teensy++ 1.0 +#MCU = at90usb1286 # Teensy++ 2.0 + + +# Processor frequency. +# Normally the first thing your program should do is set the clock prescaler, +# so your program will run at the correct speed. You should also set this +# variable to same clock speed. The _delay_ms() macro uses this, and many +# examples use this variable to calculate timings. Do not add a "UL" here. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task +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 +# Teensy halfKay 512 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +OPT_DEFS += -DBOOT_SIZE=4096 + + + +#---------------- Programming Options -------------------------- +PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex + + +# Search Path +VPATH += $(TARGET_DIR) +VPATH += $(TOP_DIR) + + +include $(TOP_DIR)/protocol/lufa.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk + +hasu: EXTRAFLAGS += -DHASU +hasu: all diff --git a/converter/m0110_usb/README.md b/converter/m0110_usb/README.md index 206f434251..80503e8755 100644 --- a/converter/m0110_usb/README.md +++ b/converter/m0110_usb/README.md @@ -53,7 +53,8 @@ You can edit *Makefile* and *config.h* to change compile options and pin configu $ git clone git://github.com/tmk/tmk_keyboard.git (or download source) $ cd m0110_usb - $ make + $ make -f Makefile.lufa clean + $ make -f Makefile.lufa and program your Teensy with [PJRC Teensy loader](http://www.pjrc.com/teensy/loader.html). @@ -74,7 +75,7 @@ You can change keymaps by editing *keymap.c*. |---------------------------------------------------------| |---------------| |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | | 1| 2| 3| | `---------------------------------------------------------' |-----------|Ent| - |Alt|Gui | Space |Ctl |Alt| | 0| .| | + |Ctl|Alt | Space |Gui |Ctl| | 0| .| | `-----------------------------------------------' `---------------' #### *HHKB/WASD Layer(WASD/IJKL)* ,---------------------------------------------------------. ,---------------. @@ -86,7 +87,7 @@ You can change keymaps by editing *keymap.c*. |---------------------------------------------------------| |---------------| |Shift |End| |PgD| | | |PgD| |End| |Shift | | 1| 2| 3| | `---------------------------------------------------------' |-----------|Ent| - |Alt|Gui | Space |Ctl |Alt| | 0| .| | + |Ctl|Alt | Space |Gui |Ctl| | 0| .| | `-----------------------------------------------' `---------------' ### M0110A diff --git a/converter/m0110_usb/config.h b/converter/m0110_usb/config.h index be00259e6b..d43f283838 100644 --- a/converter/m0110_usb/config.h +++ b/converter/m0110_usb/config.h @@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x0110 +#define DEVICE_VER 0x0100 #define MANUFACTURER t.m.k. #define PRODUCT M0110 keyboard converter #define DESCRIPTION convert M0110 keyboard to USB diff --git a/converter/m0110_usb/keymap.c b/converter/m0110_usb/keymap.c index 191bf3a156..7a3bc35856 100644 --- a/converter/m0110_usb/keymap.c +++ b/converter/m0110_usb/keymap.c @@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <stdint.h> #include <stdbool.h> #include <avr/pgmspace.h> -#include "usb_keyboard.h" #include "keycode.h" #include "print.h" #include "debug.h" @@ -148,7 +147,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------------------------------------------------------| |---------------| * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft|Up | | 1| 2| 3| | * |---------------------------------------------------------| |-----------|Ent| - * |Alt |Gui | Space |Ctl| \|Lft|Rgt|Dn | | 0| .| | + * |Ctl |Alt | Space |Gui| \|Lft|Rgt|Dn | | 0| .| | * `---------------------------------------------------------' `---------------' */ KEYMAP( @@ -156,7 +155,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, P7, P8, P9, PMNS, FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS, LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, UP, P1, P2, P3, PENT, - LALT,LGUI, SPC, LCTL,BSLS,LEFT,RGHT,DOWN, P0, PDOT + LCTL,LALT, SPC, LGUI,BSLS,LEFT,RGHT,DOWN, P0, PDOT ), /* Cursor Layer(WASD, IJKL) * ,---------------------------------------------------------. ,---------------. @@ -168,7 +167,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------------------------------------------------------| |---------------| * |Shift |End| |PgD| | | |PgD| |End| |Shif|PgU| | 1| 2| 3| | * |---------------------------------------------------------| |-----------|Ent| - * |Alt |Gui | Space |Gui |Ins|Hom|End|PgD| | 0| .| | + * |Ctl |Alt | Space |Gui |Ins|Hom|End|PgD| | 0| .| | * `---------------------------------------------------------' `---------------' */ KEYMAP( @@ -176,7 +175,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { CAPS,HOME,UP, PGUP,NO, NO, NO, PGUP,UP, HOME,PSCR,SLCK,PAUS, P7, P8, P9, PMNS, FN0, LEFT,DOWN,RGHT,NO, NO, NO, LEFT,DOWN,RGHT,NO, NO, ENT, P4, P5, P6, PPLS, LSFT,END, NO, PGDN,NO, NO, NO, PGDN,NO, END, NO, PGUP, P1, P2, P3, PENT, - LALT,LGUI, SPC, LCTL,INS, HOME,END, PGDN, P0, PDOT + LCTL,LALT, SPC, LGUI,INS, HOME,END, PGDN, P0, PDOT ), }; diff --git a/converter/pc98_usb/keymap.c b/converter/pc98_usb/keymap.c index f793539dfd..279b2b60c0 100644 --- a/converter/pc98_usb/keymap.c +++ b/converter/pc98_usb/keymap.c @@ -168,7 +168,7 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_KEYMAP_TAP_TOGGLE(0), // FN0 ACTION_KEYMAP_TAP_KEY(1, KC_SLASH), // FN1 ACTION_KEYMAP_TAP_KEY(2, KC_SCLN), // FN2 - ACTION_KEYMAP(2), // FN3 + ACTION_KEYMAP_MOMENTARY(2), // FN3 ACTION_MACRO(LBRACKET), // FN4 ACTION_MACRO(RBRACKET), // FN5 ACTION_MACRO(DUMMY), // FN6 |