diff options
| author | moyi4681 <moyi4681@users.noreply.github.com> | 2022-01-11 11:12:17 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-10 19:12:17 -0800 |
| commit | e2aee8f9bbb0885ede2c2918244902bad9136659 (patch) | |
| tree | f6702172fb034444f4297ed0cb25e5f0af731e1d /keyboards/kbdfans | |
| parent | c6ad2025837d93353de1948991c3be0b5c90e667 (diff) | |
| download | qmk_firmware-e2aee8f9bbb0885ede2c2918244902bad9136659.tar.gz qmk_firmware-e2aee8f9bbb0885ede2c2918244902bad9136659.zip | |
[Keyboard] add kbd67mkiirgb v4 support (#15024)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Diffstat (limited to 'keyboards/kbdfans')
| -rw-r--r-- | keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.h | 2 | ||||
| -rw-r--r-- | keyboards/kbdfans/kbd67/mkiirgb/readme.md | 15 | ||||
| -rw-r--r-- | keyboards/kbdfans/kbd67/mkiirgb/v4/config.h | 70 | ||||
| -rw-r--r-- | keyboards/kbdfans/kbd67/mkiirgb/v4/readme.md | 18 | ||||
| -rw-r--r-- | keyboards/kbdfans/kbd67/mkiirgb/v4/rules.mk | 20 | ||||
| -rw-r--r-- | keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c | 49 | ||||
| -rw-r--r-- | keyboards/kbdfans/kbd67/mkiirgb/v4/v4.h | 32 |
7 files changed, 199 insertions, 7 deletions
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.h b/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.h index c297a02e8..dadc23062 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.h | |||
| @@ -22,5 +22,7 @@ | |||
| 22 | #include "v2.h" | 22 | #include "v2.h" |
| 23 | #elif defined(KEYBOARD_kbdfans_kbd67_mkiirgb_v3) | 23 | #elif defined(KEYBOARD_kbdfans_kbd67_mkiirgb_v3) |
| 24 | #include "v3.h" | 24 | #include "v3.h" |
| 25 | #elif defined(KEYBOARD_kbdfans_kbd67_mkiirgb_v4) | ||
| 26 | #include "v4.h" | ||
| 25 | #endif | 27 | #endif |
| 26 | #include "quantum.h" | 28 | #include "quantum.h" |
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/readme.md b/keyboards/kbdfans/kbd67/mkiirgb/readme.md index 58338df0f..5b71c27f0 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/readme.md +++ b/keyboards/kbdfans/kbd67/mkiirgb/readme.md | |||
| @@ -3,19 +3,20 @@ | |||
| 3 | A customizable 65% RGB keyboard. | 3 | A customizable 65% RGB keyboard. |
| 4 | 4 | ||
| 5 | * Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) | 5 | * Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) |
| 6 | * Hardware Supported: KBD67 Mk.II RGB V1, V2, and V3 | 6 | * Hardware Supported: KBD67 Mk.II RGB V1, V2, V3 and V4 |
| 7 | * Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) | 7 | * Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) |
| 8 | 8 | ||
| 9 | There are three versions of the KBD67 MKII RGB. Please use the appropriate firmware for your board. | 9 | There are four versions of the KBD67 MKII RGB. Please use the appropriate firmware for your board. |
| 10 | 10 | ||
| 11 | * V1: STM32F303 (Arm), takes `.bin` files | 11 | * V1: STM32F303 (Arm), takes `.bin` files |
| 12 | * V2: ATmega32U4 (AVR), takes `.hex` files | 12 | * V2: ATmega32U4 (AVR), takes `.hex` files |
| 13 | * V3: Atmega32U4 (AVR), takes `.bin` files | 13 | * V3 and V4: Atmega32U4 (AVR), takes `.bin` files |
| 14 | 14 | ||
| 15 | Make example for this keyboard (after setting up your build environment): | 15 | Make example for this keyboard (after setting up your build environment): |
| 16 | 16 | ||
| 17 | make kbdfans/kbd67/mkiirgb/v1:default # Arm (STM32F303) | 17 | make kbdfans/kbd67/mkiirgb/v1:default # Arm (STM32F303+IS31FL3731) |
| 18 | make kbdfans/kbd67/mkiirgb/v2:default # AVR (ATmega32U4) | 18 | make kbdfans/kbd67/mkiirgb/v2:default # AVR (ATmega32U4+IS31FL3731) |
| 19 | make kbdfans/kbd67/mkiirgb/v3:default # AVR (ATmega32U4) | 19 | make kbdfans/kbd67/mkiirgb/v3:default # AVR (ATmega32U4+IS31FL3741) |
| 20 | 20 | make kbdfans/kbd67/mkiirgb/v4:default # AVR (ATmega32U4+SK6812MINI) | |
| 21 | |||
| 21 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | 22 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). |
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v4/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v4/config.h new file mode 100644 index 000000000..3d633bed2 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/v4/config.h | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | /* Copyright 2021 DZTECH <moyi4681@live.cn> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #include "config_common.h" | ||
| 20 | |||
| 21 | /* USB Device descriptor parameter */ | ||
| 22 | #define VENDOR_ID 0x4B42 | ||
| 23 | #define PRODUCT_ID 0x1227 | ||
| 24 | #define DEVICE_VER 0x0004 | ||
| 25 | #define MANUFACTURER KBDFANS | ||
| 26 | #define PRODUCT KBD67 MKII RGB V4 | ||
| 27 | |||
| 28 | /* key matrix size */ | ||
| 29 | #define MATRIX_ROWS 5 | ||
| 30 | #define MATRIX_COLS 15 | ||
| 31 | #define MATRIX_ROW_PINS { B1, F1, B2, B3, C6 } | ||
| 32 | #define MATRIX_COL_PINS { F7, F6, F5, F4, B0, B7, D0, D1, D2, D3, D5, D4, D6, D7, B4} | ||
| 33 | #define UNUSED_PINS | ||
| 34 | |||
| 35 | /* COL2ROW, ROW2COL*/ | ||
| 36 | #define DIODE_DIRECTION COL2ROW | ||
| 37 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 38 | #define DEBOUNCE 5 | ||
| 39 | /* disable these deprecated features by default */ | ||
| 40 | #define NO_ACTION_MACRO | ||
| 41 | #define NO_ACTION_FUNCTION | ||
| 42 | #define USB_SUSPEND_WAKEUP_DELAY 5000 | ||
| 43 | |||
| 44 | #define RGB_DI_PIN C7 | ||
| 45 | #define RGBLED_NUM 68 | ||
| 46 | #define DRIVER_LED_TOTAL RGBLED_NUM | ||
| 47 | #define RGBLIGHT_EFFECT_BREATHING | ||
| 48 | #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 49 | #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 50 | #define RGBLIGHT_EFFECT_SNAKE | ||
| 51 | #define RGBLIGHT_EFFECT_KNIGHT | ||
| 52 | #define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 53 | #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 54 | #define RGBLIGHT_EFFECT_RGB_TEST | ||
| 55 | #define RGBLIGHT_EFFECT_ALTERNATING | ||
| 56 | #define RGBLIGHT_EFFECT_TWINKLE | ||
| 57 | |||
| 58 | #ifdef RGB_MATRIX_ENABLE | ||
| 59 | #define RGB_MATRIX_KEYPRESSES // reacts to keypresses | ||
| 60 | #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended | ||
| 61 | #define RGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
| 62 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. | ||
| 63 | #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL | ||
| 64 | #define RGB_MATRIX_HUE_STEP 8 | ||
| 65 | #define RGB_MATRIX_SAT_STEP 8 | ||
| 66 | #define RGB_MATRIX_VAL_STEP 8 | ||
| 67 | #define RGB_MATRIX_SPD_STEP 10 | ||
| 68 | #endif | ||
| 69 | |||
| 70 | #define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 | ||
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v4/readme.md b/keyboards/kbdfans/kbd67/mkiirgb/v4/readme.md new file mode 100644 index 000000000..b603992f6 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/v4/readme.md | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | # KBD67MKIIRGBV4 | ||
| 2 | |||
| 3 | A customizable 80% keyboard. | ||
| 4 | |||
| 5 | * Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) | ||
| 6 | * Hardware Supported: KBDFANS | ||
| 7 | * Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) | ||
| 8 | |||
| 9 | Make example for this keyboard (after setting up your build environment): | ||
| 10 | |||
| 11 | make kbdfans/kbd67/mkiirgb/v4:default | ||
| 12 | |||
| 13 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
| 14 | |||
| 15 | ## Bootloader Enter the bootloader in 3 ways: | ||
| 16 | * **Bootmagic reset**: Hold down esc in the keyboard then replug | ||
| 17 | * **Physical reset button**: Briefly press the button on the back of the PCB | ||
| 18 | * **Keycode in layout**: Press the key mapped to `RESET` \ No newline at end of file | ||
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v4/rules.mk b/keyboards/kbdfans/kbd67/mkiirgb/v4/rules.mk new file mode 100644 index 000000000..bf2c1d1a6 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/v4/rules.mk | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = lufa-ms | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
| 11 | MOUSEKEY_ENABLE = no # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | NKRO_ENABLE = yes # Enable N-Key Rollover | ||
| 16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 17 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 18 | AUDIO_ENABLE = no # Audio output | ||
| 19 | RGB_MATRIX_ENABLE = yes | ||
| 20 | RGB_MATRIX_DRIVER = WS2812 | ||
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c b/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c new file mode 100644 index 000000000..3c4b81132 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | /* Copyright 2021 DZTECH <moyi4681@live.cn> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include "v4.h" | ||
| 18 | |||
| 19 | #ifdef RGB_MATRIX_ENABLE | ||
| 20 | |||
| 21 | led_config_t g_led_config = { | ||
| 22 | { | ||
| 23 | { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, | ||
| 24 | { 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, | ||
| 25 | { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,NO_LED, 43 }, | ||
| 26 | { 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, NO_LED,45, 44 }, | ||
| 27 | { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, NO_LED,65, 66 } | ||
| 28 | }, { | ||
| 29 | {0,0},{15,0},{30,0},{45,0},{60,0},{75,0},{90,0},{105,0},{120,0},{135,0},{150,0},{165,0},{180,0},{203,0},{224,0}, | ||
| 30 | {224,16},{206,16},{188,16},{173,16},{158,16},{143,16},{128,16},{113,16},{98,16},{83,16}, {68,16},{53,16},{38,16},{23,16},{4,16}, | ||
| 31 | {6,32},{26,32},{41,32},{56,32},{71,32},{86,32},{101,32},{116,32},{131,32},{146,32},{161,32},{176,32},{201,32},{224,32}, | ||
| 32 | {224,48},{210,48},{189,48},{169,48},{154,48},{139,48},{124,48},{109,48},{94,48},{79,48},{64,48},{49,48},{34,48},{9,48}, | ||
| 33 | {2,64},{21,64},{39,64},{96,64},{152,64},{171,64},{195,64},{210,64},{224,64} | ||
| 34 | }, { | ||
| 35 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 36 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 37 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 38 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 39 | 1, 1, 1, 4, 1, 1, 1, 1, 1 | ||
| 40 | } }; | ||
| 41 | |||
| 42 | __attribute__ ((weak)) | ||
| 43 | void rgb_matrix_indicators_user(void) { | ||
| 44 | if (host_keyboard_led_state().caps_lock) { | ||
| 45 | rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); | ||
| 46 | } | ||
| 47 | } | ||
| 48 | |||
| 49 | #endif | ||
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.h b/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.h new file mode 100644 index 000000000..da507403d --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.h | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /* Copyright 2021 DZTECH <moyi4681@Live.cn> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | #define XXX KC_NO | ||
| 19 | #include "quantum.h" | ||
| 20 | #define LAYOUT_65_ansi_blocker( \ | ||
| 21 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ | ||
| 22 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ | ||
| 23 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, k2C, K2E, \ | ||
| 24 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ | ||
| 25 | K40, K41, K42, K45, K49, K4A, K4B, K4D, K4E \ | ||
| 26 | ) { \ | ||
| 27 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ | ||
| 28 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ | ||
| 29 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, k2C, XXX, K2E }, \ | ||
| 30 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E }, \ | ||
| 31 | { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, XXX, K4D, K4E } \ | ||
| 32 | } | ||
