From 74573e4f12a91c30b6c1f36996c7d28ff0dddfff Mon Sep 17 00:00:00 2001 From: skyloong Date: Fri, 28 Jul 2023 14:15:50 +0800 Subject: [PATCH 01/14] Create GK61 PRO_48 Keyboard. --- keyboards/skyloong/gk61/pro_48/config.h | 20 + keyboards/skyloong/gk61/pro_48/halconf.h | 7 + keyboards/skyloong/gk61/pro_48/info.json | 352 ++++++++++++++++++ .../gk61/pro_48/keymaps/default/keymap.c | 44 +++ .../skyloong/gk61/pro_48/keymaps/via/keymap.c | 68 ++++ .../skyloong/gk61/pro_48/keymaps/via/rules.mk | 2 + keyboards/skyloong/gk61/pro_48/mcuconf.h | 11 + keyboards/skyloong/gk61/pro_48/pro_48.c | 156 ++++++++ keyboards/skyloong/gk61/pro_48/readme.md | 33 ++ keyboards/skyloong/gk61/pro_48/rules.mk | 1 + 10 files changed, 694 insertions(+) create mode 100644 keyboards/skyloong/gk61/pro_48/config.h create mode 100644 keyboards/skyloong/gk61/pro_48/halconf.h create mode 100644 keyboards/skyloong/gk61/pro_48/info.json create mode 100644 keyboards/skyloong/gk61/pro_48/keymaps/default/keymap.c create mode 100644 keyboards/skyloong/gk61/pro_48/keymaps/via/keymap.c create mode 100644 keyboards/skyloong/gk61/pro_48/keymaps/via/rules.mk create mode 100644 keyboards/skyloong/gk61/pro_48/mcuconf.h create mode 100644 keyboards/skyloong/gk61/pro_48/pro_48.c create mode 100644 keyboards/skyloong/gk61/pro_48/readme.md create mode 100644 keyboards/skyloong/gk61/pro_48/rules.mk diff --git a/keyboards/skyloong/gk61/pro_48/config.h b/keyboards/skyloong/gk61/pro_48/config.h new file mode 100644 index 000000000000..6333fcb3f320 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/config.h @@ -0,0 +1,20 @@ +// Copyright 2023 linlin012 (@linlin012) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + + +#define DRIVER_COUNT 1 +#define RGB_MATRIX_LED_COUNT 64 +#define CAPS_LOCK_INDEX 28 +#define WIN_MOD_INDEX 16 +#define MAC_MOD_INDEX 17 +#define WIN_LOCK_INDEX 54 + +/* RGB Matrix Animation modes. Explicitly enabled + * For full list of effects, see: + * https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects + */ + +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS diff --git a/keyboards/skyloong/gk61/pro_48/halconf.h b/keyboards/skyloong/gk61/pro_48/halconf.h new file mode 100644 index 000000000000..5ac56913fc30 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/halconf.h @@ -0,0 +1,7 @@ +// Copyright 2023 linlin012 (@linlin012) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/skyloong/gk61/pro_48/info.json b/keyboards/skyloong/gk61/pro_48/info.json new file mode 100644 index 000000000000..7d25f0031433 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/info.json @@ -0,0 +1,352 @@ +{ + "manufacturer": "skyloong", + "keyboard_name": "gk61 pro 48", + "maintainer": "NaturalZh", + "bootloader": "stm32duino", + + "diode_direction": "ROW2COL", + "encoder": { + "rotary": [ + {"pin_a": "A2", "pin_b": "A3", "resolution": 2} + ] + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "build": { + "debounce_type": "asym_eager_defer_pk" + }, + "matrix_pins": { + "cols": ["B13", "A0", "A1", "B14", "B15", "A8", "A9", "A10", "A15", "B3", "B4", "B5", "B8", "B9"], + "rows": ["B10", "B1", "B0", "A7", "A6"] + }, + "processor": "STM32F103", + "rgb_matrix": { + "animations": { + "alphas_mods": false, + "band_pinwheel_sat":false, + "band_pinwheel_val": false, + "band_sat": false, + "band_spiral_sat": false, + "band_spiral_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "dual_beacom": true, + "gradient_left_right": false, + "gradient_up_down": false, + "hue_breathing": false, + "hue_pendulum": false, + "hue_wave": false, + "jellybean_raindrops": true, + "pixel_fractal": false, + "pixel_rain": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "ranbow_beacon": true, + "typing_heatmap":true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive_multiwide": true, + "solid_reactive_multinexus": true, + "splash": true, + "solid_splash": true + }, + "driver": "IS31FL3743A", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 49, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 65, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 81, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 97, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 113, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 129, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 145, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 162, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 178, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 194, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 218, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 13, "flags": 4}, + {"matrix": [1, 1], "x": 24, "y": 13, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 13, "flags": 4}, + {"matrix": [1, 3], "x": 57, "y": 13, "flags": 4}, + {"matrix": [1, 4], "x": 73, "y": 13, "flags": 4}, + {"matrix": [1, 5], "x": 89, "y": 13, "flags": 4}, + {"matrix": [1, 6], "x": 105, "y": 13, "flags": 4}, + {"matrix": [1, 7], "x": 121, "y": 13, "flags": 4}, + {"matrix": [1, 8], "x": 137, "y": 13, "flags": 4}, + {"matrix": [1, 9], "x": 153, "y": 13, "flags": 4}, + {"matrix": [1, 10], "x": 170, "y": 13, "flags": 4}, + {"matrix": [1, 11], "x": 186, "y": 13, "flags": 4}, + {"matrix": [1, 12], "x": 202, "y": 13, "flags": 4}, + {"matrix": [1, 13], "x": 222, "y": 13, "flags": 4}, + {"matrix": [2, 0], "x": 6, "y": 26, "flags": 4}, + {"matrix": [2, 1], "x": 28, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 61, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 77, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 93, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 109, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 125, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 141, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 157, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 174, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 190, "y": 26, "flags": 4}, + {"matrix": [2, 13], "x": 216, "y": 26, "flags": 4}, + {"matrix": [3, 0], "x": 10, "y": 51, "flags": 4}, + {"matrix": [3, 1], "x": 36, "y": 51, "flags": 4}, + {"matrix": [3, 2], "x": 53, "y": 51, "flags": 4}, + {"matrix": [3, 3], "x": 69, "y": 51, "flags": 4}, + {"matrix": [3, 4], "x": 85, "y": 51, "flags": 4}, + {"matrix": [3, 5], "x": 101, "y": 51, "flags": 4}, + {"matrix": [3, 6], "x": 117, "y": 51, "flags": 4}, + {"matrix": [3, 7], "x": 133, "y": 51, "flags": 4}, + {"matrix": [3, 8], "x": 149, "y": 51, "flags": 4}, + {"matrix": [3, 9], "x": 166, "y": 51, "flags": 4}, + {"matrix": [3, 10], "x": 182, "y": 51, "flags": 4}, + {"matrix": [3, 12], "x": 212, "y": 51, "flags": 4}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 42, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 75, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 103, "y": 64, "flags": 4}, + {"matrix": [4, 6], "x": 103, "y": 64, "flags": 4}, + {"matrix": [4, 8], "x": 131, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 163, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 184, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 204, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 4} + ], + "max_brightness": 200, + "hue_steps": 20, + "sat_steps": 20, + "speed_steps": 20, + "val_steps": 20 + }, + "url": "https://github.com/JZ-Skyloong", + "usb": { + "device_version": "1.0.0", + "force_nkro": true, + "pid": "0x6A62", + "vid": "0x1EA7", + "max_power": 380 + }, + "community_layouts": ["60_ansi"], + "layouts": { + "LAYOUT_all": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1}, + {"matrix": [1, 2], "x": 2.5, "y": 1}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1}, + {"matrix": [1, 5], "x": 5.5, "y": 1}, + {"matrix": [1, 6], "x": 6.5, "y": 1}, + {"matrix": [1, 7], "x": 7.5, "y": 1}, + {"matrix": [1, 8], "x": 8.5, "y": 1}, + {"matrix": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2}, + {"matrix": [2, 2], "x": 2.75, "y": 2}, + {"matrix": [2, 3], "x": 3.75, "y": 2}, + {"matrix": [2, 4], "x": 4.75, "y": 2}, + {"matrix": [2, 5], "x": 5.75, "y": 2}, + {"matrix": [2, 6], "x": 6.75, "y": 2}, + {"matrix": [2, 7], "x": 7.75, "y": 2}, + {"matrix": [2, 8], "x": 8.75, "y": 2}, + {"matrix": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.25, "y": 3}, + {"matrix": [3, 3], "x": 4.25, "y": 3}, + {"matrix": [3, 4], "x": 5.25, "y": 3}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + {"matrix": [3, 6], "x": 7.25, "y": 3}, + {"matrix": [3, 7], "x": 8.25, "y": 3}, + {"matrix": [3, 8], "x": 9.25, "y": 3}, + {"matrix": [3, 9], "x": 10.25, "y": 3}, + {"matrix": [3, 10], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 4], "x": 3.75, "y": 4, "w": 2.5}, + {"matrix": [4, 5], "x": 6.25, "y": 3.7, "h": 0.4, "w":1.25}, + {"matrix": [4, 6], "x": 6.25, "y": 4.3, "h": 0.4, "w":1.25}, + {"matrix": [4, 8], "x": 7.5, "y": 4, "w": 2.5}, + {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25} + ] + }, + "LAYOUT_60_ansi": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1}, + {"matrix": [1, 2], "x": 2.5, "y": 1}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1}, + {"matrix": [1, 5], "x": 5.5, "y": 1}, + {"matrix": [1, 6], "x": 6.5, "y": 1}, + {"matrix": [1, 7], "x": 7.5, "y": 1}, + {"matrix": [1, 8], "x": 8.5, "y": 1}, + {"matrix": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2}, + {"matrix": [2, 2], "x": 2.75, "y": 2}, + {"matrix": [2, 3], "x": 3.75, "y": 2}, + {"matrix": [2, 4], "x": 4.75, "y": 2}, + {"matrix": [2, 5], "x": 5.75, "y": 2}, + {"matrix": [2, 6], "x": 6.75, "y": 2}, + {"matrix": [2, 7], "x": 7.75, "y": 2}, + {"matrix": [2, 8], "x": 8.75, "y": 2}, + {"matrix": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.25, "y": 3}, + {"matrix": [3, 3], "x": 4.25, "y": 3}, + {"matrix": [3, 4], "x": 5.25, "y": 3}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + {"matrix": [3, 6], "x": 7.25, "y": 3}, + {"matrix": [3, 7], "x": 8.25, "y": 3}, + {"matrix": [3, 8], "x": 9.25, "y": 3}, + {"matrix": [3, 9], "x": 10.25, "y": 3}, + {"matrix": [3, 10], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 5], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25} + ] + }, + "LAYOUT_60_ansi_space_split": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1}, + {"matrix": [1, 2], "x": 2.5, "y": 1}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1}, + {"matrix": [1, 5], "x": 5.5, "y": 1}, + {"matrix": [1, 6], "x": 6.5, "y": 1}, + {"matrix": [1, 7], "x": 7.5, "y": 1}, + {"matrix": [1, 8], "x": 8.5, "y": 1}, + {"matrix": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2}, + {"matrix": [2, 2], "x": 2.75, "y": 2}, + {"matrix": [2, 3], "x": 3.75, "y": 2}, + {"matrix": [2, 4], "x": 4.75, "y": 2}, + {"matrix": [2, 5], "x": 5.75, "y": 2}, + {"matrix": [2, 6], "x": 6.75, "y": 2}, + {"matrix": [2, 7], "x": 7.75, "y": 2}, + {"matrix": [2, 8], "x": 8.75, "y": 2}, + {"matrix": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.25, "y": 3}, + {"matrix": [3, 3], "x": 4.25, "y": 3}, + {"matrix": [3, 4], "x": 5.25, "y": 3}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + {"matrix": [3, 6], "x": 7.25, "y": 3}, + {"matrix": [3, 7], "x": 8.25, "y": 3}, + {"matrix": [3, 8], "x": 9.25, "y": 3}, + {"matrix": [3, 9], "x": 10.25, "y": 3}, + {"matrix": [3, 10], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 4], "x": 3.75, "y": 4, "w": 2.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4, "w": 1.25}, + {"matrix": [4, 8], "x": 7.5, "y": 4, "w": 2.5}, + {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25} + ] + } + } +} diff --git a/keyboards/skyloong/gk61/pro_48/keymaps/default/keymap.c b/keyboards/skyloong/gk61/pro_48/keymaps/default/keymap.c new file mode 100644 index 000000000000..9534f25d80f2 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +// Copyright 2021 JZ-Skyloong (@JZ-Skyloong) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bsp│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Tab│ Q │ W │ E | R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Cap│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ |Ent│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Sft│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ |Sft| │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Ctl│GUI│Alt│ │Spc│Mut│ │ |Spc|Alt│App│Ctl│ │Mo1| + * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + */ + [0] = LAYOUT_all( + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_MUTE, KC_SPC, KC_RALT, KC_APP, KC_RCTL, MO(1) + ), + + [1] = LAYOUT_all( + 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, _______, + _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) } +}; +#endif + diff --git a/keyboards/skyloong/gk61/pro_48/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro_48/keymaps/via/keymap.c new file mode 100644 index 000000000000..e63830f519a7 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/keymaps/via/keymap.c @@ -0,0 +1,68 @@ +// Copyright 2021 JZ-Skyloong (@JZ-Skyloong) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum layer_names { + _WIN, + _MAC, + _WIN_INDEX, + _MAC_INDEX +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bsp│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Tab│ Q │ W │ E | R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Cap│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ |Ent│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Sft│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ |Sft| │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Ctl│GUI│Alt│ │Spc│Spc│Mut│ |Spc|Alt│App│Ctl│ │Mox| + * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + */ + [_WIN] = LAYOUT_all( + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_MUTE, KC_SPC, KC_RALT, KC_APP, KC_RCTL, MO(_WIN_INDEX) + ), + + [_MAC] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LALT, KC_LGUI, _______, _______, _______, _______, KC_RGUI, KC_RALT, _______, MO(_MAC_INDEX) + ), + + [_WIN_INDEX] = LAYOUT_all( + 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, + _______, _______, TO(0), TO(1), _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_RMOD, RGB_RMOD, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, KC_UP, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______ + ), + + [_MAC_INDEX] = LAYOUT_all( + KC_GRV , KC_F14, KC_F15, C(KC_UP), G(KC_D), G(KC_SPC), LSG(KC_4), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, + _______, _______, TO(0), TO(1), _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_RMOD, RGB_RMOD, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, KC_UP, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______ + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_WIN] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_MAC] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [_WIN_INDEX] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) }, + [_MAC_INDEX] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) } +}; +#endif + diff --git a/keyboards/skyloong/gk61/pro_48/keymaps/via/rules.mk b/keyboards/skyloong/gk61/pro_48/keymaps/via/rules.mk new file mode 100644 index 000000000000..f1adcab005e8 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/skyloong/gk61/pro_48/mcuconf.h b/keyboards/skyloong/gk61/pro_48/mcuconf.h new file mode 100644 index 000000000000..419302858432 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/mcuconf.h @@ -0,0 +1,11 @@ +// Copyright 2023 linlin012 (@linlin012) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include_next + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_I2C_USE_DMA +#define STM32_I2C_USE_DMA FALSE diff --git a/keyboards/skyloong/gk61/pro_48/pro_48.c b/keyboards/skyloong/gk61/pro_48/pro_48.c new file mode 100644 index 000000000000..2afea369223d --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/pro_48.c @@ -0,0 +1,156 @@ +// Copyright 2023 linlin012 (@linlin012) +// SPDX-License-Identifier: GPL-2.0-or-later +#include "quantum.h" + +const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, CS1_SW1, CS2_SW1, CS3_SW1}, + {0, CS1_SW2, CS2_SW2, CS3_SW2}, + {0, CS1_SW3, CS2_SW3, CS3_SW3}, + {0, CS1_SW4, CS2_SW4, CS3_SW4}, + {0, CS1_SW5, CS2_SW5, CS3_SW5}, + {0, CS1_SW6, CS2_SW6, CS3_SW6}, + {0, CS1_SW7, CS2_SW7, CS3_SW7}, + {0, CS1_SW8, CS2_SW8, CS3_SW8}, + {0, CS1_SW9, CS2_SW9, CS3_SW9}, + {0, CS1_SW10, CS2_SW10, CS3_SW10}, + {0, CS1_SW11, CS2_SW11, CS3_SW11}, + {0, CS16_SW1, CS17_SW1, CS18_SW1}, + {0, CS16_SW2, CS17_SW2, CS18_SW2}, + {0, CS16_SW3, CS17_SW3, CS18_SW3}, + + {0, CS4_SW1, CS5_SW1, CS6_SW1}, + {0, CS4_SW2, CS5_SW2, CS6_SW2}, + {0, CS4_SW3, CS5_SW3, CS6_SW3}, + {0, CS4_SW4, CS5_SW4, CS6_SW4}, + {0, CS4_SW5, CS5_SW5, CS6_SW5}, + {0, CS4_SW6, CS5_SW6, CS6_SW6}, + {0, CS4_SW7, CS5_SW7, CS6_SW7}, + {0, CS4_SW8, CS5_SW8, CS6_SW8}, + {0, CS4_SW9, CS5_SW9, CS6_SW9}, + {0, CS4_SW10, CS5_SW10, CS6_SW10}, + {0, CS4_SW11, CS5_SW11, CS6_SW11}, + {0, CS16_SW4, CS17_SW4, CS18_SW4}, + {0, CS16_SW5, CS17_SW5, CS18_SW5}, + {0, CS16_SW6, CS17_SW6, CS18_SW6}, + + {0, CS7_SW1, CS8_SW1, CS9_SW1}, + {0, CS7_SW2, CS8_SW2, CS9_SW2}, + {0, CS7_SW3, CS8_SW3, CS9_SW3}, + {0, CS7_SW4, CS8_SW4, CS9_SW4}, + {0, CS7_SW5, CS8_SW5, CS9_SW5}, + {0, CS7_SW6, CS8_SW6, CS9_SW6}, + {0, CS7_SW7, CS8_SW7, CS9_SW7}, + {0, CS7_SW8, CS8_SW8, CS9_SW8}, + {0, CS7_SW9, CS8_SW9, CS9_SW9}, + {0, CS7_SW10, CS8_SW10, CS9_SW10}, + {0, CS7_SW11, CS8_SW11, CS9_SW11}, + {0, CS16_SW7, CS17_SW7, CS18_SW7}, + {0, CS16_SW8, CS17_SW8, CS18_SW8}, + + {0, CS10_SW1, CS11_SW1, CS12_SW1}, + {0, CS10_SW2, CS11_SW2, CS12_SW2}, + {0, CS10_SW3, CS11_SW3, CS12_SW3}, + {0, CS10_SW4, CS11_SW4, CS12_SW4}, + {0, CS10_SW5, CS11_SW5, CS12_SW5}, + {0, CS10_SW6, CS11_SW6, CS12_SW6}, + {0, CS10_SW7, CS11_SW7, CS12_SW7}, + {0, CS10_SW8, CS11_SW8, CS12_SW8}, + {0, CS10_SW9, CS11_SW9, CS12_SW9}, + {0, CS10_SW10, CS11_SW10, CS12_SW10}, + {0, CS10_SW11, CS11_SW11, CS12_SW11}, + {0, CS16_SW9, CS17_SW9, CS18_SW9}, + + {0, CS13_SW1, CS14_SW1, CS15_SW1}, + {0, CS13_SW2, CS14_SW2, CS15_SW2}, + {0, CS13_SW3, CS14_SW3, CS15_SW3}, + {0, CS13_SW4, CS14_SW4, CS15_SW4}, + {0, CS13_SW5, CS14_SW5, CS15_SW5}, + {0, CS13_SW5, CS14_SW5, CS15_SW5}, + {0, CS13_SW6, CS14_SW6, CS15_SW6}, + {0, CS13_SW7, CS14_SW7, CS15_SW7}, + {0, CS13_SW8, CS14_SW8, CS15_SW8}, + {0, CS13_SW9, CS14_SW9, CS15_SW9}, + {0, CS13_SW10, CS14_SW10, CS15_SW10} +}; + +#if defined(RGB_MATRIX_ENABLE) /*&& defined(CAPS_LOCK_INDEX)*/ + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + switch (keycode) { +# ifdef RGB_MATRIX_ENABLE + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_set_color_all(0, 0, 0); + } break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + } break; + } + } + return false; +# endif + } + return true; +} + +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { + return false; + } + // RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue); + + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 255, 255, 255); + } else { + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 0, 0, 0); + } + } + + switch (get_highest_layer(layer_state)) { + case 0:{ + RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255); + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); + } + } break; + + case 1:{ + RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255); + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0); + } + } break; + + case 2:{ + RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255); + RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255); + } break; + + case 3:{ + RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255); + RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255); + } break; + + default:{ + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0); + RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); + } + } + } + return false; +} +#endif diff --git a/keyboards/skyloong/gk61/pro_48/readme.md b/keyboards/skyloong/gk61/pro_48/readme.md new file mode 100644 index 000000000000..babfec4a3b4c --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/readme.md @@ -0,0 +1,33 @@ +# GK61 PRO 48 + +![GK61 PRO](https://i.imgur.com/DTetyVLh.jpg) + +## The PCB features: +* QMK & VIA compatibility +* RGB Matrix backlight +* The space bar position switch can be interchanged with encoder module. + + +The following is the QMK Firmware for the Destop 60% keylayout - designed in Dongguan Jizhi Electronic Technology Co., Ltd + +* Keyboard Maintainer: [NaturalZh](https://github.com/NaturalZh) +* Hardware Supported: DestopPCB for Skyloong keylayout 60%, STM32F103C8T6 +* Hardware Availability: http://www.skyloong.com.cn https://skyloong.vip + +Make example for this keyboard (after setting up your build environment): + + make skyloong/gk61/pro_48:default + +Flashing example for this keyboard: + + make skyloong/gk61/pro_48:default:flash + +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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/skyloong/gk61/pro_48/rules.mk b/keyboards/skyloong/gk61/pro_48/rules.mk new file mode 100644 index 000000000000..3bbd2614291a --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/rules.mk @@ -0,0 +1 @@ +# File intentionally blank From 0afaf8761e7220adbfa0ea9d64db0b15837bea5d Mon Sep 17 00:00:00 2001 From: skyloong Date: Mon, 31 Jul 2023 10:56:27 +0800 Subject: [PATCH 02/14] update pro.c and config.h to save power when USB suspend. --- keyboards/skyloong/gk61/pro_48/config.h | 1 + keyboards/skyloong/gk61/pro_48/pro_48.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/keyboards/skyloong/gk61/pro_48/config.h b/keyboards/skyloong/gk61/pro_48/config.h index 6333fcb3f320..b99cfce0e99b 100644 --- a/keyboards/skyloong/gk61/pro_48/config.h +++ b/keyboards/skyloong/gk61/pro_48/config.h @@ -10,6 +10,7 @@ #define WIN_MOD_INDEX 16 #define MAC_MOD_INDEX 17 #define WIN_LOCK_INDEX 54 +#define SDB A4 /* RGB Matrix Animation modes. Explicitly enabled * For full list of effects, see: diff --git a/keyboards/skyloong/gk61/pro_48/pro_48.c b/keyboards/skyloong/gk61/pro_48/pro_48.c index 2afea369223d..fb03a53b5d32 100644 --- a/keyboards/skyloong/gk61/pro_48/pro_48.c +++ b/keyboards/skyloong/gk61/pro_48/pro_48.c @@ -154,3 +154,20 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { return false; } #endif + +void suspend_power_down_kb() { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_set_color_all(0, 0, 0); + writePinLow(SDB); +} + +void suspend_wakeup_init_kb() { + writePinHigh(SDB); + rgb_matrix_set_flags(LED_FLAG_ALL); +} + + +void board_init(void) { + setPinOutput(SDB); + writePinHigh(SDB); +} From e535cdcf65e5c95fe63ea6a5b0a8fe25dad0c464 Mon Sep 17 00:00:00 2001 From: skyloong <92424712+JZ-Skyloong@users.noreply.github.com> Date: Tue, 5 Sep 2023 16:33:43 +0800 Subject: [PATCH 03/14] Update keyboards/skyloong/gk61/pro_48/info.json OK,thank you. Co-authored-by: Drashna Jaelre --- keyboards/skyloong/gk61/pro_48/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_48/info.json b/keyboards/skyloong/gk61/pro_48/info.json index 7d25f0031433..bfefdd0d899b 100644 --- a/keyboards/skyloong/gk61/pro_48/info.json +++ b/keyboards/skyloong/gk61/pro_48/info.json @@ -65,7 +65,7 @@ "splash": true, "solid_splash": true }, - "driver": "IS31FL3743A", + "driver": "is31fl3743a", "layout": [ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, From 9e12e9aef519d6e91e4b6dcdc8cb587ea79de373 Mon Sep 17 00:00:00 2001 From: skyloong Date: Fri, 8 Sep 2023 15:58:59 +0800 Subject: [PATCH 04/14] update info.json --- keyboards/skyloong/gk61/pro_48/info.json | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_48/info.json b/keyboards/skyloong/gk61/pro_48/info.json index bfefdd0d899b..524abb96f933 100644 --- a/keyboards/skyloong/gk61/pro_48/info.json +++ b/keyboards/skyloong/gk61/pro_48/info.json @@ -30,33 +30,22 @@ "processor": "STM32F103", "rgb_matrix": { "animations": { - "alphas_mods": false, - "band_pinwheel_sat":false, - "band_pinwheel_val": false, - "band_sat": false, - "band_spiral_sat": false, - "band_spiral_val": true, "breathing": true, + "band_spiral_val": true, "cycle_all": true, "cycle_left_right": true, + "cycle_up_down": true, "cycle_out_in": true, "cycle_out_in_dual": true, + "rainbow_moving_chevron": true, "cycle_pinwheel": true, "cycle_spiral": true, - "cycle_up_down": true, "dual_beacom": true, - "gradient_left_right": false, - "gradient_up_down": false, - "hue_breathing": false, - "hue_pendulum": false, - "hue_wave": false, - "jellybean_raindrops": true, - "pixel_fractal": false, - "pixel_rain": true, - "rainbow_moving_chevron": true, + "ranbow_beacon": true, "rainbow_pinwheels": true, "raindrops": true, - "ranbow_beacon": true, + "jellybean_raindrops": true, + "pixel_rain": true, "typing_heatmap":true, "digital_rain": true, "solid_reactive_simple": true, From 47f8e70b3f0d9d65f4c224dd20b16f15e41ef3e4 Mon Sep 17 00:00:00 2001 From: skyloong Date: Fri, 8 Sep 2023 16:33:58 +0800 Subject: [PATCH 05/14] update layer indicator --- keyboards/skyloong/gk61/pro_48/config.h | 7 +- keyboards/skyloong/gk61/pro_48/pro_48.c | 157 ++++++++++++++++-------- 2 files changed, 104 insertions(+), 60 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_48/config.h b/keyboards/skyloong/gk61/pro_48/config.h index b99cfce0e99b..48ce33437acb 100644 --- a/keyboards/skyloong/gk61/pro_48/config.h +++ b/keyboards/skyloong/gk61/pro_48/config.h @@ -9,13 +9,8 @@ #define CAPS_LOCK_INDEX 28 #define WIN_MOD_INDEX 16 #define MAC_MOD_INDEX 17 -#define WIN_LOCK_INDEX 54 #define SDB A4 -/* RGB Matrix Animation modes. Explicitly enabled - * For full list of effects, see: - * https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects - */ - +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS diff --git a/keyboards/skyloong/gk61/pro_48/pro_48.c b/keyboards/skyloong/gk61/pro_48/pro_48.c index fb03a53b5d32..317054bfa9a2 100644 --- a/keyboards/skyloong/gk61/pro_48/pro_48.c +++ b/keyboards/skyloong/gk61/pro_48/pro_48.c @@ -1,7 +1,12 @@ // Copyright 2023 linlin012 (@linlin012) // SPDX-License-Identifier: GPL-2.0-or-later #include "quantum.h" +int FN_WIN = 0; +int FN_MAC = 0; +int L_WIN = 0; +int L_MAC = 0; +#if defined(RGB_MATRIX_ENABLE) /*&& defined(CAPS_LOCK_INDEX)*/ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver @@ -79,95 +84,139 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, CS13_SW10, CS14_SW10, CS15_SW10} }; -#if defined(RGB_MATRIX_ENABLE) /*&& defined(CAPS_LOCK_INDEX)*/ - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (!process_record_user(keycode, record)) { - return false; - } - switch (keycode) { -# ifdef RGB_MATRIX_ENABLE - case RGB_TOG: - if (record->event.pressed) { - switch (rgb_matrix_get_flags()) { - case LED_FLAG_ALL: { - rgb_matrix_set_flags(LED_FLAG_NONE); - rgb_matrix_set_color_all(0, 0, 0); - } break; - default: { - rgb_matrix_set_flags(LED_FLAG_ALL); - } break; - } - } - return false; -# endif - } - return true; -} - bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { return false; } - // RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue); - if (host_keyboard_led_state().caps_lock) { - RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 255, 255, 255); - } else { - if (!rgb_matrix_get_flags()) { - RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 0, 0, 0); - } - } - - switch (get_highest_layer(layer_state)) { - case 0:{ + switch (get_highest_layer(layer_state)) { + case 2:{ RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255); if (!rgb_matrix_get_flags()) { RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); - } + } } break; - - case 1:{ + case 3:{ RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255); if (!rgb_matrix_get_flags()) { RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0); - } + } } break; - case 2:{ - RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255); - RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255); - } break; - - case 3:{ - RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255); - RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255); - } break; + case 0:{ + if (L_WIN) { + RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255); + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); + } + }else{ + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0); + } + } + } break; + + case 1:{ + if (L_MAC) { + RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255); + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0); + } + }else{ + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); + } + } + } break; default:{ - if (!rgb_matrix_get_flags()) { + if (!rgb_matrix_get_flags()) { RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0); RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); - } + } } } return false; } + #endif void suspend_power_down_kb() { - rgb_matrix_set_flags(LED_FLAG_NONE); - rgb_matrix_set_color_all(0, 0, 0); +# ifdef RGB_MATRIX_ENABLE writePinLow(SDB); +# endif } void suspend_wakeup_init_kb() { +# ifdef RGB_MATRIX_ENABLE writePinHigh(SDB); rgb_matrix_set_flags(LED_FLAG_ALL); +# endif } +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + switch (keycode) { +# ifdef RGB_MATRIX_ENABLE + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_set_color_all(0, 0, 0); + } break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + } break; + } + } + return false; +# endif + case TO(0): + if (record->event.pressed) { + L_WIN = 1; + set_single_persistent_default_layer(0); // Save default layer 0 to eeprom + } else { + L_WIN = 0; + } + return true; // continue all further processing of this key + + case MO(2): + if (record->event.pressed) { + FN_WIN = 1; + } else { + FN_WIN = 0; + } + return true; // continue all further processing of this key + + case TO(1): + if (record->event.pressed) { + L_MAC = 1; + set_single_persistent_default_layer(1); //Save default layer 1 to eeprom + } else { + L_MAC = 0; + } + return true; // continue all further processing of this key + + case MO(3): + if (record->event.pressed) { + FN_MAC = 1; + } else { + FN_MAC = 0; + } + return true; // continue all further processing of this key + default: + return true; + } +} void board_init(void) { + // JTAG-DP Disabled and SW-DP Disabled + AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk) | AFIO_MAPR_SWJ_CFG_DISABLE; +# ifdef RGB_MATRIX_ENABLE setPinOutput(SDB); writePinHigh(SDB); +# endif } From fd4ce49fb0831b6d7fbd8c401bbbd967e6ea5f3a Mon Sep 17 00:00:00 2001 From: skyloong Date: Sat, 9 Sep 2023 14:47:51 +0800 Subject: [PATCH 06/14] Update RGB animations---delete rainbow_beacon and rainbo_pinwheels. --- keyboards/skyloong/gk61/pro_48/info.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_48/info.json b/keyboards/skyloong/gk61/pro_48/info.json index 524abb96f933..248242ccd754 100644 --- a/keyboards/skyloong/gk61/pro_48/info.json +++ b/keyboards/skyloong/gk61/pro_48/info.json @@ -40,9 +40,7 @@ "rainbow_moving_chevron": true, "cycle_pinwheel": true, "cycle_spiral": true, - "dual_beacom": true, - "ranbow_beacon": true, - "rainbow_pinwheels": true, + "dual_beacon": true, "raindrops": true, "jellybean_raindrops": true, "pixel_rain": true, From 4a475103d613e796af23b5e054ed8f32b580b083 Mon Sep 17 00:00:00 2001 From: skyloong Date: Tue, 12 Sep 2023 09:59:12 +0800 Subject: [PATCH 07/14] Cancel force_nkro --- keyboards/skyloong/gk61/pro_48/info.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_48/info.json b/keyboards/skyloong/gk61/pro_48/info.json index 248242ccd754..66be7941183c 100644 --- a/keyboards/skyloong/gk61/pro_48/info.json +++ b/keyboards/skyloong/gk61/pro_48/info.json @@ -12,7 +12,7 @@ }, "features": { "bootmagic": true, - "command": false, + "command": true, "console": false, "encoder": true, "extrakey": true, @@ -128,7 +128,6 @@ "url": "https://github.com/JZ-Skyloong", "usb": { "device_version": "1.0.0", - "force_nkro": true, "pid": "0x6A62", "vid": "0x1EA7", "max_power": 380 From 15c0968dd0b16d2afa4c734cd673546ed6b1ecfc Mon Sep 17 00:00:00 2001 From: skyloong Date: Fri, 15 Sep 2023 19:55:15 +0800 Subject: [PATCH 08/14] Add caps lock indicator in rgb matrix. --- keyboards/skyloong/gk61/pro_48/pro_48.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/keyboards/skyloong/gk61/pro_48/pro_48.c b/keyboards/skyloong/gk61/pro_48/pro_48.c index 317054bfa9a2..d76f17b00990 100644 --- a/keyboards/skyloong/gk61/pro_48/pro_48.c +++ b/keyboards/skyloong/gk61/pro_48/pro_48.c @@ -89,6 +89,14 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { return false; } + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 255, 255, 255); + } else { + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 0, 0, 0); + } + } + switch (get_highest_layer(layer_state)) { case 2:{ RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255); From 14a0ca8d80d1b2316e843d6a551aae2a12c27205 Mon Sep 17 00:00:00 2001 From: skyloong <92424712+JZ-Skyloong@users.noreply.github.com> Date: Sat, 16 Sep 2023 09:21:03 +0800 Subject: [PATCH 09/14] Update keyboards/skyloong/gk61/pro_48/pro_48.c OK, thank you for your suggestion. Co-authored-by: Drashna Jaelre --- keyboards/skyloong/gk61/pro_48/pro_48.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_48/pro_48.c b/keyboards/skyloong/gk61/pro_48/pro_48.c index d76f17b00990..e9c1f3787da1 100644 --- a/keyboards/skyloong/gk61/pro_48/pro_48.c +++ b/keyboards/skyloong/gk61/pro_48/pro_48.c @@ -147,20 +147,17 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { return false; } -#endif -void suspend_power_down_kb() { -# ifdef RGB_MATRIX_ENABLE +void suspend_power_down_kb(void) { writePinLow(SDB); -# endif + suspend_power_down_user(); } -void suspend_wakeup_init_kb() { -# ifdef RGB_MATRIX_ENABLE +void suspend_wakeup_init_kb(void) { writePinHigh(SDB); - rgb_matrix_set_flags(LED_FLAG_ALL); -# endif + suspend_wakeup_init_user(); } +#endif bool process_record_kb(uint16_t keycode, keyrecord_t *record) { if (!process_record_user(keycode, record)) { From 62d4a3616ed40cec5f72a351c0cfa06bd34d3923 Mon Sep 17 00:00:00 2001 From: skyloong Date: Sat, 16 Sep 2023 10:03:57 +0800 Subject: [PATCH 10/14] Enable I2C DMA; Modified pro_48.c --- keyboards/skyloong/gk61/pro_48/mcuconf.h | 2 +- keyboards/skyloong/gk61/pro_48/pro_48.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_48/mcuconf.h b/keyboards/skyloong/gk61/pro_48/mcuconf.h index 419302858432..91dde6cc42bb 100644 --- a/keyboards/skyloong/gk61/pro_48/mcuconf.h +++ b/keyboards/skyloong/gk61/pro_48/mcuconf.h @@ -8,4 +8,4 @@ #define STM32_I2C_USE_I2C1 TRUE #undef STM32_I2C_USE_DMA -#define STM32_I2C_USE_DMA FALSE +#define STM32_I2C_USE_DMA TRUE diff --git a/keyboards/skyloong/gk61/pro_48/pro_48.c b/keyboards/skyloong/gk61/pro_48/pro_48.c index e9c1f3787da1..e4f64c022fde 100644 --- a/keyboards/skyloong/gk61/pro_48/pro_48.c +++ b/keyboards/skyloong/gk61/pro_48/pro_48.c @@ -1,10 +1,10 @@ // Copyright 2023 linlin012 (@linlin012) // SPDX-License-Identifier: GPL-2.0-or-later #include "quantum.h" -int FN_WIN = 0; -int FN_MAC = 0; -int L_WIN = 0; -int L_MAC = 0; +_Bool FN_WIN = 0; +_Bool FN_MAC = 0; +_Bool L_WIN = 0; +_Bool L_MAC = 0; #if defined(RGB_MATRIX_ENABLE) /*&& defined(CAPS_LOCK_INDEX)*/ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { From a7ad7e396bee09e93b591eeb807829cf1eb1a1e5 Mon Sep 17 00:00:00 2001 From: skyloong <92424712+JZ-Skyloong@users.noreply.github.com> Date: Mon, 9 Oct 2023 19:42:42 +0800 Subject: [PATCH 11/14] Update keyboards/skyloong/gk61/pro_48/info.json OK, thank you for your suggestion. Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/skyloong/gk61/pro_48/info.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_48/info.json b/keyboards/skyloong/gk61/pro_48/info.json index 66be7941183c..3a18f44c32fc 100644 --- a/keyboards/skyloong/gk61/pro_48/info.json +++ b/keyboards/skyloong/gk61/pro_48/info.json @@ -192,10 +192,10 @@ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, - {"matrix": [4, 4], "x": 3.75, "y": 4, "w": 2.5}, - {"matrix": [4, 5], "x": 6.25, "y": 3.7, "h": 0.4, "w":1.25}, - {"matrix": [4, 6], "x": 6.25, "y": 4.3, "h": 0.4, "w":1.25}, - {"matrix": [4, 8], "x": 7.5, "y": 4, "w": 2.5}, + {"matrix": [4, 4], "x": 3.75, "y": 4.5, "w": 2.5, "h": 0.5}, + {"matrix": [4, 5], "x": 3.75, "y": 4, "h": 0.5, "w":6.25}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5, "h": 0.5, "w":1.25}, + {"matrix": [4, 8], "x": 7.5, "y": 4.5, "w": 2.5, "h": 0.5}, {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25}, {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25}, {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25}, From d0c1f07e7c902dab0bdd9568a60b0c230b3c5c20 Mon Sep 17 00:00:00 2001 From: skyloong <92424712+JZ-Skyloong@users.noreply.github.com> Date: Mon, 9 Oct 2023 19:43:14 +0800 Subject: [PATCH 12/14] Update keyboards/skyloong/gk61/pro_48/info.json OK, thanks. Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/skyloong/gk61/pro_48/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_48/info.json b/keyboards/skyloong/gk61/pro_48/info.json index 3a18f44c32fc..0e49e005aa9a 100644 --- a/keyboards/skyloong/gk61/pro_48/info.json +++ b/keyboards/skyloong/gk61/pro_48/info.json @@ -267,7 +267,7 @@ {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25} ] }, - "LAYOUT_60_ansi_space_split": { + "LAYOUT_60_ansi_split_space": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0, "w": 1}, {"matrix": [0, 1], "x": 1, "y": 0}, From 6f4faefafcf1de7d48dcb545c9c75c377a37fc9b Mon Sep 17 00:00:00 2001 From: skyloong Date: Mon, 9 Oct 2023 20:00:18 +0800 Subject: [PATCH 13/14] enable encoder map in default keymap. --- keyboards/skyloong/gk61/pro_48/keymaps/default/rules.mk | 1 + 1 file changed, 1 insertion(+) create mode 100644 keyboards/skyloong/gk61/pro_48/keymaps/default/rules.mk diff --git a/keyboards/skyloong/gk61/pro_48/keymaps/default/rules.mk b/keyboards/skyloong/gk61/pro_48/keymaps/default/rules.mk new file mode 100644 index 000000000000..ee325681483f --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes From f9a55d35bd28f3a7c16a391b0ebb53ec46d07a63 Mon Sep 17 00:00:00 2001 From: skyloong Date: Tue, 10 Oct 2023 16:59:58 +0800 Subject: [PATCH 14/14] define g_suspend_state --- keyboards/skyloong/gk61/pro_48/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/skyloong/gk61/pro_48/config.h b/keyboards/skyloong/gk61/pro_48/config.h index 48ce33437acb..dc315216274f 100644 --- a/keyboards/skyloong/gk61/pro_48/config.h +++ b/keyboards/skyloong/gk61/pro_48/config.h @@ -14,3 +14,5 @@ #define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS + +#define g_suspend_state rgb_matrix_get_suspend_state()