diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2022-06-27 16:38:28 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2022-06-27 16:38:28 +0200 |
commit | 98b9909429aea0869f7a6f2f44ab386a4a3ff094 (patch) | |
tree | e1080a61bb89a75edc70818489f8044adf597c48 /keyboards/hhkb | |
parent | b610965fd6d851484025166fb255078b1c809261 (diff) | |
parent | fa3dd373b4925734d9843ae6014349069ffec353 (diff) | |
download | qmk_firmware-98b9909429aea0869f7a6f2f44ab386a4a3ff094.tar.gz qmk_firmware-98b9909429aea0869f7a6f2f44ab386a4a3ff094.zip |
Merge branch 'master' into taamas
Diffstat (limited to 'keyboards/hhkb')
23 files changed, 73 insertions, 128 deletions
diff --git a/keyboards/hhkb/ansi/config.h b/keyboards/hhkb/ansi/config.h index 78fe0c47ae..8307fc1679 100644 --- a/keyboards/hhkb/ansi/config.h +++ b/keyboards/hhkb/ansi/config.h @@ -87,5 +87,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION diff --git a/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h index 0b811fd03a..163ae84fb4 100644 --- a/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h +++ b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h @@ -16,7 +16,7 @@ #pragma once -#include "keymap_jp.h" +#include "keymap_japanese.h" // clang-format off /* Keymap for converting JIS to US */ diff --git a/keyboards/hhkb/ansi/matrix.c b/keyboards/hhkb/ansi/matrix.c index 529ba8b8fc..8b0e4606bc 100644 --- a/keyboards/hhkb/ansi/matrix.c +++ b/keyboards/hhkb/ansi/matrix.c @@ -163,15 +163,6 @@ uint8_t matrix_scan(void) return 1; } -bool matrix_is_modified(void) -{ - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - if (matrix[i] != matrix_prev[i]) - return true; - } - return false; -} - inline bool matrix_has_ghost(void) { @@ -198,14 +189,6 @@ void matrix_print(void) } } -uint8_t matrix_key_count(void) { - uint8_t count = 0; - for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { - count += bitpop16(matrix_get_row(r)); - } - return count; -} - void matrix_power_up(void) { KEY_POWER_ON(); } diff --git a/keyboards/hhkb/ansi/post_rules.mk b/keyboards/hhkb/ansi/post_rules.mk new file mode 100644 index 0000000000..eb9a8f0adb --- /dev/null +++ b/keyboards/hhkb/ansi/post_rules.mk @@ -0,0 +1,18 @@ +ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) + +OPT_DEFS += -DHHKB_RN42_ENABLE + +# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT +# HHKB Alt controller. +RN42_DIR = keyboards/hhkb/rn42 + +SRC += serial_uart.c \ + suart.S \ + rn42.c \ + rn42_task.c \ + battery.c \ + main.c + +VPATH += $(RN42_DIR) + +endif diff --git a/keyboards/hhkb/ansi/rules.mk b/keyboards/hhkb/ansi/rules.mk index 6e2e81b0cf..0b110d6561 100644 --- a/keyboards/hhkb/ansi/rules.mk +++ b/keyboards/hhkb/ansi/rules.mk @@ -5,17 +5,15 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -# comment out to disable the options. +# change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Custom matrix file for the HHKB -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -# NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # Enable N-Key Rollover # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality # HHKB_RN42_ENABLE = yes # Enable support for hasu's BT alt controller -- code borrowed from tmk source tree. @@ -30,26 +28,6 @@ CUSTOM_MATRIX = yes # Custom matrix file for the HHKB # project specific files SRC = matrix.c -ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) - -OPT_DEFS += -DHHKB_RN42_ENABLE - -# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT -# HHKB Alt controller. -RN42_DIR = ../rn42 - -SRC += serial_uart.c \ - ../rn42/suart.S \ - ../rn42/rn42.c \ - ../rn42/rn42_task.c \ - ../rn42/battery.c \ - ../rn42/main.c - -VPATH += $(RN42_DIR) - -endif - - # debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION # debug-on: all diff --git a/keyboards/hhkb/jp/config.h b/keyboards/hhkb/jp/config.h index 22ac6aa623..04ee61c768 100644 --- a/keyboards/hhkb/jp/config.h +++ b/keyboards/hhkb/jp/config.h @@ -87,5 +87,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION diff --git a/keyboards/hhkb/jp/info.json b/keyboards/hhkb/jp/info.json index b9064880dd..ee9d1de53a 100644 --- a/keyboards/hhkb/jp/info.json +++ b/keyboards/hhkb/jp/info.json @@ -3,7 +3,7 @@ "url": "", "maintainer": "qmk", "layouts": { - "LAYOUT_JP": { + "LAYOUT_jp": { "layout": [ { "label": "Esc", "x": 0, "y": 0 }, { "label": "!", "x": 1, "y": 0 }, diff --git a/keyboards/hhkb/jp/jp.h b/keyboards/hhkb/jp/jp.h index a95796f25f..b243e5546c 100644 --- a/keyboards/hhkb/jp/jp.h +++ b/keyboards/hhkb/jp/jp.h @@ -2,7 +2,7 @@ #include "quantum.h" -#define LAYOUT_JP( \ +#define LAYOUT_jp( \ K02, K32, K62, K22, K12, K52, K72, KA2, K92, K82, KB2, KE2, KF2, KD2, KC2, \ K03, K63, K23, K13, K53, K73, KA3, K93, K83, KB3, KE3, KF3, KD3, \ K06, K66, K26, K16, K56, K76, KA6, K96, K86, KB6, KE6, KF6, KD6, KC6, \ diff --git a/keyboards/hhkb/jp/keymaps/bakingpy/keymap.c b/keyboards/hhkb/jp/keymaps/bakingpy/keymap.c index 04d79f9247..cea713dbf2 100644 --- a/keyboards/hhkb/jp/keymaps/bakingpy/keymap.c +++ b/keyboards/hhkb/jp/keymaps/bakingpy/keymap.c @@ -1,14 +1,14 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_JP( + [0] = LAYOUT_jp( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_BSLS, MO(1), KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_BSPC, KC_RGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), - [1] = LAYOUT_JP( + [1] = LAYOUT_jp( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, diff --git a/keyboards/hhkb/jp/keymaps/default/keymap.c b/keyboards/hhkb/jp/keymaps/default/keymap.c index 1c7d677ccf..a704ee5647 100644 --- a/keyboards/hhkb/jp/keymaps/default/keymap.c +++ b/keyboards/hhkb/jp/keymaps/default/keymap.c @@ -29,14 +29,14 @@ */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_JP( + [0] = LAYOUT_jp( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, MO(1), KC_ZKHK, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_KANA, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), - [1] = LAYOUT_JP( + [1] = LAYOUT_jp( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, diff --git a/keyboards/hhkb/jp/keymaps/default_mac/keymap.c b/keyboards/hhkb/jp/keymaps/default_mac/keymap.c index 17127690f4..df08341fa4 100644 --- a/keyboards/hhkb/jp/keymaps/default_mac/keymap.c +++ b/keyboards/hhkb/jp/keymaps/default_mac/keymap.c @@ -29,14 +29,14 @@ */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_JP( + [0] = LAYOUT_jp( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, MO(1), KC_GRV, KC_LALT, KC_LGUI, KC_MHEN, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), - [1] = LAYOUT_JP( + [1] = LAYOUT_jp( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, diff --git a/keyboards/hhkb/jp/keymaps/dhertz/keymap.c b/keyboards/hhkb/jp/keymaps/dhertz/keymap.c index 951af069b0..4c01457464 100644 --- a/keyboards/hhkb/jp/keymaps/dhertz/keymap.c +++ b/keyboards/hhkb/jp/keymaps/dhertz/keymap.c @@ -15,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |NCt|| #|Alt|CmT|CmT| LyrSpc |CGv|Iso|Gui|CSL||Rig|Dow|Lef| * `-----------------------------------------------------------' */ - [0] = LAYOUT_JP( + [0] = LAYOUT_jp( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL, KC_DEL,KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC, SRCH_CTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS, KC_ENT, @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | || ~| |CAD| | |CmH| | | || | | | * `-----------------------------------------------------------' */ - [1] = LAYOUT_JP( + [1] = LAYOUT_jp( KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, CMD_SPC,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, @@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | || ~| | | | | | | | ||Hom|PgD|End| * `-----------------------------------------------------------' */ - [2] = LAYOUT_JP( + [2] = LAYOUT_jp( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS,KC_DEL, KC_CAPS, DF(0), DF(1),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP,KC_TRNS, KC_TRNS, KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_TRNS,KC_BSPC, KC_DEL,CMD_SFT_L,KC_LEFT,KC_RGHT,KC_TRNS,KC_PENT, diff --git a/keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c b/keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c index 4ebdcf86da..2bec6bb4c6 100644 --- a/keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c +++ b/keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c @@ -29,14 +29,14 @@ */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_JP( + [0] = LAYOUT_jp( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRAVE, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DEL, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_BSLS, KC_BSPC, KC_ZKHK, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_BSPC, KC_RSFT, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), - [1] = LAYOUT_JP( + [1] = LAYOUT_jp( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_CAPS, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PSCR, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LEFT, KC_RGHT, _______, KC_PENT, diff --git a/keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c index 0d4a24c60d..ebbe13393b 100644 --- a/keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c +++ b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||Ctl|Alt|Cmd| | Spc | | | | ||Lft|Dwn|Rgh| `-----------------------------------------------------------' */ - [BASE] = LAYOUT_JP( + [BASE] = LAYOUT_jp( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { `-----------------------------------------------------------' */ - [HHKB] = LAYOUT_JP( + [HHKB] = LAYOUT_jp( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | || | | | | | | | | || | | | `-----------------------------------------------------------' */ - [MIRROR] = LAYOUT_JP( + [MIRROR] = LAYOUT_jp( _______, KC_0, KC_9, KC_8, KC_7, KC_6, KC_5, KC_4, KC_3, KC_2, KC_1, _______, _______, _______, _______, _______, KC_P, KC_O, KC_I, KC_U, KC_Y, KC_T, KC_R, KC_E, KC_W, KC_Q, _______, _______, _______, KC_SCLN, KC_L, KC_K, KC_J, KC_H, KC_G, KC_F, KC_D, KC_S, KC_A, _______, _______, _______, diff --git a/keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c b/keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c index c893495efe..b4eec44547 100644 --- a/keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c +++ b/keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c @@ -28,21 +28,21 @@ enum */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [ZER] = LAYOUT_JP( + [ZER] = LAYOUT_jp( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INS, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_GRV, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, KC_UP, KC_RSFT, MO(HDN), KC_LCTL, KC_LALT, KC_LGUI, MO(HDN), KC_SPC, SFT_BSP, MO(HDN), MO(OSY), KC_NO, KC_LEFT, KC_DOWN, KC_RGHT), - [HDN] = LAYOUT_JP( + [HDN] = LAYOUT_jp( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, KC_TILD, KC_GRV, KC_BSLS, KC_PIPE, KC_MINS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TILD, KC_GRV, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, _______, KC_ENT, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_DEL, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), - [OSY] = LAYOUT_JP( + [OSY] = LAYOUT_jp( _______, _______, _______, SCRNS3, SCRNS4, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/hhkb/jp/keymaps/sh_jp/keymap.c b/keyboards/hhkb/jp/keymaps/sh_jp/keymap.c index 097a017525..e13838007b 100644 --- a/keyboards/hhkb/jp/keymaps/sh_jp/keymap.c +++ b/keyboards/hhkb/jp/keymaps/sh_jp/keymap.c @@ -10,34 +10,34 @@ enum }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [DVOR] = LAYOUT_JP( + [DVOR] = LAYOUT_jp( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_JYEN, KC_BSPC, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_BSLS, KC_ENT, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RO, KC_UP, KC_RSFT, MO(FUNC), KC_ZKHK, KC_LALT, MO(NEW_CMD), MO(SYMB), MT(MOD_LSFT, KC_SPC), MO(SYMB), KC_TAB, KC_RGUI, TG(QWER), KC_LEFT, KC_DOWN, KC_RGHT), - [QWER] = LAYOUT_JP( + [QWER] = LAYOUT_jp( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, MO(FUNC), KC_ZKHK, KC_LALT, MO(NEW_CMD), MO(SYMB), MT(MOD_LSFT, KC_SPC), MO(SYMB), KC_TAB, KC_RGUI, _______, KC_LEFT, KC_DOWN, KC_RGHT), - [NEW_CMD] = LAYOUT_JP( + [NEW_CMD] = LAYOUT_jp( _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), _______, _______, _______, LGUI(KC_BSPC), _______, LGUI(KC_Q), LGUI(KC_W), LGUI(KC_E), LGUI(KC_R), LGUI(KC_T), LGUI(KC_Y), LGUI(KC_U), LGUI(KC_I), LGUI(KC_O), LGUI(KC_P), LGUI(KC_LBRC), LGUI(KC_RBRC), _______, LGUI(KC_A), LGUI(KC_S), LGUI(KC_D), LGUI(KC_F), LGUI(KC_G), LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), _______, _______, _______, _______, LGUI(KC_LSFT), LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_B), LGUI(KC_N), LGUI(KC_M), LGUI(KC_COMM), LGUI(KC_DOT), LGUI(KC_SLSH), _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_SPC), _______, _______, _______, _______, LGUI(KC_LEFT), LGUI(KC_DOWN), LGUI(KC_RGHT)), - [SYMB] = LAYOUT_JP( + [SYMB] = LAYOUT_jp( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, LSFT(KC_LBRC), LSFT(KC_RBRC), _______, _______, _______, _______, _______, LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - [FUNC] = LAYOUT_JP( + [FUNC] = LAYOUT_jp( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, diff --git a/keyboards/hhkb/jp/keymaps/via/keymap.c b/keyboards/hhkb/jp/keymaps/via/keymap.c index 64323309bb..8f23cfcd2d 100644 --- a/keyboards/hhkb/jp/keymaps/via/keymap.c +++ b/keyboards/hhkb/jp/keymaps/via/keymap.c @@ -29,21 +29,21 @@ */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_JP( + [0] = LAYOUT_jp( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, MO(1), KC_ZKHK, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_KANA, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), - [1] = LAYOUT_JP( + [1] = LAYOUT_jp( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [2] = LAYOUT_JP( + [2] = LAYOUT_jp( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/hhkb/jp/matrix.c b/keyboards/hhkb/jp/matrix.c index c0dca6a990..9d04d62849 100644 --- a/keyboards/hhkb/jp/matrix.c +++ b/keyboards/hhkb/jp/matrix.c @@ -164,15 +164,6 @@ uint8_t matrix_scan(void) return 1; } -bool matrix_is_modified(void) -{ - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - if (matrix[i] != matrix_prev[i]) - return true; - } - return false; -} - inline bool matrix_has_ghost(void) { @@ -199,14 +190,6 @@ void matrix_print(void) } } -uint8_t matrix_key_count(void) { - uint8_t count = 0; - for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { - count += bitpop16(matrix_get_row(r)); - } - return count; -} - void matrix_power_up(void) { KEY_POWER_ON(); } diff --git a/keyboards/hhkb/jp/post_rules.mk b/keyboards/hhkb/jp/post_rules.mk new file mode 100644 index 0000000000..eb9a8f0adb --- /dev/null +++ b/keyboards/hhkb/jp/post_rules.mk @@ -0,0 +1,18 @@ +ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) + +OPT_DEFS += -DHHKB_RN42_ENABLE + +# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT +# HHKB Alt controller. +RN42_DIR = keyboards/hhkb/rn42 + +SRC += serial_uart.c \ + suart.S \ + rn42.c \ + rn42_task.c \ + battery.c \ + main.c + +VPATH += $(RN42_DIR) + +endif diff --git a/keyboards/hhkb/jp/rules.mk b/keyboards/hhkb/jp/rules.mk index 56187bb331..ae0710e028 100644 --- a/keyboards/hhkb/jp/rules.mk +++ b/keyboards/hhkb/jp/rules.mk @@ -5,17 +5,15 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -# comment out to disable the options. +# change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Custom matrix file for the HHKB -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -# NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # Enable N-Key Rollover # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality # HHKB_RN42_ENABLE = yes # Enable support for hasu's BT alt controller -- code borrowed from tmk source tree. @@ -30,26 +28,6 @@ CUSTOM_MATRIX = yes # Custom matrix file for the HHKB # project specific files SRC = matrix.c -ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) - -OPT_DEFS += -DHHKB_RN42_ENABLE - -# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT -# HHKB Alt controller. -RN42_DIR = ../rn42 - -SRC += serial_uart.c \ - ../rn42/suart.S \ - ../rn42/rn42.c \ - ../rn42/rn42_task.c \ - ../rn42/battery.c \ - ../rn42/main.c - -VPATH += $(RN42_DIR) - -endif - - # debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION # debug-on: all diff --git a/keyboards/hhkb/rn42/battery.h b/keyboards/hhkb/rn42/battery.h index 180d4dcfaa..c7f96d09a3 100644 --- a/keyboards/hhkb/rn42/battery.h +++ b/keyboards/hhkb/rn42/battery.h @@ -1,5 +1,4 @@ -#ifndef POWER_H -#define POWER_H +#pragma once #include <stdint.h> #include <stdbool.h> @@ -31,5 +30,3 @@ battery_status_t battery_status(void); // ADC offset:16, resolution:5mV #define BATTERY_ADC_OFFSET 16 #define BATTERY_ADC_RESOLUTION 5 - -#endif diff --git a/keyboards/hhkb/rn42/rn42.h b/keyboards/hhkb/rn42/rn42.h index dee214cc84..76bcef99bb 100644 --- a/keyboards/hhkb/rn42/rn42.h +++ b/keyboards/hhkb/rn42/rn42.h @@ -1,5 +1,4 @@ -#ifndef RN42_H -#define RN42_H +#pragma once #include <stdbool.h> #include "host_driver.h" @@ -26,5 +25,3 @@ void rn42_send_str(const char *str); void rn42_print_response(void); #define SEND_STR(str) rn42_send_str(PSTR(str)) #define SEND_COMMAND(cmd) rn42_send_command(PSTR(cmd)) - -#endif diff --git a/keyboards/hhkb/rn42/rn42_task.h b/keyboards/hhkb/rn42/rn42_task.h index ee00669ee5..05e80e9be2 100644 --- a/keyboards/hhkb/rn42/rn42_task.h +++ b/keyboards/hhkb/rn42/rn42_task.h @@ -1,5 +1,4 @@ -#ifndef RN42_TASK_H -#define RN42_TASK_H +#pragma once #include <stdbool.h> #include "rn42.h" @@ -10,5 +9,3 @@ bool rn42_nkro_last; void rn42_task_init(void); void rn42_task(void); - -#endif |