fixed hhkb to comply new API.

This commit is contained in:
tmk
2011-02-22 01:21:53 +09:00
parent 60052acc0f
commit d2b9489a5e
8 changed files with 33 additions and 123 deletions

View File

@@ -8,11 +8,13 @@ COMMON_DIR = ..
TARGET_DIR = .
# keyboard dependent files
TARGET_SRC = tmk.c \
TARGET_SRC = main_pjrc.c \
keymap.c \
matrix.c \
led.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
@@ -38,5 +40,11 @@ USB_EXTRA_ENABLE = yes # Enhanced feature for Windows(Audio control and System c
USB_NKRO_ENABLE = yes # USB Nkey Rollover
#---------------- Programming Options --------------------------
PROGRAM_CMD = teensy_loader_cli.exe -mmcu=$(MCU) -w -v $(TARGET).hex
include $(COMMON_DIR)/Makefile.pjrc
include $(COMMON_DIR)/Makefile.common

View File

@@ -10,26 +10,27 @@
#define PRODUCT HHKB mod
#define DESCRIPTION t.m.k. keyboard firmware for HHKB mod
/* matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 8
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (BIT_LSHIFT | BIT_RSHIFT))
#define IS_COMMAND() ( \
keyboard_report->mods == (BIT_LSHIFT | BIT_RSHIFT) || \
keyboard_report->mods == (BIT_LCTRL | BIT_RSHIFT) \
)
/* USB NKey Rollover */
#ifdef USB_NKRO_ENABLE
#endif
/* mouse keys */
#ifdef MOUSEKEY_ENABLE
# define MOUSEKEY_DELAY_TIME 192
#endif
/* PS/2 mouse */
#ifdef PS2_MOUSE_ENABLE
/*

View File

@@ -9,7 +9,7 @@
#include "print.h"
#include "debug.h"
#include "util.h"
#include "keymap_skel.h"
#include "keymap.h"
// Convert physical keyboard layout to matrix array.
@@ -193,9 +193,3 @@ uint8_t keymap_fn_keycode(uint8_t fn_bits)
{
return pgm_read_byte(&fn_keycode[(biton(fn_bits))]);
}
// define a condition to enter special function mode
bool keymap_is_special_mode(uint8_t fn_bits)
{
return host_get_mods() == (BIT_LSHIFT | BIT_RSHIFT) || host_get_mods() == (BIT_LCTRL | BIT_RSHIFT);
}

View File

@@ -7,7 +7,7 @@
#include <util/delay.h>
#include "print.h"
#include "util.h"
#include "matrix_skel.h"
#include "matrix.h"
#if (MATRIX_COLS > 16)