From 20a689e27cd84c1b80fc2db54bff5a4225cbf6bd Mon Sep 17 00:00:00 2001 From: rhmokey <57172003+rhmokey@users.noreply.github.com> Date: Sat, 2 Oct 2021 22:59:47 +0800 Subject: [PATCH] [Keyboard] Modify mokey64 (#14612) Co-authored-by: Ryan --- keyboards/mokey/README.md | 2 +- keyboards/mokey/mokey64/config.h | 17 ++++-------- .../mokey/mokey64/keymaps/default/keymap.c | 1 - keyboards/mokey/mokey64/keymaps/via/keymap.c | 26 ++++++++++++++++--- keyboards/mokey/mokey64/readme.md | 4 +-- keyboards/mokey/mokey64/rules.mk | 10 +++---- 6 files changed, 35 insertions(+), 25 deletions(-) diff --git a/keyboards/mokey/README.md b/keyboards/mokey/README.md index 3a878ea8ee..f66e1ed71a 100644 --- a/keyboards/mokey/README.md +++ b/keyboards/mokey/README.md @@ -2,6 +2,6 @@ This is a series of PCB * Mokey63 multi-column,The chip is ATmega32U4 -* Mokey64 The chip is STM32F401 +* Mokey64 The chip is ATmega32U4 diff --git a/keyboards/mokey/mokey64/config.h b/keyboards/mokey/mokey64/config.h index d410f8fafe..79b96b4e27 100644 --- a/keyboards/mokey/mokey64/config.h +++ b/keyboards/mokey/mokey64/config.h @@ -26,19 +26,12 @@ along with this program. If not, see . #define MATRIX_ROWS 5 #define MATRIX_COLS 14 -#define MATRIX_ROW_PINS { A1, A2, A3, A4, A5 } -#define MATRIX_COL_PINS { B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13 } +#define MATRIX_ROW_PINS { B1, B2, B3, B4, B5 } +#define MATRIX_COL_PINS { C7, F6, F5, F4, F1, E6, D0, D2, D1, D3, D5, D4, D6, D7 } #define UNUSED_PINS +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DEBOUNCE 5 - -#define RGB_DI_PIN A7 -#define RGBLED_NUM 68 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE - -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE \ No newline at end of file +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 \ No newline at end of file diff --git a/keyboards/mokey/mokey64/keymaps/default/keymap.c b/keyboards/mokey/mokey64/keymaps/default/keymap.c index 5d6e8f4d43..de38570e91 100644 --- a/keyboards/mokey/mokey64/keymaps/default/keymap.c +++ b/keyboards/mokey/mokey64/keymaps/default/keymap.c @@ -18,7 +18,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( - /*0 1 2 3 4 5 6 7 8 9 a b c d*/ 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_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_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, diff --git a/keyboards/mokey/mokey64/keymaps/via/keymap.c b/keyboards/mokey/mokey64/keymaps/via/keymap.c index 8a1ae3dba7..f44f38e8ea 100644 --- a/keyboards/mokey/mokey64/keymaps/via/keymap.c +++ b/keyboards/mokey/mokey64/keymaps/via/keymap.c @@ -18,12 +18,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT( - /*0 1 2 3 4 5 6 7 8 9 a b c d*/ + [0] = LAYOUT( 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_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_BSLS, KC_CAPS, 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_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_DEL, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_GRV, KC_LEFT, KC_DOWN, KC_RGHT) + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_GRV, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT( + 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, 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), + + [2] = LAYOUT( + 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, 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), + + [3] = LAYOUT( + 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, 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/mokey/mokey64/readme.md b/keyboards/mokey/mokey64/readme.md index c25f61c040..5feb849bc4 100644 --- a/keyboards/mokey/mokey64/readme.md +++ b/keyboards/mokey/mokey64/readme.md @@ -2,10 +2,10 @@ ![mokey](https://rhmokey.github.io/update/index/64v13.jpg) -Support STM32F401 keyboard. +Support Atmega32u4 keyboard. * Keyboard Maintainer: [rhmokey](https://github.com/rhmokey) -* Hardware Supported: STM32F401 +* Hardware Supported: Atmega32u4 ## Bootloader * **Physical reset button**: Short press the button on the back of the PCB to enter the Bootloader and flash the firmware diff --git a/keyboards/mokey/mokey64/rules.mk b/keyboards/mokey/mokey64/rules.mk index 186091bf2f..6da271964f 100644 --- a/keyboards/mokey/mokey64/rules.mk +++ b/keyboards/mokey/mokey64/rules.mk @@ -1,23 +1,21 @@ # MCU name -MCU = STM32F401 +MCU = atmega32u4 # Bootloader selection -BOOTLOADER = stm32-dfu +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys +MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -KEYBOARD_SHARED_EP = yes CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover +NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output -