From ae71437ed03b3f36c20013ce4affc16b3e8858fb Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Mon, 10 Oct 2022 12:38:31 +0800 Subject: [PATCH 01/17] Add support for lilly58 r2g by Mechboards --- keyboards/lily58/lily58.h | 2 ++ keyboards/lily58/r2g/config.h | 52 ++++++++++++++++++++++++++++ keyboards/lily58/r2g/info.json | 33 ++++++++++++++++++ keyboards/lily58/r2g/r2g.c | 1 + keyboards/lily58/r2g/r2g.h | 62 ++++++++++++++++++++++++++++++++++ keyboards/lily58/r2g/rules.mk | 0 6 files changed, 150 insertions(+) create mode 100644 keyboards/lily58/r2g/config.h create mode 100644 keyboards/lily58/r2g/info.json create mode 100644 keyboards/lily58/r2g/r2g.c create mode 100644 keyboards/lily58/r2g/r2g.h create mode 100644 keyboards/lily58/r2g/rules.mk diff --git a/keyboards/lily58/lily58.h b/keyboards/lily58/lily58.h index c08203003243..44edeefaf23e 100644 --- a/keyboards/lily58/lily58.h +++ b/keyboards/lily58/lily58.h @@ -6,4 +6,6 @@ #include "light.h" #elif KEYBOARD_lily58_glow_enc #include "glow_enc.h" +#elif KEYBOARD_lily58_r2g + #include "r2g.h" #endif diff --git a/keyboards/lily58/r2g/config.h b/keyboards/lily58/r2g/config.h new file mode 100644 index 000000000000..1b4d7ccf6e44 --- /dev/null +++ b/keyboards/lily58/r2g/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 F_YUUCHI + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once +#define SERIAL_USE_MULTI_TRANSACTION + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLED_NUM 12 // Number of LEDs + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT diff --git a/keyboards/lily58/r2g/info.json b/keyboards/lily58/r2g/info.json new file mode 100644 index 000000000000..a531fa2aac79 --- /dev/null +++ b/keyboards/lily58/r2g/info.json @@ -0,0 +1,33 @@ +{ + "keyboard_name": "Lily58 R2G", + "manufacturer": "Mechboards", + "url": "", + "maintainer": "Mechboards", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "usb": { + "vid": "0x04D8", + "pid": "0xEB2E", + "device_version": "1.0.0" + }, + "diode_direction": "COL2ROW", + "matrix_pins": { + "rows": ["C6", "D7", "E6", "B4", "B5"], + "cols": ["F6", "F7", "B1", "B3", "B2", "B6"] + }, + "split": { + "enabled": true, + "soft_serial_pin": "D2" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x":0, "y":0.5}, {"matrix": [0, 1], "x":1, "y":0.375}, {"matrix": [0, 2], "x":2, "y":0.125}, {"matrix": [0, 3], "x":3, "y":0}, {"matrix": [0, 4], "x":4, "y":0.125}, {"matrix": [0, 5], "x":5, "y":0.25}, {"matrix": [5, 5], "x":10.5, "y":0.25}, {"matrix": [5, 4], "x":11.5, "y":0.125}, {"matrix": [5, 3], "x":12.5, "y":0}, {"matrix": [5, 2], "x":13.5, "y":0.125}, {"matrix": [5, 1], "x":14.5, "y":0.375}, {"matrix": [5, 0], "x":15.5, "y":0.5}, + {"matrix": [1, 0], "x":0, "y":1.5}, {"matrix": [1, 1], "x":1, "y":1.375}, {"matrix": [1, 2], "x":2, "y":1.125}, {"matrix": [1, 3], "x":3, "y":1}, {"matrix": [1, 4], "x":4, "y":1.125}, {"matrix": [1, 5], "x":5, "y":1.25}, {"matrix": [6, 5], "x":10.5, "y":1.25}, {"matrix": [6, 4], "x":11.5, "y":1.125}, {"matrix": [6, 3], "x":12.5, "y":1}, {"matrix": [6, 2], "x":13.5, "y":1.125}, {"matrix": [6, 1], "x":14.5, "y":1.375}, {"matrix": [6, 0], "x":15.5, "y":1.5}, + {"matrix": [2, 0], "x":0, "y":2.5}, {"matrix": [2, 1], "x":1, "y":2.375}, {"matrix": [2, 2], "x":2, "y":2.125}, {"matrix": [2, 3], "x":3, "y":2}, {"matrix": [2, 4], "x":4, "y":2.125}, {"matrix": [2, 5], "x":5, "y":2.25}, {"matrix": [7, 5], "x":10.5, "y":2.25}, {"matrix": [7, 4], "x":11.5, "y":2.125}, {"matrix": [7, 3], "x":12.5, "y":2}, {"matrix": [7, 2], "x":13.5, "y":2.125}, {"matrix": [7, 1], "x":14.5, "y":2.375}, {"matrix": [7, 0], "x":15.5, "y":2.5}, + {"matrix": [3, 0], "x":0, "y":3.5}, {"matrix": [3, 1], "x":1, "y":3.375}, {"matrix": [3, 2], "x":2, "y":3.125}, {"matrix": [3, 3], "x":3, "y":3}, {"matrix": [3, 4], "x":4, "y":3.125}, {"matrix": [3, 5], "x":5, "y":3.25}, {"matrix": [4, 5], "x":6, "y":2.75}, {"matrix": [9, 5], "x":9.5, "y":2.75}, {"matrix": [8, 5], "x":10.5, "y":3.25}, {"matrix": [8, 4], "x":11.5, "y":3.125}, {"matrix": [8, 3], "x":12.5, "y":3}, {"matrix": [8, 2], "x":13.5, "y":3.125}, {"matrix": [8, 1], "x":14.5, "y":3.375}, {"matrix": [8, 0], "x":15.5, "y":3.5}, + {"matrix": [4, 1], "x":2.5,"y":4.125},{"matrix": [4, 2], "x":3.5, "y":4.15},{"matrix": [4, 3], "x":4.5,"y":4.25},{"matrix": [8, 0], "x":6, "y":4.25, "h":1.5}, {"matrix": [9, 4], "x":9.5, "y":4.25, "h":1.5}, {"matrix": [9, 3], "x":11, "y":4.25}, {"matrix": [9, 2], "x":12, "y":4.15}, {"matrix": [9, 1], "x":13, "y":4.15} + ] + } + } +} diff --git a/keyboards/lily58/r2g/r2g.c b/keyboards/lily58/r2g/r2g.c new file mode 100644 index 000000000000..6108d70b9064 --- /dev/null +++ b/keyboards/lily58/r2g/r2g.c @@ -0,0 +1 @@ +#include "lily58.h" diff --git a/keyboards/lily58/r2g/r2g.h b/keyboards/lily58/r2g/r2g.h new file mode 100644 index 000000000000..953b73622f87 --- /dev/null +++ b/keyboards/lily58/r2g/r2g.h @@ -0,0 +1,62 @@ +#pragma once + +#include "lily58.h" + +// #include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +//rgb led driver +#include "ws2812.h" +#endif + +// #ifdef USE_I2C +// #include +// #ifdef __AVR__ +// #include +// #include +// #endif +// #endif + +// #ifndef FLIP_HALF +// #define LAYOUT( \ +// L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ +// L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ +// L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ +// L30, L31, L32, L33, L34, L35, L45, R40, R30, R31, R32, R33, R34, R35, \ +// L41, L42, L43, L44, R41, R42, R43, R44 \ +// ) \ +// { \ +// { L00, L01, L02, L03, L04, L05 }, \ +// { L10, L11, L12, L13, L14, L15 }, \ +// { L20, L21, L22, L23, L24, L25 }, \ +// { L30, L31, L32, L33, L34, L35 }, \ +// { KC_NO, L41, L42, L43, L44, L45 }, \ +// { R05, R04, R03, R02, R01, R00 }, \ +// { R15, R14, R13, R12, R11, R10 }, \ +// { R25, R24, R23, R22, R21, R20 }, \ +// { R35, R34, R33, R32, R31, R30 }, \ +// { KC_NO, R44, R43, R42, R41, R40 } \ +// } +// #else +// // Keymap with right side flipped +// // (TRRS jack on both halves are to the right) +// #define LAYOUT( \ +// L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ +// L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ +// L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ +// L30, L31, L32, L33, L34, L35, L45, R30, R31, R32, R33, R34, R35, R45, \ +// L41, L42, L43, L44, R41, R42, R43, R44 \ +// ) \ +// { \ +// { L00, L01, L02, L03, L04, L05 }, \ +// { L10, L11, L12, L13, L14, L15 }, \ +// { L20, L21, L22, L23, L24, L25 }, \ +// { L30, L31, L32, L33, L34, L35 }, \ +// { KC_NO, L41, L42, L43, L44, L45 }, \ +// { R00, R01, R02, R03, R04, R05 }, \ +// { R10, R11, R12, R13, R14, R15 }, \ +// { R20, R21, R22, R23, R24, R25 }, \ +// { R30, R31, R32, R33, R34, R35 }, \ +// { KC_NO, R41, R42, R43, R44, R45 } \ +// } +// #endif diff --git a/keyboards/lily58/r2g/rules.mk b/keyboards/lily58/r2g/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 From 4adf5ffc9e370f6e2bdaeb30abb7a0e48a76cb28 Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Mon, 10 Oct 2022 14:47:01 +0800 Subject: [PATCH 02/17] rgb config --- keyboards/lily58/r2g/config.h | 2 + keyboards/lily58/r2g/r2g.c | 97 ++++++++++++++++++++++++++++++++++- keyboards/lily58/r2g/r2g.h | 59 --------------------- keyboards/lily58/r2g/rules.mk | 2 + 4 files changed, 100 insertions(+), 60 deletions(-) diff --git a/keyboards/lily58/r2g/config.h b/keyboards/lily58/r2g/config.h index 1b4d7ccf6e44..5caa6534a844 100644 --- a/keyboards/lily58/r2g/config.h +++ b/keyboards/lily58/r2g/config.h @@ -50,3 +50,5 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT + +#define ENABLE_RGB_MATRIX_BREATHING diff --git a/keyboards/lily58/r2g/r2g.c b/keyboards/lily58/r2g/r2g.c index 6108d70b9064..61ecde52dbbd 100644 --- a/keyboards/lily58/r2g/r2g.c +++ b/keyboards/lily58/r2g/r2g.c @@ -1 +1,96 @@ -#include "lily58.h" +#include "r2g.h" + +#ifdef RGB_MATRIX_ENABLE + + // Logical Layout + // Columns + // Left + // 0 1 2 3 4 5 + // ROWS + // 05 04 03 02 01 00 0 + // + // 06 07 08 09 10 11 1 + // + // 17 16 15 14 13 12 2 + // + // 18 19 20 21 22 23 3 + // + // 28 27 26 25 24 4 + // + // 29 31 32 33 34 35 36 37 UG + // + // Right + // 0 1 2 3 4 5 + // ROWS + // 05 04 03 02 01 00 0 + // + // 06 07 08 09 10 11 1 + // + // 17 16 15 14 13 12 2 + // + // 18 19 20 21 22 23 3 + // + // 28 27 26 25 24 4 + // + // 29 31 32 33 34 35 36 37 UG + // + + // Physical Layout + // Columns + // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 + // ROWS + // 05 04 03 02 01 00 00 01 02 03 04 05 0 0 + // + // 06 07 08 09 10 11 11 10 09 08 07 06 1 16 + // + // 17 16 15 14 13 12 12 13 14 15 16 17 2 32 + // + // 18 19 20 21 22 23 24 24 23 22 21 20 19 18 3 48 + // + // 28 27 26 25 25 26 27 28 4 64 + // + // 29 30 31 32 33 34 35 36 UG + // + // 0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 + +led_config_t g_led_config = { { + { 5, 4, 3, 2, 1, 0 }, + { 6, 7, 8, 9, 10, 11 }, + { 17, 16, 15, 14, 13, 12 }, + { 18, 19, 20, 21, 22, 23 }, + {NO_LED, 28, 27, 26, 25, 24 }, + { 42, 41, 40, 39, 38, 37 }, + { 43, 44, 45, 46, 47, 48 }, + { 54, 53, 52, 51, 50, 49 }, + { 55, 56, 57, 58, 59, 60 }, + {NO_LED, 65, 64, 63, 62, 61 } +}, { + + { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, + { 0, 16 }, { 16, 16 }, { 32, 16 }, { 48, 16 }, { 64, 16 }, { 80, 16 }, + { 80, 32 }, { 64, 32 }, { 48, 32 }, { 32, 32 }, { 16, 32 }, { 0, 32 }, + { 0, 48 }, { 16, 48 }, { 32, 48 }, { 48, 48 }, { 64, 48 }, { 80, 48 }, + { 96, 48 }, { 96, 64 }, { 80, 64 }, { 64, 64 }, + { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, {224, 0 }, + { 224, 16 }, { 208, 16 }, { 192, 16 }, { 176, 16 }, { 160, 16 }, {144, 16 }, + { 144, 32 }, { 160, 32 }, { 176, 32 }, { 192, 32 }, { 208, 32 }, {224, 32 }, + { 224, 48 }, { 208, 48 }, { 192, 48 }, { 176, 48 }, { 160, 48 }, {144, 48 }, + { 128, 48 }, { 128, 64 }, { 144, 64 }, { 160, 64 } + + +}, { + 1, 1, 1, 1, 1, 4, + 4, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 4, + 4, 1, 1, 1, 1, 1, 4, + 4, 4, 4, 4, + 2, 2, 2, 2, 2, 2, 2, 2, + 1, 1, 1, 1, 1, 4, + 4, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 4, + 4, 1, 1, 1, 1, 1, 4, + 4, 4, 4, 4, + 2, 2, 2, 2, 2, 2, 2, 2, +} }; + +#endif diff --git a/keyboards/lily58/r2g/r2g.h b/keyboards/lily58/r2g/r2g.h index 953b73622f87..6e308fa35ede 100644 --- a/keyboards/lily58/r2g/r2g.h +++ b/keyboards/lily58/r2g/r2g.h @@ -1,62 +1,3 @@ #pragma once #include "lily58.h" - -// #include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -//rgb led driver -#include "ws2812.h" -#endif - -// #ifdef USE_I2C -// #include -// #ifdef __AVR__ -// #include -// #include -// #endif -// #endif - -// #ifndef FLIP_HALF -// #define LAYOUT( \ -// L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ -// L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ -// L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ -// L30, L31, L32, L33, L34, L35, L45, R40, R30, R31, R32, R33, R34, R35, \ -// L41, L42, L43, L44, R41, R42, R43, R44 \ -// ) \ -// { \ -// { L00, L01, L02, L03, L04, L05 }, \ -// { L10, L11, L12, L13, L14, L15 }, \ -// { L20, L21, L22, L23, L24, L25 }, \ -// { L30, L31, L32, L33, L34, L35 }, \ -// { KC_NO, L41, L42, L43, L44, L45 }, \ -// { R05, R04, R03, R02, R01, R00 }, \ -// { R15, R14, R13, R12, R11, R10 }, \ -// { R25, R24, R23, R22, R21, R20 }, \ -// { R35, R34, R33, R32, R31, R30 }, \ -// { KC_NO, R44, R43, R42, R41, R40 } \ -// } -// #else -// // Keymap with right side flipped -// // (TRRS jack on both halves are to the right) -// #define LAYOUT( \ -// L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ -// L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ -// L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ -// L30, L31, L32, L33, L34, L35, L45, R30, R31, R32, R33, R34, R35, R45, \ -// L41, L42, L43, L44, R41, R42, R43, R44 \ -// ) \ -// { \ -// { L00, L01, L02, L03, L04, L05 }, \ -// { L10, L11, L12, L13, L14, L15 }, \ -// { L20, L21, L22, L23, L24, L25 }, \ -// { L30, L31, L32, L33, L34, L35 }, \ -// { KC_NO, L41, L42, L43, L44, L45 }, \ -// { R00, R01, R02, R03, R04, R05 }, \ -// { R10, R11, R12, R13, R14, R15 }, \ -// { R20, R21, R22, R23, R24, R25 }, \ -// { R30, R31, R32, R33, R34, R35 }, \ -// { KC_NO, R41, R42, R43, R44, R45 } \ -// } -// #endif diff --git a/keyboards/lily58/r2g/rules.mk b/keyboards/lily58/r2g/rules.mk index e69de29bb2d1..9be57067bbf1 100644 --- a/keyboards/lily58/r2g/rules.mk +++ b/keyboards/lily58/r2g/rules.mk @@ -0,0 +1,2 @@ +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 From 44c2884d0b7f6d0914d5af4dae58595c4e05d007 Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Thu, 13 Oct 2022 14:51:12 +0800 Subject: [PATCH 03/17] FIX rgb matrix --- keyboards/lily58/r2g/info.json | 2 +- keyboards/lily58/r2g/r2g.c | 5 +++++ keyboards/lily58/r2g/rules.mk | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/keyboards/lily58/r2g/info.json b/keyboards/lily58/r2g/info.json index a531fa2aac79..de3793aa7c9a 100644 --- a/keyboards/lily58/r2g/info.json +++ b/keyboards/lily58/r2g/info.json @@ -26,7 +26,7 @@ {"matrix": [1, 0], "x":0, "y":1.5}, {"matrix": [1, 1], "x":1, "y":1.375}, {"matrix": [1, 2], "x":2, "y":1.125}, {"matrix": [1, 3], "x":3, "y":1}, {"matrix": [1, 4], "x":4, "y":1.125}, {"matrix": [1, 5], "x":5, "y":1.25}, {"matrix": [6, 5], "x":10.5, "y":1.25}, {"matrix": [6, 4], "x":11.5, "y":1.125}, {"matrix": [6, 3], "x":12.5, "y":1}, {"matrix": [6, 2], "x":13.5, "y":1.125}, {"matrix": [6, 1], "x":14.5, "y":1.375}, {"matrix": [6, 0], "x":15.5, "y":1.5}, {"matrix": [2, 0], "x":0, "y":2.5}, {"matrix": [2, 1], "x":1, "y":2.375}, {"matrix": [2, 2], "x":2, "y":2.125}, {"matrix": [2, 3], "x":3, "y":2}, {"matrix": [2, 4], "x":4, "y":2.125}, {"matrix": [2, 5], "x":5, "y":2.25}, {"matrix": [7, 5], "x":10.5, "y":2.25}, {"matrix": [7, 4], "x":11.5, "y":2.125}, {"matrix": [7, 3], "x":12.5, "y":2}, {"matrix": [7, 2], "x":13.5, "y":2.125}, {"matrix": [7, 1], "x":14.5, "y":2.375}, {"matrix": [7, 0], "x":15.5, "y":2.5}, {"matrix": [3, 0], "x":0, "y":3.5}, {"matrix": [3, 1], "x":1, "y":3.375}, {"matrix": [3, 2], "x":2, "y":3.125}, {"matrix": [3, 3], "x":3, "y":3}, {"matrix": [3, 4], "x":4, "y":3.125}, {"matrix": [3, 5], "x":5, "y":3.25}, {"matrix": [4, 5], "x":6, "y":2.75}, {"matrix": [9, 5], "x":9.5, "y":2.75}, {"matrix": [8, 5], "x":10.5, "y":3.25}, {"matrix": [8, 4], "x":11.5, "y":3.125}, {"matrix": [8, 3], "x":12.5, "y":3}, {"matrix": [8, 2], "x":13.5, "y":3.125}, {"matrix": [8, 1], "x":14.5, "y":3.375}, {"matrix": [8, 0], "x":15.5, "y":3.5}, - {"matrix": [4, 1], "x":2.5,"y":4.125},{"matrix": [4, 2], "x":3.5, "y":4.15},{"matrix": [4, 3], "x":4.5,"y":4.25},{"matrix": [8, 0], "x":6, "y":4.25, "h":1.5}, {"matrix": [9, 4], "x":9.5, "y":4.25, "h":1.5}, {"matrix": [9, 3], "x":11, "y":4.25}, {"matrix": [9, 2], "x":12, "y":4.15}, {"matrix": [9, 1], "x":13, "y":4.15} + {"matrix": [4, 1], "x":2.5,"y":4.125},{"matrix": [4, 2], "x":3.5, "y":4.15},{"matrix": [4, 3], "x":4.5,"y":4.25},{"matrix": [4, 4], "x":6, "y":4.25, "h":1.5}, {"matrix": [9, 4], "x":9.5, "y":4.25, "h":1.5}, {"matrix": [9, 3], "x":11, "y":4.25}, {"matrix": [9, 2], "x":12, "y":4.15}, {"matrix": [9, 1], "x":13, "y":4.15} ] } } diff --git a/keyboards/lily58/r2g/r2g.c b/keyboards/lily58/r2g/r2g.c index 61ecde52dbbd..0c6598e74836 100644 --- a/keyboards/lily58/r2g/r2g.c +++ b/keyboards/lily58/r2g/r2g.c @@ -71,12 +71,17 @@ led_config_t g_led_config = { { { 80, 32 }, { 64, 32 }, { 48, 32 }, { 32, 32 }, { 16, 32 }, { 0, 32 }, { 0, 48 }, { 16, 48 }, { 32, 48 }, { 48, 48 }, { 64, 48 }, { 80, 48 }, { 96, 48 }, { 96, 64 }, { 80, 64 }, { 64, 64 }, + + { 96, 64}, {32, 64}, { 0, 64}, { 0 , 32 }, { 16, 0 }, {50,0}, {80,0}, {96,32} + { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, {224, 0 }, { 224, 16 }, { 208, 16 }, { 192, 16 }, { 176, 16 }, { 160, 16 }, {144, 16 }, { 144, 32 }, { 160, 32 }, { 176, 32 }, { 192, 32 }, { 208, 32 }, {224, 32 }, { 224, 48 }, { 208, 48 }, { 192, 48 }, { 176, 48 }, { 160, 48 }, {144, 48 }, { 128, 48 }, { 128, 64 }, { 144, 64 }, { 160, 64 } + { 128, 64}, {192, 64}, { 224, 64}, { 224 , 32 }, { 206, 0 }, {150,0}, {140,0}, {128,32} + }, { 1, 1, 1, 1, 1, 4, diff --git a/keyboards/lily58/r2g/rules.mk b/keyboards/lily58/r2g/rules.mk index 9be57067bbf1..fb53223541f2 100644 --- a/keyboards/lily58/r2g/rules.mk +++ b/keyboards/lily58/r2g/rules.mk @@ -1,2 +1,3 @@ RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes From 01db12ed66a8e0f40c28ec59bfa2028945867f68 Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Wed, 19 Oct 2022 16:35:41 +0800 Subject: [PATCH 04/17] add max brightness --- keyboards/lily58/r2g/config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/lily58/r2g/config.h b/keyboards/lily58/r2g/config.h index 5caa6534a844..5ce292d85181 100644 --- a/keyboards/lily58/r2g/config.h +++ b/keyboards/lily58/r2g/config.h @@ -50,5 +50,6 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT - +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100 +#define ENABLE_RGB_MATRIX_ALPHAS_MODS #define ENABLE_RGB_MATRIX_BREATHING From 58299ea8d47bfe09705d86858aef11775c283c10 Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Thu, 8 Dec 2022 08:47:23 +0700 Subject: [PATCH 05/17] data driven --- keyboards/lily58/r2g/config.h | 10 +- keyboards/lily58/r2g/info.json | 96 ++++++++- keyboards/lily58/r2g/r2g.c | 354 ++++++++++++++++++++++++--------- keyboards/lily58/r2g/rules.mk | 2 - 4 files changed, 355 insertions(+), 107 deletions(-) diff --git a/keyboards/lily58/r2g/config.h b/keyboards/lily58/r2g/config.h index 5ce292d85181..7091f13bf157 100644 --- a/keyboards/lily58/r2g/config.h +++ b/keyboards/lily58/r2g/config.h @@ -31,9 +31,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ //#define LOCKING_RESYNC_ENABLE -/* ws2812 RGB LED */ -#define RGB_DI_PIN D3 -#define RGBLED_NUM 12 // Number of LEDs /* * Feature disable options @@ -50,6 +47,11 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100 +#define RGB_MATRIX_LED_COUNT 74 +#define RGB_DISABLE_WHEN_USB_SUSPENDED +#define RGB_MATRIX_LED_FLUSH_LIMIT 16 +#define RGB_MATRIX_KEYPRESSES +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT #define ENABLE_RGB_MATRIX_ALPHAS_MODS #define ENABLE_RGB_MATRIX_BREATHING diff --git a/keyboards/lily58/r2g/info.json b/keyboards/lily58/r2g/info.json index de3793aa7c9a..67dbf092f498 100644 --- a/keyboards/lily58/r2g/info.json +++ b/keyboards/lily58/r2g/info.json @@ -1,10 +1,15 @@ { "keyboard_name": "Lily58 R2G", - "manufacturer": "Mechboards", + "manufacturer": "Mechboards UK", "url": "", - "maintainer": "Mechboards", + "maintainer": "Elliot Powell", "processor": "atmega32u4", "bootloader": "atmel-dfu", + "features": { + "bootmagic": true, + "oled": true, + "rgb_matrix": true + }, "usb": { "vid": "0x04D8", "pid": "0xEB2E", @@ -29,5 +34,92 @@ {"matrix": [4, 1], "x":2.5,"y":4.125},{"matrix": [4, 2], "x":3.5, "y":4.15},{"matrix": [4, 3], "x":4.5,"y":4.25},{"matrix": [4, 4], "x":6, "y":4.25, "h":1.5}, {"matrix": [9, 4], "x":9.5, "y":4.25, "h":1.5}, {"matrix": [9, 3], "x":11, "y":4.25}, {"matrix": [9, 2], "x":12, "y":4.15}, {"matrix": [9, 1], "x":13, "y":4.15} ] } + }, + "rgblight": { + "pin": "D3", + "led_count": 74, + "split": true, + "split_count": [37, 37] + }, + + "rgb_matrix": { + "driver": "WS2812", + "layout": [ + {"flags": 4, "matrix": [0, 5], "x": 72, "y": 4}, // L SW06 + {"flags": 4, "matrix": [0, 4], "x": 58, "y": 2}, // L SW05 + {"flags": 4, "matrix": [0, 3], "x": 43, "y": 0}, // L SW04 + {"flags": 4, "matrix": [0, 2], "x": 29, "y": 2}, // L SW03 + {"flags": 4, "matrix": [0, 1], "x": 14, "y": 6}, // L SW02 + {"flags": 4, "matrix": [0, 0], "x": 0, "y": 8}, // L SW01 + {"flags": 4, "matrix": [1, 0], "x": 0, "y": 23}, // L SW07 + {"flags": 4, "matrix": [1, 1], "x": 14, "y": 21}, // L SW08 + {"flags": 4, "matrix": [1, 2], "x": 29, "y": 17}, // L SW09 + {"flags": 4, "matrix": [1, 3], "x": 43, "y": 15}, // L SW10 + {"flags": 4, "matrix": [1, 4], "x": 58, "y": 17}, // L SW11 + {"flags": 4, "matrix": [1, 5], "x": 72, "y": 19}, // L SW12 + {"flags": 4, "matrix": [2, 0], "x": 0, "y": 38}, // L SW13 + {"flags": 4, "matrix": [2, 1], "x": 14, "y": 36}, // L SW14 + {"flags": 4, "matrix": [2, 2], "x": 29, "y": 32}, // L SW15 + {"flags": 4, "matrix": [2, 3], "x": 43, "y": 30}, // L SW16 + {"flags": 4, "matrix": [2, 4], "x": 58, "y": 32}, // L SW17 + {"flags": 4, "matrix": [2, 5], "x": 72, "y": 34}, // L SW18 + {"flags": 4, "matrix": [3, 5], "x": 72, "y": 49}, // L SW25 + {"flags": 4, "matrix": [3, 4], "x": 58, "y": 47}, // L SW24 + {"flags": 4, "matrix": [3, 3], "x": 43, "y": 45}, // L SW23 + {"flags": 4, "matrix": [3, 2], "x": 29, "y": 47}, // L SW22 + {"flags": 4, "matrix": [3, 1], "x": 14, "y": 51}, // L SW21 + {"flags": 4, "matrix": [3, 0], "x": 0, "y": 53}, // L SW20 + {"flags": 4, "matrix": [4, 1], "x": 87, "y": 41}, // L SW19 + {"flags": 4, "matrix": [4, 2], "x": 36, "y": 62}, // L SW26 + {"flags": 4, "matrix": [4, 3], "x": 51, "y": 62}, // L SW27 + {"flags": 4, "matrix": [4, 4], "x": 65, "y": 64}, // L SW28 + {"flags": 4, "matrix": [4, 5], "x": 87, "y": 64}, // L SW29 + {"flags": 2, "x": 96, "y": 64}, // L RGB1 + {"flags": 2, "x": 32, "y": 64}, // L RGB2 + {"flags": 2, "x": 0, "y": 64}, // L RGB3 + {"flags": 2, "x": 0, "y": 32}, // L RGB4 + {"flags": 2, "x": 16, "y": 0}, // L RGB5 + {"flags": 2, "x": 50, "y": 0}, // L RGB6 + {"flags": 2, "x": 80, "y": 0}, // L RGB7 + {"flags": 2, "x": 96, "y": 32}, // L RGB8 + + {"flags": 4, "matrix": [5, 0], "x": 224, "y": 8}, // R SW01 + {"flags": 4, "matrix": [5, 1], "x": 210, "y": 6}, // R SW02 + {"flags": 4, "matrix": [5, 2], "x": 195, "y": 2}, // R SW03 + {"flags": 4, "matrix": [5, 3], "x": 181, "y": 0}, // R SW04 + {"flags": 4, "matrix": [5, 4], "x": 166, "y": 2}, // R SW05 + {"flags": 4, "matrix": [5, 5], "x": 152, "y": 4}, // R SW06 + {"flags": 4, "matrix": [6, 5], "x": 152, "y": 19}, // R SW12 + {"flags": 4, "matrix": [6, 4], "x": 166, "y": 17}, // R SW11 + {"flags": 4, "matrix": [6, 3], "x": 181, "y": 15}, // R SW10 + {"flags": 4, "matrix": [6, 2], "x": 195, "y": 17}, // R SW09 + {"flags": 4, "matrix": [6, 1], "x": 210, "y": 21}, // R SW08 + {"flags": 4, "matrix": [6, 0], "x": 224, "y": 23}, // R SW07 + {"flags": 4, "matrix": [7, 0], "x": 224, "y": 38}, // R SW13 + {"flags": 4, "matrix": [7, 1], "x": 210, "y": 36}, // R SW14 + {"flags": 4, "matrix": [7, 2], "x": 195, "y": 32}, // R SW15 + {"flags": 4, "matrix": [7, 3], "x": 181, "y": 30}, // R SW16 + {"flags": 4, "matrix": [7, 4], "x": 166, "y": 32}, // R SW17 + {"flags": 4, "matrix": [7, 5], "x": 152, "y": 34}, // R SW18 + {"flags": 4, "matrix": [8, 5], "x": 152, "y": 49}, // R SW25 + {"flags": 4, "matrix": [8, 4], "x": 166, "y": 47}, // R SW24 + {"flags": 4, "matrix": [8, 3], "x": 181, "y": 45}, // R SW23 + {"flags": 4, "matrix": [8, 2], "x": 195, "y": 47}, // R SW22 + {"flags": 4, "matrix": [8, 1], "x": 210, "y": 51}, // R SW21 + {"flags": 4, "matrix": [8, 0], "x": 224, "y": 53}, // R SW20 + {"flags": 4, "matrix": [9, 5], "x": 137, "y": 64}, // R SW29 + {"flags": 4, "matrix": [9, 4], "x": 159, "y": 64}, // R SW28 + {"flags": 4, "matrix": [9, 3], "x": 173, "y": 62}, // R SW27 + {"flags": 4, "matrix": [9, 2], "x": 188, "y": 62}, // R SW26 + {"flags": 4, "matrix": [9, 1], "x": 137, "y": 41}, // R SW19 + {"flags": 2, "x": 128, "y": 64}, // R RGB1 + {"flags": 2, "x": 192, "y": 64}, // R RGB2 + {"flags": 2, "x": 224, "y": 64}, // R RGB3 + {"flags": 2, "x": 224, "y": 32}, // R RGB4 + {"flags": 2, "x": 206, "y": 0}, // R RGB5 + {"flags": 2, "x": 150, "y": 0}, // R RGB6 + {"flags": 2, "x": 140, "y": 0}, // R RGB7 + {"flags": 2, "x": 128, "y": 32} // R RGB8 + ] } } diff --git a/keyboards/lily58/r2g/r2g.c b/keyboards/lily58/r2g/r2g.c index 0c6598e74836..845e8f455cd7 100644 --- a/keyboards/lily58/r2g/r2g.c +++ b/keyboards/lily58/r2g/r2g.c @@ -1,101 +1,257 @@ #include "r2g.h" +#include "quantum.h" -#ifdef RGB_MATRIX_ENABLE - - // Logical Layout - // Columns - // Left - // 0 1 2 3 4 5 - // ROWS - // 05 04 03 02 01 00 0 - // - // 06 07 08 09 10 11 1 - // - // 17 16 15 14 13 12 2 - // - // 18 19 20 21 22 23 3 - // - // 28 27 26 25 24 4 - // - // 29 31 32 33 34 35 36 37 UG - // - // Right - // 0 1 2 3 4 5 - // ROWS - // 05 04 03 02 01 00 0 - // - // 06 07 08 09 10 11 1 - // - // 17 16 15 14 13 12 2 - // - // 18 19 20 21 22 23 3 - // - // 28 27 26 25 24 4 - // - // 29 31 32 33 34 35 36 37 UG - // - - // Physical Layout - // Columns - // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 - // ROWS - // 05 04 03 02 01 00 00 01 02 03 04 05 0 0 - // - // 06 07 08 09 10 11 11 10 09 08 07 06 1 16 - // - // 17 16 15 14 13 12 12 13 14 15 16 17 2 32 - // - // 18 19 20 21 22 23 24 24 23 22 21 20 19 18 3 48 - // - // 28 27 26 25 25 26 27 28 4 64 - // - // 29 30 31 32 33 34 35 36 UG - // - // 0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 - -led_config_t g_led_config = { { - { 5, 4, 3, 2, 1, 0 }, - { 6, 7, 8, 9, 10, 11 }, - { 17, 16, 15, 14, 13, 12 }, - { 18, 19, 20, 21, 22, 23 }, - {NO_LED, 28, 27, 26, 25, 24 }, - { 42, 41, 40, 39, 38, 37 }, - { 43, 44, 45, 46, 47, 48 }, - { 54, 53, 52, 51, 50, 49 }, - { 55, 56, 57, 58, 59, 60 }, - {NO_LED, 65, 64, 63, 62, 61 } -}, { - - { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, - { 0, 16 }, { 16, 16 }, { 32, 16 }, { 48, 16 }, { 64, 16 }, { 80, 16 }, - { 80, 32 }, { 64, 32 }, { 48, 32 }, { 32, 32 }, { 16, 32 }, { 0, 32 }, - { 0, 48 }, { 16, 48 }, { 32, 48 }, { 48, 48 }, { 64, 48 }, { 80, 48 }, - { 96, 48 }, { 96, 64 }, { 80, 64 }, { 64, 64 }, - - { 96, 64}, {32, 64}, { 0, 64}, { 0 , 32 }, { 16, 0 }, {50,0}, {80,0}, {96,32} - - { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, {224, 0 }, - { 224, 16 }, { 208, 16 }, { 192, 16 }, { 176, 16 }, { 160, 16 }, {144, 16 }, - { 144, 32 }, { 160, 32 }, { 176, 32 }, { 192, 32 }, { 208, 32 }, {224, 32 }, - { 224, 48 }, { 208, 48 }, { 192, 48 }, { 176, 48 }, { 160, 48 }, {144, 48 }, - { 128, 48 }, { 128, 64 }, { 144, 64 }, { 160, 64 } - - { 128, 64}, {192, 64}, { 224, 64}, { 224 , 32 }, { 206, 0 }, {150,0}, {140,0}, {128,32} - - -}, { - 1, 1, 1, 1, 1, 4, - 4, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 4, - 4, 1, 1, 1, 1, 1, 4, - 4, 4, 4, 4, - 2, 2, 2, 2, 2, 2, 2, 2, - 1, 1, 1, 1, 1, 4, - 4, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 4, - 4, 1, 1, 1, 1, 1, 4, - 4, 4, 4, 4, - 2, 2, 2, 2, 2, 2, 2, 2, -} }; - -#endif +// #ifdef RGB_MATRIX_ENABLE + +// // Logical Layout +// // Columns +// // Left +// // 0 1 2 3 4 5 +// // ROWS +// // 05 04 03 02 01 00 0 +// // +// // 06 07 08 09 10 11 1 +// // +// // 17 16 15 14 13 12 2 +// // +// // 18 19 20 21 22 23 3 +// // +// // 28 27 26 25 24 4 +// // +// // 29 31 32 33 34 35 36 37 UG +// // +// // Right +// // 0 1 2 3 4 5 +// // ROWS +// // 05 04 03 02 01 00 0 +// // +// // 06 07 08 09 10 11 1 +// // +// // 17 16 15 14 13 12 2 +// // +// // 18 19 20 21 22 23 3 +// // +// // 28 27 26 25 24 4 +// // +// // 29 31 32 33 34 35 36 37 UG +// // + +// // Physical Layout +// // Columns +// // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 +// // ROWS +// // 05 04 03 02 01 00 00 01 02 03 04 05 0 0 +// // +// // 06 07 08 09 10 11 11 10 09 08 07 06 1 16 +// // +// // 17 16 15 14 13 12 12 13 14 15 16 17 2 32 +// // +// // 18 19 20 21 22 23 24 24 23 22 21 20 19 18 3 48 +// // +// // 28 27 26 25 25 26 27 28 4 64 +// // +// // 29 30 31 32 33 34 35 36 UG +// // +// // 0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 + +// led_config_t g_led_config = { { +// { 5, 4, 3, 2, 1, 0 }, +// { 6, 7, 8, 9, 10, 11 }, +// { 17, 16, 15, 14, 13, 12 }, +// { 18, 19, 20, 21, 22, 23 }, +// {NO_LED, 28, 27, 26, 25, 24 }, +// { 42, 41, 40, 39, 38, 37 }, +// { 43, 44, 45, 46, 47, 48 }, +// { 54, 53, 52, 51, 50, 49 }, +// { 55, 56, 57, 58, 59, 60 }, +// {NO_LED, 65, 64, 63, 62, 61 } +// }, { + +// { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, +// { 0, 16 }, { 16, 16 }, { 32, 16 }, { 48, 16 }, { 64, 16 }, { 80, 16 }, +// { 80, 32 }, { 64, 32 }, { 48, 32 }, { 32, 32 }, { 16, 32 }, { 0, 32 }, +// { 0, 48 }, { 16, 48 }, { 32, 48 }, { 48, 48 }, { 64, 48 }, { 80, 48 }, +// { 96, 48 }, { 96, 64 }, { 80, 64 }, { 64, 64 }, + +// { 96, 64}, {32, 64}, { 0, 64}, { 0 , 32 }, { 16, 0 }, {50,0}, {80,0}, {96,32} + +// { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, {224, 0 }, +// { 224, 16 }, { 208, 16 }, { 192, 16 }, { 176, 16 }, { 160, 16 }, {144, 16 }, +// { 144, 32 }, { 160, 32 }, { 176, 32 }, { 192, 32 }, { 208, 32 }, {224, 32 }, +// { 224, 48 }, { 208, 48 }, { 192, 48 }, { 176, 48 }, { 160, 48 }, {144, 48 }, +// { 128, 48 }, { 128, 64 }, { 144, 64 }, { 160, 64 } + +// { 128, 64}, {192, 64}, { 224, 64}, { 224 , 32 }, { 206, 0 }, {150,0}, {140,0}, {128,32} + + +// }, { +// 1, 1, 1, 1, 1, 4, +// 4, 1, 1, 1, 1, 1, +// 1, 1, 1, 1, 1, 4, +// 4, 1, 1, 1, 1, 1, 4, +// 4, 4, 4, 4, +// 2, 2, 2, 2, 2, 2, 2, 2, +// 1, 1, 1, 1, 1, 4, +// 4, 1, 1, 1, 1, 1, +// 1, 1, 1, 1, 1, 4, +// 4, 1, 1, 1, 1, 1, 4, +// 4, 4, 4, 4, +// 2, 2, 2, 2, 2, 2, 2, 2, +// } }; + +// #endif + + +#ifdef OLED_ENABLE + +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + if (!is_keyboard_master()) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + } + return rotation; +} + +enum Layers{ + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +void oled_render_layer_state_r2g(void) { + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("Default"), false); + break; + case _LOWER: + oled_write_ln_P(PSTR("Lower"), false); + break; + case _RAISE: + oled_write_ln_P(PSTR("Raise"), false); + break; + case _ADJUST: + oled_write_ln_P(PSTR("Adjust"), false); + break; + } +} + +//char keylog_str_r2g[24] = {}; + +const char code_to_name_r2g[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', + '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; + +char key_name_r2g = ' '; +uint16_t last_keycode_r2g; +uint8_t last_row_r2g; +uint8_t last_col_r2g; + +void set_keylog_r2g(uint16_t keycode, keyrecord_t *record) { + key_name_r2g = ' '; + last_keycode_r2g = keycode; + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || + (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { last_keycode_r2g = keycode & 0xFF; } + if (keycode < 60) { + key_name_r2g = code_to_name_r2g[keycode]; + } + last_row_r2g = record->event.key.row; + last_col_r2g = record->event.key.col; +} + +const char *depad_str(const char *depad_str, char depad_char) { + while (*depad_str == depad_char) ++depad_str; + return depad_str; +} + +void oled_render_keylog_r2g(void) { + //oled_write(keylog_str_r2g, false); + const char *last_row_r2g_str = get_u8_str(last_row_r2g, ' '); + oled_write(depad_str(last_row_r2g_str, ' '), false); + oled_write_P(PSTR("x"), false); + const char *last_col_r2g_str = get_u8_str(last_col_r2g, ' '); + oled_write(depad_str(last_col_r2g_str, ' '), false); + oled_write_P(PSTR(", k"), false); + const char *last_keycode_r2g_str = get_u16_str(last_keycode_r2g, ' '); + oled_write(depad_str(last_keycode_r2g_str, ' '), false); + oled_write_P(PSTR(":"), false); + oled_write_char(key_name_r2g, false); +} + +void render_bootmagic_status_r2g(bool status) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + if (status) { + oled_write_ln_P(logo[0][0], false); + oled_write_ln_P(logo[0][1], false); + } else { + oled_write_ln_P(logo[1][0], false); + oled_write_ln_P(logo[1][1], false); + } +} + +void oled_render_logo_r2g(void) { + static const char PROGMEM mb_logo[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, +0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, +0x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0x83, 0x83, 0x83, +0x83, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0xff, 0xff, 0x82, 0x82, 0x82, 0x82, +0x82, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, +0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfc, 0xfc, 0xfc, +0x9c, 0x9c, 0xfc, 0xfc, 0xf8, 0xf8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x78, 0x7c, 0x3c, +0x9c, 0xfc, 0xfc, 0xf8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xf8, 0x3c, 0x3c, +0x9c, 0xbc, 0xfc, 0xb8, 0xb8, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff, +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, +0x41, 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff, +0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, +0x03, 0x07, 0x0f, 0x3f, 0x3f, 0x3e, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x3c, 0x3e, 0x3f, +0x3f, 0x3f, 0x3b, 0x39, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x1f, 0x3f, 0x3c, 0x38, +0x3b, 0x3b, 0x3f, 0x1f, 0x1f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, +0xf0, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, +0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + oled_write_raw_P(mb_logo, sizeof(mb_logo)); + //oled_set_cursor(oled_max_chars()/2,oled_max_lines()/2); + //oled_write_P(PSTR("R2G"), false); +} + +bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } + if (is_keyboard_master()) { + oled_render_layer_state_r2g(); + oled_render_keylog_r2g(); + } else { + oled_render_logo_r2g(); + } + return false; +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + set_keylog_r2g(keycode, record); + } + return process_record_user(keycode, record); +} +#endif // OLED_ENABLE diff --git a/keyboards/lily58/r2g/rules.mk b/keyboards/lily58/r2g/rules.mk index fb53223541f2..4da205a168c7 100644 --- a/keyboards/lily58/r2g/rules.mk +++ b/keyboards/lily58/r2g/rules.mk @@ -1,3 +1 @@ -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 LTO_ENABLE = yes From ce75728bdc74f53e23d29987e25dd91342b49fef Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Wed, 14 Dec 2022 20:47:28 +0700 Subject: [PATCH 06/17] update config --- keyboards/lily58/r2g/config.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/keyboards/lily58/r2g/config.h b/keyboards/lily58/r2g/config.h index 7091f13bf157..8d0bdb6d8282 100644 --- a/keyboards/lily58/r2g/config.h +++ b/keyboards/lily58/r2g/config.h @@ -18,7 +18,7 @@ along with this program. If not, see . */ #pragma once -#define SERIAL_USE_MULTI_TRANSACTION +//#define SERIAL_USE_MULTI_TRANSACTION /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -47,11 +47,16 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -#define RGB_MATRIX_LED_COUNT 74 -#define RGB_DISABLE_WHEN_USB_SUSPENDED -#define RGB_MATRIX_LED_FLUSH_LIMIT 16 -#define RGB_MATRIX_KEYPRESSES -#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -#define ENABLE_RGB_MATRIX_ALPHAS_MODS -#define ENABLE_RGB_MATRIX_BREATHING + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_LED_COUNT 74 +# define RGB_DISABLE_WHEN_USB_SUSPENDED +# define RGB_MATRIX_LED_FLUSH_LIMIT 16 +# define RGB_MATRIX_KEYPRESSES +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_BREATHING +# define SPLIT_TRANSPORT_MIRROR +#endif From f68d962d92b52b235a68595b63d0e46f25311106 Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Sun, 18 Dec 2022 20:45:28 +0700 Subject: [PATCH 07/17] Update for rgb --- keyboards/lily58/r2g/config.h | 5 ++ keyboards/lily58/r2g/info.json | 82 +++++++++++++-------------- keyboards/lily58/r2g/r2g.c | 100 --------------------------------- 3 files changed, 46 insertions(+), 141 deletions(-) diff --git a/keyboards/lily58/r2g/config.h b/keyboards/lily58/r2g/config.h index 8d0bdb6d8282..8ec568128c90 100644 --- a/keyboards/lily58/r2g/config.h +++ b/keyboards/lily58/r2g/config.h @@ -60,3 +60,8 @@ along with this program. If not, see . # define ENABLE_RGB_MATRIX_BREATHING # define SPLIT_TRANSPORT_MIRROR #endif + +#ifdef RGBLIGHT_ENABLE +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 +#endif + diff --git a/keyboards/lily58/r2g/info.json b/keyboards/lily58/r2g/info.json index 67dbf092f498..5d6dac379f29 100644 --- a/keyboards/lily58/r2g/info.json +++ b/keyboards/lily58/r2g/info.json @@ -44,6 +44,7 @@ "rgb_matrix": { "driver": "WS2812", + "split_count": [37, 37], "layout": [ {"flags": 4, "matrix": [0, 5], "x": 72, "y": 4}, // L SW06 {"flags": 4, "matrix": [0, 4], "x": 58, "y": 2}, // L SW05 @@ -57,23 +58,23 @@ {"flags": 4, "matrix": [1, 3], "x": 43, "y": 15}, // L SW10 {"flags": 4, "matrix": [1, 4], "x": 58, "y": 17}, // L SW11 {"flags": 4, "matrix": [1, 5], "x": 72, "y": 19}, // L SW12 - {"flags": 4, "matrix": [2, 0], "x": 0, "y": 38}, // L SW13 - {"flags": 4, "matrix": [2, 1], "x": 14, "y": 36}, // L SW14 - {"flags": 4, "matrix": [2, 2], "x": 29, "y": 32}, // L SW15 - {"flags": 4, "matrix": [2, 3], "x": 43, "y": 30}, // L SW16 - {"flags": 4, "matrix": [2, 4], "x": 58, "y": 32}, // L SW17 {"flags": 4, "matrix": [2, 5], "x": 72, "y": 34}, // L SW18 - {"flags": 4, "matrix": [3, 5], "x": 72, "y": 49}, // L SW25 - {"flags": 4, "matrix": [3, 4], "x": 58, "y": 47}, // L SW24 - {"flags": 4, "matrix": [3, 3], "x": 43, "y": 45}, // L SW23 - {"flags": 4, "matrix": [3, 2], "x": 29, "y": 47}, // L SW22 - {"flags": 4, "matrix": [3, 1], "x": 14, "y": 51}, // L SW21 + {"flags": 4, "matrix": [2, 4], "x": 58, "y": 32}, // L SW17 + {"flags": 4, "matrix": [2, 3], "x": 43, "y": 30}, // L SW16 + {"flags": 4, "matrix": [2, 2], "x": 29, "y": 32}, // L SW15 + {"flags": 4, "matrix": [2, 1], "x": 14, "y": 36}, // L SW14 + {"flags": 4, "matrix": [2, 0], "x": 0, "y": 38}, // L SW13 {"flags": 4, "matrix": [3, 0], "x": 0, "y": 53}, // L SW20 - {"flags": 4, "matrix": [4, 1], "x": 87, "y": 41}, // L SW19 - {"flags": 4, "matrix": [4, 2], "x": 36, "y": 62}, // L SW26 - {"flags": 4, "matrix": [4, 3], "x": 51, "y": 62}, // L SW27 - {"flags": 4, "matrix": [4, 4], "x": 65, "y": 64}, // L SW28 - {"flags": 4, "matrix": [4, 5], "x": 87, "y": 64}, // L SW29 + {"flags": 4, "matrix": [3, 1], "x": 14, "y": 51}, // L SW21 + {"flags": 4, "matrix": [3, 2], "x": 29, "y": 47}, // L SW22 + {"flags": 4, "matrix": [3, 3], "x": 43, "y": 45}, // L SW23 + {"flags": 4, "matrix": [3, 4], "x": 58, "y": 47}, // L SW24 + {"flags": 4, "matrix": [3, 5], "x": 72, "y": 49}, // L SW25 + {"flags": 4, "matrix": [4, 5], "x": 87, "y": 41}, + {"flags": 4, "matrix": [4, 4], "x": 87, "y": 64}, + {"flags": 4, "matrix": [4, 3], "x": 65, "y": 64}, + {"flags": 4, "matrix": [4, 2], "x": 51, "y": 62}, + {"flags": 4, "matrix": [4, 1], "x": 36, "y": 62}, {"flags": 2, "x": 96, "y": 64}, // L RGB1 {"flags": 2, "x": 32, "y": 64}, // L RGB2 {"flags": 2, "x": 0, "y": 64}, // L RGB3 @@ -82,36 +83,35 @@ {"flags": 2, "x": 50, "y": 0}, // L RGB6 {"flags": 2, "x": 80, "y": 0}, // L RGB7 {"flags": 2, "x": 96, "y": 32}, // L RGB8 - - {"flags": 4, "matrix": [5, 0], "x": 224, "y": 8}, // R SW01 - {"flags": 4, "matrix": [5, 1], "x": 210, "y": 6}, // R SW02 - {"flags": 4, "matrix": [5, 2], "x": 195, "y": 2}, // R SW03 - {"flags": 4, "matrix": [5, 3], "x": 181, "y": 0}, // R SW04 - {"flags": 4, "matrix": [5, 4], "x": 166, "y": 2}, // R SW05 {"flags": 4, "matrix": [5, 5], "x": 152, "y": 4}, // R SW06 - {"flags": 4, "matrix": [6, 5], "x": 152, "y": 19}, // R SW12 - {"flags": 4, "matrix": [6, 4], "x": 166, "y": 17}, // R SW11 - {"flags": 4, "matrix": [6, 3], "x": 181, "y": 15}, // R SW10 - {"flags": 4, "matrix": [6, 2], "x": 195, "y": 17}, // R SW09 - {"flags": 4, "matrix": [6, 1], "x": 210, "y": 21}, // R SW08 + {"flags": 4, "matrix": [5, 4], "x": 166, "y": 2}, // R SW05 + {"flags": 4, "matrix": [5, 3], "x": 181, "y": 0}, // R SW04 + {"flags": 4, "matrix": [5, 2], "x": 195, "y": 2}, // R SW03 + {"flags": 4, "matrix": [5, 1], "x": 210, "y": 6}, // R SW02 + {"flags": 4, "matrix": [5, 0], "x": 224, "y": 8}, // R SW01 {"flags": 4, "matrix": [6, 0], "x": 224, "y": 23}, // R SW07 - {"flags": 4, "matrix": [7, 0], "x": 224, "y": 38}, // R SW13 - {"flags": 4, "matrix": [7, 1], "x": 210, "y": 36}, // R SW14 - {"flags": 4, "matrix": [7, 2], "x": 195, "y": 32}, // R SW15 - {"flags": 4, "matrix": [7, 3], "x": 181, "y": 30}, // R SW16 - {"flags": 4, "matrix": [7, 4], "x": 166, "y": 32}, // R SW17 + {"flags": 4, "matrix": [6, 1], "x": 210, "y": 21}, // R SW08 + {"flags": 4, "matrix": [6, 2], "x": 195, "y": 17}, // R SW09 + {"flags": 4, "matrix": [6, 3], "x": 181, "y": 15}, // R SW10 + {"flags": 4, "matrix": [6, 4], "x": 166, "y": 17}, // R SW11 + {"flags": 4, "matrix": [6, 5], "x": 152, "y": 19}, // R SW12 {"flags": 4, "matrix": [7, 5], "x": 152, "y": 34}, // R SW18 - {"flags": 4, "matrix": [8, 5], "x": 152, "y": 49}, // R SW25 - {"flags": 4, "matrix": [8, 4], "x": 166, "y": 47}, // R SW24 - {"flags": 4, "matrix": [8, 3], "x": 181, "y": 45}, // R SW23 - {"flags": 4, "matrix": [8, 2], "x": 195, "y": 47}, // R SW22 - {"flags": 4, "matrix": [8, 1], "x": 210, "y": 51}, // R SW21 + {"flags": 4, "matrix": [7, 4], "x": 166, "y": 32}, // R SW17 + {"flags": 4, "matrix": [7, 3], "x": 181, "y": 30}, // R SW16 + {"flags": 4, "matrix": [7, 2], "x": 195, "y": 32}, // R SW15 + {"flags": 4, "matrix": [7, 1], "x": 210, "y": 36}, // R SW14 + {"flags": 4, "matrix": [7, 0], "x": 224, "y": 38}, // R SW13 {"flags": 4, "matrix": [8, 0], "x": 224, "y": 53}, // R SW20 - {"flags": 4, "matrix": [9, 5], "x": 137, "y": 64}, // R SW29 - {"flags": 4, "matrix": [9, 4], "x": 159, "y": 64}, // R SW28 - {"flags": 4, "matrix": [9, 3], "x": 173, "y": 62}, // R SW27 - {"flags": 4, "matrix": [9, 2], "x": 188, "y": 62}, // R SW26 - {"flags": 4, "matrix": [9, 1], "x": 137, "y": 41}, // R SW19 + {"flags": 4, "matrix": [8, 1], "x": 210, "y": 51}, // R SW21 + {"flags": 4, "matrix": [8, 2], "x": 195, "y": 47}, // R SW22 + {"flags": 4, "matrix": [8, 3], "x": 181, "y": 45}, // R SW23 + {"flags": 4, "matrix": [8, 4], "x": 166, "y": 47}, // R SW24 + {"flags": 4, "matrix": [8, 5], "x": 152, "y": 49}, // R SW25 + {"flags": 4, "matrix": [9, 5], "x": 137, "y": 41}, + {"flags": 4, "matrix": [9, 4], "x": 137, "y": 64}, + {"flags": 4, "matrix": [9, 3], "x": 159, "y": 64}, + {"flags": 4, "matrix": [9, 2], "x": 173, "y": 62}, + {"flags": 4, "matrix": [9, 1], "x": 188, "y": 62}, {"flags": 2, "x": 128, "y": 64}, // R RGB1 {"flags": 2, "x": 192, "y": 64}, // R RGB2 {"flags": 2, "x": 224, "y": 64}, // R RGB3 diff --git a/keyboards/lily58/r2g/r2g.c b/keyboards/lily58/r2g/r2g.c index 845e8f455cd7..3c48f60fe751 100644 --- a/keyboards/lily58/r2g/r2g.c +++ b/keyboards/lily58/r2g/r2g.c @@ -1,106 +1,6 @@ #include "r2g.h" #include "quantum.h" -// #ifdef RGB_MATRIX_ENABLE - -// // Logical Layout -// // Columns -// // Left -// // 0 1 2 3 4 5 -// // ROWS -// // 05 04 03 02 01 00 0 -// // -// // 06 07 08 09 10 11 1 -// // -// // 17 16 15 14 13 12 2 -// // -// // 18 19 20 21 22 23 3 -// // -// // 28 27 26 25 24 4 -// // -// // 29 31 32 33 34 35 36 37 UG -// // -// // Right -// // 0 1 2 3 4 5 -// // ROWS -// // 05 04 03 02 01 00 0 -// // -// // 06 07 08 09 10 11 1 -// // -// // 17 16 15 14 13 12 2 -// // -// // 18 19 20 21 22 23 3 -// // -// // 28 27 26 25 24 4 -// // -// // 29 31 32 33 34 35 36 37 UG -// // - -// // Physical Layout -// // Columns -// // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -// // ROWS -// // 05 04 03 02 01 00 00 01 02 03 04 05 0 0 -// // -// // 06 07 08 09 10 11 11 10 09 08 07 06 1 16 -// // -// // 17 16 15 14 13 12 12 13 14 15 16 17 2 32 -// // -// // 18 19 20 21 22 23 24 24 23 22 21 20 19 18 3 48 -// // -// // 28 27 26 25 25 26 27 28 4 64 -// // -// // 29 30 31 32 33 34 35 36 UG -// // -// // 0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 - -// led_config_t g_led_config = { { -// { 5, 4, 3, 2, 1, 0 }, -// { 6, 7, 8, 9, 10, 11 }, -// { 17, 16, 15, 14, 13, 12 }, -// { 18, 19, 20, 21, 22, 23 }, -// {NO_LED, 28, 27, 26, 25, 24 }, -// { 42, 41, 40, 39, 38, 37 }, -// { 43, 44, 45, 46, 47, 48 }, -// { 54, 53, 52, 51, 50, 49 }, -// { 55, 56, 57, 58, 59, 60 }, -// {NO_LED, 65, 64, 63, 62, 61 } -// }, { - -// { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, -// { 0, 16 }, { 16, 16 }, { 32, 16 }, { 48, 16 }, { 64, 16 }, { 80, 16 }, -// { 80, 32 }, { 64, 32 }, { 48, 32 }, { 32, 32 }, { 16, 32 }, { 0, 32 }, -// { 0, 48 }, { 16, 48 }, { 32, 48 }, { 48, 48 }, { 64, 48 }, { 80, 48 }, -// { 96, 48 }, { 96, 64 }, { 80, 64 }, { 64, 64 }, - -// { 96, 64}, {32, 64}, { 0, 64}, { 0 , 32 }, { 16, 0 }, {50,0}, {80,0}, {96,32} - -// { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, {224, 0 }, -// { 224, 16 }, { 208, 16 }, { 192, 16 }, { 176, 16 }, { 160, 16 }, {144, 16 }, -// { 144, 32 }, { 160, 32 }, { 176, 32 }, { 192, 32 }, { 208, 32 }, {224, 32 }, -// { 224, 48 }, { 208, 48 }, { 192, 48 }, { 176, 48 }, { 160, 48 }, {144, 48 }, -// { 128, 48 }, { 128, 64 }, { 144, 64 }, { 160, 64 } - -// { 128, 64}, {192, 64}, { 224, 64}, { 224 , 32 }, { 206, 0 }, {150,0}, {140,0}, {128,32} - - -// }, { -// 1, 1, 1, 1, 1, 4, -// 4, 1, 1, 1, 1, 1, -// 1, 1, 1, 1, 1, 4, -// 4, 1, 1, 1, 1, 1, 4, -// 4, 4, 4, 4, -// 2, 2, 2, 2, 2, 2, 2, 2, -// 1, 1, 1, 1, 1, 4, -// 4, 1, 1, 1, 1, 1, -// 1, 1, 1, 1, 1, 4, -// 4, 1, 1, 1, 1, 1, 4, -// 4, 4, 4, 4, -// 2, 2, 2, 2, 2, 2, 2, 2, -// } }; - -// #endif - #ifdef OLED_ENABLE From 8d0511e3f012148335404cc6ee4d6e0966679fca Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Sun, 18 Dec 2022 20:45:37 +0700 Subject: [PATCH 08/17] add bootloader to rules --- keyboards/lily58/r2g/rules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/lily58/r2g/rules.mk b/keyboards/lily58/r2g/rules.mk index 4da205a168c7..1a3d14fa3ef6 100644 --- a/keyboards/lily58/r2g/rules.mk +++ b/keyboards/lily58/r2g/rules.mk @@ -1 +1,2 @@ LTO_ENABLE = yes +BOOTLOADER = atmel-dfu From 4af5049f4b5a75441887a0e5ae6164f4489f2da8 Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Mon, 19 Dec 2022 15:14:25 +0700 Subject: [PATCH 09/17] Add a specific keymap and more rgb options --- keyboards/lily58/keymaps/mb_via/config.h | 39 +++++++ keyboards/lily58/keymaps/mb_via/keymap.c | 123 +++++++++++++++++++++++ keyboards/lily58/keymaps/mb_via/rules.mk | 5 + keyboards/lily58/r2g/config.h | 15 +++ 4 files changed, 182 insertions(+) create mode 100644 keyboards/lily58/keymaps/mb_via/config.h create mode 100644 keyboards/lily58/keymaps/mb_via/keymap.c create mode 100644 keyboards/lily58/keymaps/mb_via/rules.mk diff --git a/keyboards/lily58/keymaps/mb_via/config.h b/keyboards/lily58/keymaps/mb_via/config.h new file mode 100644 index 000000000000..a5dfe7c8d31f --- /dev/null +++ b/keyboards/lily58/keymaps/mb_via/config.h @@ -0,0 +1,39 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +// Underglow +/* +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_SLEEP +*/ diff --git a/keyboards/lily58/keymaps/mb_via/keymap.c b/keyboards/lily58/keymaps/mb_via/keymap.c new file mode 100644 index 000000000000..424b45118049 --- /dev/null +++ b/keyboards/lily58/keymaps/mb_via/keymap.c @@ -0,0 +1,123 @@ + /* Copyright 2020 Naoki Katahira + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H +#include + +//extern uint8_t is_master; + +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ~ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LCTRL | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | + * | | | |/ / \ \ | | | | + * `-------------------''-------' '------''--------------------' + */ + + [_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + LOWER, KC_LGUI, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, KC_RGUI, RAISE +), +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | 1 | 2 | 3 | 4 | 5 |-------. ,-------| 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | ` | + | { | } | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | + * | | | |/ / \ \ | | | | + * `-------------------''-------' '------''--------------------' + */ +[_LOWER] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_GRAVE, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |RGBTOG|RGBHUI|RGBSAI|RGBVAI| |-------. ,-------| | Left | Down | Up |Right | | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * |RGBMOD|RGBHUD|RGBSAD|RGBVAD| | |-------| |-------| + | = | [ | ] | \ | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | + * | | | |/ / \ \ | | | | + * `-------------------''-------' '------''--------------------' + */ + +[_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + 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, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, KC_PLUS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------. ,-------| | | | | | | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | | | | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + [_ADJUST] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + diff --git a/keyboards/lily58/keymaps/mb_via/rules.mk b/keyboards/lily58/keymaps/mb_via/rules.mk new file mode 100644 index 000000000000..d3528d52a1a2 --- /dev/null +++ b/keyboards/lily58/keymaps/mb_via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes diff --git a/keyboards/lily58/r2g/config.h b/keyboards/lily58/r2g/config.h index 8ec568128c90..470e9427e441 100644 --- a/keyboards/lily58/r2g/config.h +++ b/keyboards/lily58/r2g/config.h @@ -54,10 +54,25 @@ along with this program. If not, see . # define RGB_MATRIX_LED_FLUSH_LIMIT 16 # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 +# define RGB_MATRIX_KEYPRESSES +# define RGB_MATRIX_KEYRELEASES +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS + + # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN # define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT # define ENABLE_RGB_MATRIX_ALPHAS_MODS # define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON + +#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES) +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_MULTISPLASH +#endif + # define SPLIT_TRANSPORT_MIRROR #endif From 9c0799093825737632d3bdebff6e4b7de07c4793 Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Thu, 16 Feb 2023 17:41:49 +0000 Subject: [PATCH 10/17] Add Readme and liscencing --- keyboards/lily58/keymaps/mb_via/config.h | 1 + keyboards/lily58/keymaps/mb_via/keymap.c | 1 + keyboards/lily58/r2g/config.h | 17 +-------------- keyboards/lily58/r2g/readme.md | 27 ++++++++++++++++++++++++ 4 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 keyboards/lily58/r2g/readme.md diff --git a/keyboards/lily58/keymaps/mb_via/config.h b/keyboards/lily58/keymaps/mb_via/config.h index a5dfe7c8d31f..a112c27ed614 100644 --- a/keyboards/lily58/keymaps/mb_via/config.h +++ b/keyboards/lily58/keymaps/mb_via/config.h @@ -3,6 +3,7 @@ This is the c configuration file for the keymap Copyright 2012 Jun Wako Copyright 2015 Jack Humbert +Copyright 2023 Elliot Powell This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/keyboards/lily58/keymaps/mb_via/keymap.c b/keyboards/lily58/keymaps/mb_via/keymap.c index 424b45118049..abb8f8978c0d 100644 --- a/keyboards/lily58/keymaps/mb_via/keymap.c +++ b/keyboards/lily58/keymaps/mb_via/keymap.c @@ -1,4 +1,5 @@ /* Copyright 2020 Naoki Katahira + * Copyright 2023 Elliot Powell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/keyboards/lily58/r2g/config.h b/keyboards/lily58/r2g/config.h index 470e9427e441..ef57ea562718 100644 --- a/keyboards/lily58/r2g/config.h +++ b/keyboards/lily58/r2g/config.h @@ -2,6 +2,7 @@ Copyright 2012 Jun Wako Copyright 2015 Jack Humbert Copyright 2017 F_YUUCHI +Copyright 2023 Elliot Powell This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,22 +33,6 @@ along with this program. If not, see . //#define LOCKING_RESYNC_ENABLE -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -// #define NO_DEBUG - -/* disable print */ -// #define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_LED_COUNT 74 # define RGB_DISABLE_WHEN_USB_SUSPENDED diff --git a/keyboards/lily58/r2g/readme.md b/keyboards/lily58/r2g/readme.md new file mode 100644 index 000000000000..da46b6cf6c35 --- /dev/null +++ b/keyboards/lily58/r2g/readme.md @@ -0,0 +1,27 @@ +# Lily58 R2G + +Lily58 R2G is factory assembled version of the lilly 58 featuring hotswap and perkey rgb + +![Lily58_R2G](https://i.imgur.com/4vPkIQ5.png) +Keyboard Maintainer: [Elliot Powell](https://github.com/e11i0t23) +Hardware Supported: Lily58 R2G PCB +Hardware Availability: [Mechboards UK](https://mechboards.co.uk/products/lily58-r2g-ready2go-kit) + +Make example for this keyboard (after setting up your build environment): +```sh +make crkbd/r2g:mb_via +``` + +Flash example for this keyboard: +```sh +qmk flash -kb crkbd/r2g -km mb_via +``` + +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 + +These PCBs have a reset on the underside of the PCB next to the controller which may be pressed to enter in to the bootloader. + +Additionally, if you hold down the "ESC" or "GRV" buttons when plugging in that half of the keyboard (per the default QWERTY layout), this will jump to the bootloader and reset the EEPROM (persistent storage). + From 89a226038da65a13c210a3325ef230ad5b49cf8c Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Sat, 18 Feb 2023 11:58:35 +0000 Subject: [PATCH 11/17] Remove Reference to r2g.h and update layers --- keyboards/lily58/lily58.h | 2 -- keyboards/lily58/r2g/r2g.c | 34 +++++++++++++++++++++++----------- keyboards/lily58/r2g/r2g.h | 3 --- 3 files changed, 23 insertions(+), 16 deletions(-) delete mode 100644 keyboards/lily58/r2g/r2g.h diff --git a/keyboards/lily58/lily58.h b/keyboards/lily58/lily58.h index 44edeefaf23e..c08203003243 100644 --- a/keyboards/lily58/lily58.h +++ b/keyboards/lily58/lily58.h @@ -6,6 +6,4 @@ #include "light.h" #elif KEYBOARD_lily58_glow_enc #include "glow_enc.h" -#elif KEYBOARD_lily58_r2g - #include "r2g.h" #endif diff --git a/keyboards/lily58/r2g/r2g.c b/keyboards/lily58/r2g/r2g.c index 3c48f60fe751..813d855029ba 100644 --- a/keyboards/lily58/r2g/r2g.c +++ b/keyboards/lily58/r2g/r2g.c @@ -1,4 +1,19 @@ -#include "r2g.h" +/* Copyright 2023 Elliot Powell + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "quantum.h" @@ -11,28 +26,25 @@ oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return rotation; } -enum Layers{ - _QWERTY = 0, - _LOWER, - _RAISE, - _ADJUST, -}; void oled_render_layer_state_r2g(void) { oled_write_P(PSTR("Layer: "), false); switch (get_highest_layer(layer_state)) { - case _QWERTY: + case 0: oled_write_ln_P(PSTR("Default"), false); break; - case _LOWER: + case 1: oled_write_ln_P(PSTR("Lower"), false); break; - case _RAISE: + case 2: oled_write_ln_P(PSTR("Raise"), false); break; - case _ADJUST: + case 3: oled_write_ln_P(PSTR("Adjust"), false); break; + default: + oled_write_ln_P(PSTR("Unknown"), false); + break; } } diff --git a/keyboards/lily58/r2g/r2g.h b/keyboards/lily58/r2g/r2g.h deleted file mode 100644 index 6e308fa35ede..000000000000 --- a/keyboards/lily58/r2g/r2g.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#include "lily58.h" From 891d6584b85bd4907686284153ad25473067b0e2 Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Sat, 18 Feb 2023 12:00:42 +0000 Subject: [PATCH 12/17] remove obselensence --- keyboards/lily58/keymaps/mb_via/config.h | 8 -------- keyboards/lily58/keymaps/mb_via/keymap.c | 3 --- 2 files changed, 11 deletions(-) diff --git a/keyboards/lily58/keymaps/mb_via/config.h b/keyboards/lily58/keymaps/mb_via/config.h index a112c27ed614..bd4e11fb0e61 100644 --- a/keyboards/lily58/keymaps/mb_via/config.h +++ b/keyboards/lily58/keymaps/mb_via/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #pragma once -//#define USE_MATRIX_I2C - /* Select hand configuration */ #define MASTER_LEFT @@ -32,9 +30,3 @@ along with this program. If not, see . #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 -// Underglow -/* -#undef RGBLED_NUM -#define RGBLED_NUM 14 // Number of LEDs -#define RGBLIGHT_SLEEP -*/ diff --git a/keyboards/lily58/keymaps/mb_via/keymap.c b/keyboards/lily58/keymaps/mb_via/keymap.c index abb8f8978c0d..cef682db533e 100644 --- a/keyboards/lily58/keymaps/mb_via/keymap.c +++ b/keyboards/lily58/keymaps/mb_via/keymap.c @@ -16,9 +16,6 @@ */ #include QMK_KEYBOARD_H -#include - -//extern uint8_t is_master; enum layer_number { _QWERTY = 0, From f3efba1c0b8a971331a1e9b3fc0c823d7b6070e3 Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Sat, 18 Feb 2023 12:01:10 +0000 Subject: [PATCH 13/17] ensure rgblight has maximum value --- keyboards/lily58/r2g/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/lily58/r2g/config.h b/keyboards/lily58/r2g/config.h index ef57ea562718..b36d8fc06e29 100644 --- a/keyboards/lily58/r2g/config.h +++ b/keyboards/lily58/r2g/config.h @@ -62,6 +62,6 @@ along with this program. If not, see . #endif #ifdef RGBLIGHT_ENABLE -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 +# define RGBLIGHT_LIMIT_VAL 120 #endif From cfd74b450f7b96ca4b21d4a94b91e0ca4484551a Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Sat, 18 Feb 2023 12:02:04 +0000 Subject: [PATCH 14/17] update readme --- keyboards/lily58/r2g/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/lily58/r2g/readme.md b/keyboards/lily58/r2g/readme.md index da46b6cf6c35..ad48dcfbd208 100644 --- a/keyboards/lily58/r2g/readme.md +++ b/keyboards/lily58/r2g/readme.md @@ -14,7 +14,7 @@ make crkbd/r2g:mb_via Flash example for this keyboard: ```sh -qmk flash -kb crkbd/r2g -km mb_via +make crkbd/r2g:mb_via: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). From 4e40abbcedd2fc9ecbf90760c3f959aac7e56fee Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Sat, 18 Feb 2023 12:03:12 +0000 Subject: [PATCH 15/17] remove debounce settings from config --- keyboards/lily58/r2g/config.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/keyboards/lily58/r2g/config.h b/keyboards/lily58/r2g/config.h index b36d8fc06e29..18857d86c0b0 100644 --- a/keyboards/lily58/r2g/config.h +++ b/keyboards/lily58/r2g/config.h @@ -21,17 +21,6 @@ along with this program. If not, see . #pragma once //#define SERIAL_USE_MULTI_TRANSACTION -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* 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 - #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_LED_COUNT 74 From b55b0086f15a73e965bb47307d2e8bd6a3fc3f9e Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Sat, 18 Feb 2023 12:06:09 +0000 Subject: [PATCH 16/17] move rgb define --- keyboards/lily58/r2g/config.h | 1 + keyboards/lily58/r2g/info.json | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/keyboards/lily58/r2g/config.h b/keyboards/lily58/r2g/config.h index 18857d86c0b0..1d857ce696ae 100644 --- a/keyboards/lily58/r2g/config.h +++ b/keyboards/lily58/r2g/config.h @@ -23,6 +23,7 @@ along with this program. If not, see . #ifdef RGB_MATRIX_ENABLE +# define RGB_DI_PIN D3 # define RGB_MATRIX_LED_COUNT 74 # define RGB_DISABLE_WHEN_USB_SUSPENDED # define RGB_MATRIX_LED_FLUSH_LIMIT 16 diff --git a/keyboards/lily58/r2g/info.json b/keyboards/lily58/r2g/info.json index 5d6dac379f29..909cc78f18e3 100644 --- a/keyboards/lily58/r2g/info.json +++ b/keyboards/lily58/r2g/info.json @@ -35,13 +35,6 @@ ] } }, - "rgblight": { - "pin": "D3", - "led_count": 74, - "split": true, - "split_count": [37, 37] - }, - "rgb_matrix": { "driver": "WS2812", "split_count": [37, 37], From 83caa2d5d2b31a7f76eeb393dd3f2c920d1e352d Mon Sep 17 00:00:00 2001 From: Elliot Powell Date: Sat, 18 Feb 2023 12:06:23 +0000 Subject: [PATCH 17/17] remove bootloader --- keyboards/lily58/r2g/rules.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/lily58/r2g/rules.mk b/keyboards/lily58/r2g/rules.mk index 1a3d14fa3ef6..4da205a168c7 100644 --- a/keyboards/lily58/r2g/rules.mk +++ b/keyboards/lily58/r2g/rules.mk @@ -1,2 +1 @@ LTO_ENABLE = yes -BOOTLOADER = atmel-dfu