From 507ebb34f5e7ca0eb2543f3c755ae39671a9b44c Mon Sep 17 00:00:00 2001 From: tmk Date: Fri, 26 Jun 2015 08:49:03 +0900 Subject: [PATCH] alps64: Change keymaps and USB descriptors. --- keyboard/alps64/config.h | 4 ++-- keyboard/alps64/keymap_common.h | 6 +++--- keyboard/alps64/keymap_plain.c | 8 ++++---- keyboard/alps64/matrix.c | 10 ++++++++++ 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/keyboard/alps64/config.h b/keyboard/alps64/config.h index 06649a092..824d3e830 100644 --- a/keyboard/alps64/config.h +++ b/keyboard/alps64/config.h @@ -23,9 +23,9 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6464 #define DEVICE_VER 0x0001 -#define MANUFACTURER geekhack +#define MANUFACTURER TMK #define PRODUCT Alps64 -#define DESCRIPTION t.m.k. keyboard firmware for Alps64 +#define DESCRIPTION TMK keyboard firmware for Alps64 /* key matrix size */ #define MATRIX_ROWS 8 diff --git a/keyboard/alps64/keymap_common.h b/keyboard/alps64/keymap_common.h index b2d6ad5c4..957db5792 100644 --- a/keyboard/alps64/keymap_common.h +++ b/keyboard/alps64/keymap_common.h @@ -60,11 +60,11 @@ extern const uint16_t fn_actions[]; K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ K30, K40, K50, K60, K00, K10, K20 \ ) KEYMAP( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, NO, K27, \ + K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, NUHS,K27, \ K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, NO, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, NO, \ - K30, K40, K50, K60, NO, K00, K10, K20 \ + K31, NUBS,K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, ESC, \ + K30, K40, K50, K60, APP, K00, K10, K20 \ ) #endif diff --git a/keyboard/alps64/keymap_plain.c b/keyboard/alps64/keymap_plain.c index 13a4407f8..a54899196 100644 --- a/keyboard/alps64/keymap_plain.c +++ b/keyboard/alps64/keymap_plain.c @@ -2,11 +2,11 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: qwerty */ - KEYMAP_AEK( \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, \ + KEYMAP( \ + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS, BSPC, \ TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ - LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, \ - LCTL,LGUI,LALT, SPC, RALT,RGUI,RCTL), + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,ESC, \ + LCTL,LGUI,LALT, SPC, APP, RALT,RGUI,RCTL), }; const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboard/alps64/matrix.c b/keyboard/alps64/matrix.c index a49755c3a..aa991e0ae 100644 --- a/keyboard/alps64/matrix.c +++ b/keyboard/alps64/matrix.c @@ -55,6 +55,10 @@ uint8_t matrix_cols(void) return MATRIX_COLS; } +#define LED_ON() do { DDRC |= (1<<5); PORTC |= (1<<5); } while (0) +#define LED_OFF() do { DDRC &= ~(1<<5); PORTC &= ~(1<<5); } while (0) +#define LED_TGL() do { DDRC |= (1<<5); PINC |= (1<<5); } while (0) + void matrix_init(void) { // initialize row and col @@ -66,6 +70,12 @@ void matrix_init(void) matrix[i] = 0; matrix_debouncing[i] = 0; } + + //debug + debug_matrix = true; + LED_ON(); + _delay_ms(500); + LED_OFF(); } uint8_t matrix_scan(void)