From 8d7223ef5cd0c6e0917dc504c943e591820c4093 Mon Sep 17 00:00:00 2001 From: stanrc85 Date: Fri, 12 Apr 2024 05:43:21 -0400 Subject: [PATCH 1/5] ironergo and vial port --- keyboards/smithrune/ironergo/config.h | 30 ++ keyboards/smithrune/ironergo/halconf.h | 21 ++ keyboards/smithrune/ironergo/info.json | 106 +++++++ .../ironergo/keymaps/default/keymap.c | 35 +++ .../smithrune/ironergo/keymaps/via/keymap.c | 35 +++ .../smithrune/ironergo/keymaps/via/rules.mk | 1 + .../smithrune/ironergo/keymaps/vial/config.h | 8 + .../smithrune/ironergo/keymaps/vial/keymap.c | 49 +++ .../smithrune/ironergo/keymaps/vial/rules.mk | 4 + .../smithrune/ironergo/keymaps/vial/vial.json | 291 ++++++++++++++++++ keyboards/smithrune/ironergo/mcuconf.h | 22 ++ keyboards/smithrune/ironergo/readme.md | 25 ++ keyboards/smithrune/ironergo/rules.mk | 2 + 13 files changed, 629 insertions(+) create mode 100644 keyboards/smithrune/ironergo/config.h create mode 100644 keyboards/smithrune/ironergo/halconf.h create mode 100644 keyboards/smithrune/ironergo/info.json create mode 100644 keyboards/smithrune/ironergo/keymaps/default/keymap.c create mode 100644 keyboards/smithrune/ironergo/keymaps/via/keymap.c create mode 100644 keyboards/smithrune/ironergo/keymaps/via/rules.mk create mode 100644 keyboards/smithrune/ironergo/keymaps/vial/config.h create mode 100644 keyboards/smithrune/ironergo/keymaps/vial/keymap.c create mode 100644 keyboards/smithrune/ironergo/keymaps/vial/rules.mk create mode 100644 keyboards/smithrune/ironergo/keymaps/vial/vial.json create mode 100644 keyboards/smithrune/ironergo/mcuconf.h create mode 100644 keyboards/smithrune/ironergo/readme.md create mode 100644 keyboards/smithrune/ironergo/rules.mk diff --git a/keyboards/smithrune/ironergo/config.h b/keyboards/smithrune/ironergo/config.h new file mode 100644 index 0000000000..8dbabc2cc2 --- /dev/null +++ b/keyboards/smithrune/ironergo/config.h @@ -0,0 +1,30 @@ +/* +Copyright 2023 Gondolindrim + +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 BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 4 +#define BACKLIGHT_PAL_MODE 2 + +/* 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 + +#define WEAR_LEVELING_LOGICAL_SIZE 2048 +#define WEAR_LEVELING_BACKING_SIZE 4096 diff --git a/keyboards/smithrune/ironergo/halconf.h b/keyboards/smithrune/ironergo/halconf.h new file mode 100644 index 0000000000..1251bb13ac --- /dev/null +++ b/keyboards/smithrune/ironergo/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2023 Gondolindrim + * + * 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 HAL_USE_PWM TRUE + +#include_next diff --git a/keyboards/smithrune/ironergo/info.json b/keyboards/smithrune/ironergo/info.json new file mode 100644 index 0000000000..f5eb62dfac --- /dev/null +++ b/keyboards/smithrune/ironergo/info.json @@ -0,0 +1,106 @@ +{ + "keyboard_name": "Iron Ergo", + "manufacturer": "SmithRune", + "url": "", + "maintainer": "Gondolindrim", + "usb": { + "vid": "0x8384", + "pid": "0x4945", + "device_version": "0.0.1" + }, + "features": { + "extrakey": true, + "lto": true, + "mousekey": true, + "nkro": true, + "backlight": true + }, + "matrix_pins": { + "cols": ["C9" , "C8" , "C7" , "C6" , "B15", "B14", "B12", "B9" , "A15" , "C3" , "C2" , "C12" , "C1" , "B4" , "B3" , "D2" ], + "rows": ["A10", "A8" , "B13", "A2" , "A1" , "C10", "C11", "B5" , "C0" ] + }, + "diode_direction": "COL2ROW", + "backlight": { + "pin": "B1", + "levels": 20, + "breathing": true + }, + "processor": "STM32F401", + "bootloader": "stm32-dfu", + "layouts": { + "LAYOUT": { + "layout":[ + {"matrix":[0,0], "x":1.25, "y":1.25}, + {"matrix":[0,1], "x":2.45, "y":1.25}, + {"matrix":[0,2], "x":3.45, "y":1.25}, + {"matrix":[0,3], "x":4.45, "y":1.25}, + {"matrix":[0,4], "x":5.45, "y":1.25}, + {"matrix":[0,5], "x":6.45, "y":1.25}, + {"matrix":[0,6], "x":7.45, "y":1.25}, + {"matrix":[0,7], "x":8.45, "y":1.25}, + {"matrix":[5,8], "x":10.4, "y":1.25}, + {"matrix":[5,9], "x":11.4, "y":1.25}, + {"matrix":[5,10], "x":12.4, "y":1.25}, + {"matrix":[5,11], "x":13.4, "y":1.25}, + {"matrix":[5,12], "x":14.4, "y":1.25}, + {"matrix":[5,13], "x":15.4, "y":1.25}, + {"matrix":[5,14], "x":16.4, "y":1.25}, + {"matrix":[5,15], "x":17.4, "y":1.25}, + + {"matrix":[1,0], "x":1, "y":2.25}, + {"matrix":[1,1], "x":2.25, "y":2.25, "w":1.5}, + {"matrix":[1,2], "x":3.75, "y":2.25}, + {"matrix":[1,3], "x":4.75, "y":2.25}, + {"matrix":[1,4], "x":5.75, "y":2.25}, + {"matrix":[1,5], "x":6.75, "y":2.25}, + {"matrix":[1,6], "x":7.75, "y":2.25}, + {"matrix":[6,7], "x":10.25, "y":2.25}, + {"matrix":[6,8], "x":11.25, "y":2.25}, + {"matrix":[6,9], "x":12.25, "y":2.25}, + {"matrix":[6,10], "x":13.25, "y":2.25}, + {"matrix":[6,11], "x":14.25, "y":2.25}, + {"matrix":[6,12], "x":15.25, "y":2.25}, + {"matrix":[6,13], "x":16.25, "y":2.25}, + {"matrix":[6,14], "x":17.25, "y":2.25, "w":1.5}, + + {"matrix":[2,0], "x":0.75, "y":3.25}, + {"matrix":[2,1], "x":2.05, "y":3.25, "w":1.75}, + {"matrix":[2,2], "x":3.8, "y":3.25}, + {"matrix":[2,3], "x":4.8, "y":3.25}, + {"matrix":[2,4], "x":5.8, "y":3.25}, + {"matrix":[2,5], "x":6.8, "y":3.25}, + {"matrix":[2,6], "x":7.8, "y":3.25}, + {"matrix":[7,7], "x":10.65, "y":3.25}, + {"matrix":[7,8], "x":11.65, "y":3.25}, + {"matrix":[7,9], "x":12.65, "y":3.25}, + {"matrix":[7,10], "x":13.65, "y":3.25}, + {"matrix":[7,12], "x":14.65, "y":3.25}, + {"matrix":[7,13], "x":15.65, "y":3.25}, + {"matrix":[7,14], "x":16.65, "y":3.25, "w":2.25}, + + {"matrix":[3,1], "x":1.8, "y":4.25, "w":2.25}, + {"matrix":[3,2], "x":4.05, "y":4.25}, + {"matrix":[3,3], "x":5.05, "y":4.25}, + {"matrix":[3,4], "x":6.05, "y":4.25}, + {"matrix":[3,5], "x":7.05, "y":4.25}, + {"matrix":[3,6], "x":8.05, "y":4.25}, + {"matrix":[8,7], "x":10.35, "y":4.25}, + {"matrix":[8,8], "x":11.35, "y":4.25}, + {"matrix":[8,9], "x":12.35, "y":4.25}, + {"matrix":[8,10], "x":13.35, "y":4.25}, + {"matrix":[8,12], "x":14.35, "y":4.25}, + {"matrix":[8,13], "x":15.35, "y":4.25}, + {"matrix":[8,14], "x":16.35, "y":4.25, "w":1.75}, + {"matrix":[8,15], "x":18.1, "y":4.25}, + + {"matrix":[4,2], "x":2.05, "y":5.25, "w":1.5}, + {"matrix":[4,4], "x":4.35, "y":5.25, "w":1.5}, + {"matrix":[4,5], "x":5.85, "y":5.25, "w":2.25}, + {"matrix":[4,6], "x":8.1, "y":5.25}, + {"matrix":[4,8], "x":10.25, "y":5.25, "w":2.75}, + {"matrix":[4,10], "x":13.0, "y":5.25, "w":1.5}, + {"matrix":[4,13], "x":16.6, "y":5.25, "w":1.5} + ] + } + } +} diff --git a/keyboards/smithrune/ironergo/keymaps/default/keymap.c b/keyboards/smithrune/ironergo/keymaps/default/keymap.c new file mode 100644 index 0000000000..61eb6affda --- /dev/null +++ b/keyboards/smithrune/ironergo/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2012,2013 Jun Wako + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC , KC_GRV , 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_BSPC, + KC_PGUP, 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_PGDN, 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_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1) , + KC_LCTL, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_RCTL + ), + [1] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/smithrune/ironergo/keymaps/via/keymap.c b/keyboards/smithrune/ironergo/keymaps/via/keymap.c new file mode 100644 index 0000000000..61eb6affda --- /dev/null +++ b/keyboards/smithrune/ironergo/keymaps/via/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2012,2013 Jun Wako + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC , KC_GRV , 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_BSPC, + KC_PGUP, 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_PGDN, 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_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1) , + KC_LCTL, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_RCTL + ), + [1] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/smithrune/ironergo/keymaps/via/rules.mk b/keyboards/smithrune/ironergo/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/smithrune/ironergo/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/smithrune/ironergo/keymaps/vial/config.h b/keyboards/smithrune/ironergo/keymaps/vial/config.h new file mode 100644 index 0000000000..92b8a98a07 --- /dev/null +++ b/keyboards/smithrune/ironergo/keymaps/vial/config.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0xAA, 0xC8, 0x11, 0x78, 0x6E, 0xFD, 0x1E, 0x3E} + +#define VIAL_UNLOCK_COMBO_ROWS { 0, 7 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 14 } \ No newline at end of file diff --git a/keyboards/smithrune/ironergo/keymaps/vial/keymap.c b/keyboards/smithrune/ironergo/keymaps/vial/keymap.c new file mode 100644 index 0000000000..a310715ea5 --- /dev/null +++ b/keyboards/smithrune/ironergo/keymaps/vial/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2012,2013 Jun Wako + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC , KC_GRV , 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_BSPC, + KC_PGUP, 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_PGDN, 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_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1) , + KC_LCTL, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_RCTL + ), + [1] = LAYOUT( + KC_ESC , KC_GRV , 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_BSPC, + KC_PGUP, 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_PGDN, 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_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1) , + KC_LCTL, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_RCTL + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/smithrune/ironergo/keymaps/vial/rules.mk b/keyboards/smithrune/ironergo/keymaps/vial/rules.mk new file mode 100644 index 0000000000..29583169d4 --- /dev/null +++ b/keyboards/smithrune/ironergo/keymaps/vial/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +QMK_SETTINGS = yes +TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/keyboards/smithrune/ironergo/keymaps/vial/vial.json b/keyboards/smithrune/ironergo/keymaps/vial/vial.json new file mode 100644 index 0000000000..f0ce208276 --- /dev/null +++ b/keyboards/smithrune/ironergo/keymaps/vial/vial.json @@ -0,0 +1,291 @@ +{ + "name": "Smith and Rune Iron Ergo", + "vendorId": "0x8384", + "productId": "0x4945", + "keycodes": ["qmk_lighting"], + "menus": ["qmk_backlight"], + "matrix": {"rows": 9, "cols": 16}, + "layouts": { + "labels": [ + "Split Backspace", + "Split Right Shift", + "Split Left Space" + ], + "keymap":[ + [ + { + "x": 16.9, + "c": "#aaaaaa" + }, + "5,14\n\n\n0,1", + "5,15\n\n\n0,1" + ], + [ + { + "x": 4.45, + "c": "#cccccc" + }, + "0,3" + ], + [ + { + "y": -0.8, + "x": 14.9 + }, + "5,12" + ], + [ + { + "y": -0.95, + "x": 1.25 + }, + "0,0", + { + "x": 0.2 + }, + "0,1", + "0,2", + { + "x": 11.45 + }, + "5,13", + { + "c": "#aaaaaa", + "w": 2 + }, + "5,14\n\n\n0,0" + ], + [ + { + "y": -0.05, + "x": 14.75, + "c": "#cccccc" + }, + "6,11" + ], + [ + { + "y": -0.95, + "x": 1 + }, + "1,0", + { + "x": 0.25, + "c": "#aaaaaa", + "w": 1.5 + }, + "1,1", + { + "c": "#cccccc" + }, + "1,2", + { + "x": 11 + }, + "6,12", + "6,13", + { + "c": "#aaaaaa", + "w": 1.5 + }, + "6,14" + ], + [ + { + "x": 0.75, + "c": "#cccccc" + }, + "2,0", + { + "x": 0.3, + "c": "#aaaaaa", + "w": 1.75 + }, + "2,1", + { + "c": "#cccccc" + }, + "2,2", + { + "x": 10.35 + }, + "7,12", + { + "x": 0 + }, + "7,13", + { + "c": "#777777", + "w": 2.25 + }, + "7,14" + ], + [ + { + "x": 1.8, + "c": "#aaaaaa", + "w": 2.25 + }, + "3,1", + { + "c": "#cccccc" + }, + "3,2", + { + "x": 9.8 + }, + "8,12", + { + "x": 0 + }, + "8,13", + { + "c": "#aaaaaa", + "w": 2.75 + }, + "8,14\n\n\n1,0", + { + "x": 0.65, + "w": 1.75 + }, + "8,14\n\n\n1,1", + { + "c": "#cccccc" + }, + "8,15\n\n\n1,1" + ], + [ + { + "x": 2.05, + "c": "#aaaaaa", + "w": 1.5 + }, + "4,2", + { + "x": 13.55, + "w": 1.5 + }, + "4,13" + ], + [ + { + "r": 12, + "y": -6.25, + "x": 5.8, + "c": "#cccccc" + }, + "0,4", + "0,5", + "0,6", + "0,7" + ], + [ + { + "x": 5.35 + }, + "1,3", + "1,4", + "1,5", + "1,6" + ], + [ + { + "x": 5.6 + }, + "2,3", + "2,4", + "2,5", + "2,6" + ], + [ + { + "x": 6.05 + }, + "3,3", + "3,4", + "3,5", + "3,6" + ], + [ + { + "x": 7.1, + "w": 2.25 + }, + "4,5\n\n\n2,0", + "4,6\n\n\n2,0" + ], + [ + { + "y": -0.7999999999999998, + "x": 5.6, + "c": "#aaaaaa", + "w": 1.5 + }, + "4,4" + ], + [ + { + "y": -0.20000000000000018, + "x": 7.1, + "c": "#cccccc", + "w": 2 + }, + "4,5\n\n\n2,1", + { + "w": 1.25 + }, + "4,6\n\n\n2,1" + ], + [ + { + "r": -12, + "y": -1.8499999999999996, + "x": 9.95 + }, + "5,8", + "5,9", + "5,10", + "5,11" + ], + [ + { + "x": 9.55 + }, + "6,7", + "6,8", + "6,9", + "6,10" + ], + [ + { + "x": 9.7 + }, + "7,7", + "7,8", + "7,9", + "7,10" + ], + [ + { + "x": 9.25 + }, + "8,7", + "8,8", + "8,9", + "8,10" + ], + [ + { + "x": 9, + "w": 2.75 + }, + "4,8", + { + "c": "#aaaaaa", + "w": 1.5 + }, + "4,10" + ] +] +} +} diff --git a/keyboards/smithrune/ironergo/mcuconf.h b/keyboards/smithrune/ironergo/mcuconf.h new file mode 100644 index 0000000000..b7b462f8cd --- /dev/null +++ b/keyboards/smithrune/ironergo/mcuconf.h @@ -0,0 +1,22 @@ +/* Copyright 2023 Gondolindrim + * + * 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 + +#include_next + +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE diff --git a/keyboards/smithrune/ironergo/readme.md b/keyboards/smithrune/ironergo/readme.md new file mode 100644 index 0000000000..0bf228ff15 --- /dev/null +++ b/keyboards/smithrune/ironergo/readme.md @@ -0,0 +1,25 @@ +# Smith and Rune Iron Ergo QMK folder + +## Introduction + +This is the QMK Firmware repository for the Iron Ergo PCB, a keyboard designed by [Smith and Rune](https://smithrune.com/) and PCB designed by [Gondolindrim](http://github.com/Gondolindrim). + +The Iron Ergo is an Alice-layout PCB designed for the Iron Ergo keyboardt. It supports in-switch single-color LEDs. + +As of June 2023, the Iron Ergo has not entered public sale. + +## How to compile + +After setting up your build environment, you can compile the Iron180 default keymap by using: + + make smithrune/ironergo:default + +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 (ESC key in the default layout) and plug in the keyboard +* **Physical reset button**: press and hold the button on the back of the PCB for at least 5 seconds +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available (ESC key at layer 1 in the default layout) diff --git a/keyboards/smithrune/ironergo/rules.mk b/keyboards/smithrune/ironergo/rules.mk new file mode 100644 index 0000000000..a92b099328 --- /dev/null +++ b/keyboards/smithrune/ironergo/rules.mk @@ -0,0 +1,2 @@ +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From 5f542bb31f66f4e5a2b336bc13c8d08f13786fd3 Mon Sep 17 00:00:00 2001 From: stanrc85 Date: Fri, 12 Apr 2024 20:10:57 -0400 Subject: [PATCH 2/5] gondo updates --- keyboards/smithrune/ironergo/config.h | 8 -------- keyboards/smithrune/ironergo/info.json | 14 ++++++++++++++ keyboards/smithrune/ironergo/rules.mk | 3 +-- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/keyboards/smithrune/ironergo/config.h b/keyboards/smithrune/ironergo/config.h index 8dbabc2cc2..3b35055eac 100644 --- a/keyboards/smithrune/ironergo/config.h +++ b/keyboards/smithrune/ironergo/config.h @@ -20,11 +20,3 @@ along with this program. If not, see . #define BACKLIGHT_PWM_DRIVER PWMD3 #define BACKLIGHT_PWM_CHANNEL 4 #define BACKLIGHT_PAL_MODE 2 - -/* 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 - -#define WEAR_LEVELING_LOGICAL_SIZE 2048 -#define WEAR_LEVELING_BACKING_SIZE 4096 diff --git a/keyboards/smithrune/ironergo/info.json b/keyboards/smithrune/ironergo/info.json index f5eb62dfac..809c5880df 100644 --- a/keyboards/smithrune/ironergo/info.json +++ b/keyboards/smithrune/ironergo/info.json @@ -15,6 +15,9 @@ "nkro": true, "backlight": true }, + "build": { + "lto": true + }, "matrix_pins": { "cols": ["C9" , "C8" , "C7" , "C6" , "B15", "B14", "B12", "B9" , "A15" , "C3" , "C2" , "C12" , "C1" , "B4" , "B3" , "D2" ], "rows": ["A10", "A8" , "B13", "A2" , "A1" , "C10", "C11", "B5" , "C0" ] @@ -25,6 +28,17 @@ "levels": 20, "breathing": true }, + "indicators": { + "caps_lock": "B1" + }, + "eeprom": { + "driver" : "wear_leveling", + "wear_leveling": { + "driver": "embedded_flash", + "backing_size": 4096, + "logical_size": 2048 + } + }, "processor": "STM32F401", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/smithrune/ironergo/rules.mk b/keyboards/smithrune/ironergo/rules.mk index a92b099328..6e7633bfe0 100644 --- a/keyboards/smithrune/ironergo/rules.mk +++ b/keyboards/smithrune/ironergo/rules.mk @@ -1,2 +1 @@ -# Enter lower-power sleep mode when on the ChibiOS idle thread -OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE +# This file intentionally left blank From 23eb5208fca2c41610ea33ae7c943cb52832bc5f Mon Sep 17 00:00:00 2001 From: stanrc85 Date: Fri, 12 Apr 2024 20:14:45 -0400 Subject: [PATCH 3/5] add backlight support --- keyboards/smithrune/ironergo/keymaps/vial/config.h | 4 +++- keyboards/smithrune/ironergo/keymaps/vial/rules.mk | 3 ++- keyboards/smithrune/ironergo/keymaps/vial/vial.json | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/keyboards/smithrune/ironergo/keymaps/vial/config.h b/keyboards/smithrune/ironergo/keymaps/vial/config.h index 92b8a98a07..af806d976a 100644 --- a/keyboards/smithrune/ironergo/keymaps/vial/config.h +++ b/keyboards/smithrune/ironergo/keymaps/vial/config.h @@ -5,4 +5,6 @@ #define VIAL_KEYBOARD_UID {0xAA, 0xC8, 0x11, 0x78, 0x6E, 0xFD, 0x1E, 0x3E} #define VIAL_UNLOCK_COMBO_ROWS { 0, 7 } -#define VIAL_UNLOCK_COMBO_COLS { 0, 14 } \ No newline at end of file +#define VIAL_UNLOCK_COMBO_COLS { 0, 14 } + +#define BACKLIGHT_BREATHING \ No newline at end of file diff --git a/keyboards/smithrune/ironergo/keymaps/vial/rules.mk b/keyboards/smithrune/ironergo/keymaps/vial/rules.mk index 29583169d4..eabda9d9af 100644 --- a/keyboards/smithrune/ironergo/keymaps/vial/rules.mk +++ b/keyboards/smithrune/ironergo/keymaps/vial/rules.mk @@ -1,4 +1,5 @@ VIA_ENABLE = yes VIAL_ENABLE = yes QMK_SETTINGS = yes -TAP_DANCE_ENABLE = yes \ No newline at end of file +TAP_DANCE_ENABLE = yes +BACKLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/smithrune/ironergo/keymaps/vial/vial.json b/keyboards/smithrune/ironergo/keymaps/vial/vial.json index f0ce208276..55485ab251 100644 --- a/keyboards/smithrune/ironergo/keymaps/vial/vial.json +++ b/keyboards/smithrune/ironergo/keymaps/vial/vial.json @@ -4,6 +4,7 @@ "productId": "0x4945", "keycodes": ["qmk_lighting"], "menus": ["qmk_backlight"], + "lighting": "qmk_backlight", "matrix": {"rows": 9, "cols": 16}, "layouts": { "labels": [ From 0b01f2a85b9dd75f91fb016f22c06c3869d1a9b5 Mon Sep 17 00:00:00 2001 From: stanrc85 Date: Wed, 17 Apr 2024 13:21:14 -0400 Subject: [PATCH 4/5] update info.json --- keyboards/smithrune/ironergo/info.json | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/smithrune/ironergo/info.json b/keyboards/smithrune/ironergo/info.json index 809c5880df..16aee937c4 100644 --- a/keyboards/smithrune/ironergo/info.json +++ b/keyboards/smithrune/ironergo/info.json @@ -10,7 +10,6 @@ }, "features": { "extrakey": true, - "lto": true, "mousekey": true, "nkro": true, "backlight": true From b6cf1942e10260ba14d0ac605df5dd6b72225c67 Mon Sep 17 00:00:00 2001 From: stanrc85 Date: Tue, 19 Nov 2024 10:35:54 -0500 Subject: [PATCH 5/5] Merge branch 'vial' of https://github.com/vial-kb/vial-qmk into mga-stanrc85 --- keyboards/rorian04_kbd/keyboard.json | 110 ++++---- .../rorian04_kbd/keymaps/default/keymap.c | 24 +- keyboards/rorian04_kbd/keymaps/vial/keymap.c | 250 +++++++++--------- keyboards/rorian04_kbd/keymaps/vial/vial.json | 44 +-- 4 files changed, 214 insertions(+), 214 deletions(-) diff --git a/keyboards/rorian04_kbd/keyboard.json b/keyboards/rorian04_kbd/keyboard.json index 2a12f77d33..3798a943b8 100644 --- a/keyboards/rorian04_kbd/keyboard.json +++ b/keyboards/rorian04_kbd/keyboard.json @@ -1,56 +1,56 @@ -{ - "manufacturer": "Rorian04", - "keyboard_name": "R4_onehand", - "maintainer": "Rorian04", - "bootloader": "rp2040", - "diode_direction": "COL2ROW", - "features": { - "bootmagic": true, - "command": false, - "console": false, - "extrakey": true, - "mousekey": true, - "nkro": true - }, - "matrix_pins": { - "cols": ["GP8", "GP9", "GP12", "GP27", "GP26", "GP29"], - "rows": ["GP28", "GP15", "GP14", "GP11"] - }, - "processor": "RP2040", - "url": "", - "usb": { - "device_version": "1.0.0", - "pid": "0x0000", - "vid": "0xFEED" - }, - "layouts": { - "LAYOUT_split_3x6_3": { - "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0.3}, - {"matrix": [0, 1], "x": 1, "y": 0.3}, - {"matrix": [0, 2], "x": 2, "y": 0.1}, - {"matrix": [0, 3], "x": 3, "y": 0}, - {"matrix": [0, 4], "x": 4, "y": 0.1}, - {"matrix": [0, 5], "x": 5, "y": 0.2}, - - {"matrix": [1, 0], "x": 0, "y": 1.3}, - {"matrix": [1, 1], "x": 1, "y": 1.3}, - {"matrix": [1, 2], "x": 2, "y": 1.1}, - {"matrix": [1, 3], "x": 3, "y": 1}, - {"matrix": [1, 4], "x": 4, "y": 1.1}, - {"matrix": [1, 5], "x": 5, "y": 1.2}, - - {"matrix": [2, 0], "x": 0, "y": 2.3}, - {"matrix": [2, 1], "x": 1, "y": 2.3}, - {"matrix": [2, 2], "x": 2, "y": 2.1}, - {"matrix": [2, 3], "x": 3, "y": 2}, - {"matrix": [2, 4], "x": 4, "y": 2.1}, - {"matrix": [2, 5], "x": 5, "y": 2.2}, - - {"matrix": [3, 3], "x": 4, "y": 3.7}, - {"matrix": [3, 4], "x": 5, "y": 3.7}, - {"matrix": [3, 5], "x": 6, "y": 3.2, "h": 1.5} - ] - } - } +{ + "manufacturer": "Rorian04", + "keyboard_name": "R4_onehand", + "maintainer": "Rorian04", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["GP8", "GP9", "GP12", "GP27", "GP26", "GP29"], + "rows": ["GP28", "GP15", "GP14", "GP11"] + }, + "processor": "RP2040", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT_split_3x6_3": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0.3}, + {"matrix": [0, 1], "x": 1, "y": 0.3}, + {"matrix": [0, 2], "x": 2, "y": 0.1}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0.1}, + {"matrix": [0, 5], "x": 5, "y": 0.2}, + + {"matrix": [1, 0], "x": 0, "y": 1.3}, + {"matrix": [1, 1], "x": 1, "y": 1.3}, + {"matrix": [1, 2], "x": 2, "y": 1.1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1.1}, + {"matrix": [1, 5], "x": 5, "y": 1.2}, + + {"matrix": [2, 0], "x": 0, "y": 2.3}, + {"matrix": [2, 1], "x": 1, "y": 2.3}, + {"matrix": [2, 2], "x": 2, "y": 2.1}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2.1}, + {"matrix": [2, 5], "x": 5, "y": 2.2}, + + {"matrix": [3, 3], "x": 4, "y": 3.7}, + {"matrix": [3, 4], "x": 5, "y": 3.7}, + {"matrix": [3, 5], "x": 6, "y": 3.2, "h": 1.5} + ] + } + } } \ No newline at end of file diff --git a/keyboards/rorian04_kbd/keymaps/default/keymap.c b/keyboards/rorian04_kbd/keymaps/default/keymap.c index b6001752a9..7343457069 100644 --- a/keyboards/rorian04_kbd/keymaps/default/keymap.c +++ b/keyboards/rorian04_kbd/keymaps/default/keymap.c @@ -1,13 +1,13 @@ -// Copyright 2023 QMK -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_split_3x6_3( - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, - KC_ENT, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, - KC_LALT, KC_SPC, KC_TAB - ) +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_3x6_3( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_ENT, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, + KC_LALT, KC_SPC, KC_TAB + ) }; \ No newline at end of file diff --git a/keyboards/rorian04_kbd/keymaps/vial/keymap.c b/keyboards/rorian04_kbd/keymaps/vial/keymap.c index 52ed949e73..75912194df 100644 --- a/keyboards/rorian04_kbd/keymaps/vial/keymap.c +++ b/keyboards/rorian04_kbd/keymaps/vial/keymap.c @@ -1,126 +1,126 @@ -// Copyright 2023 QMK -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_split_3x6_3( - KC_TAB, KC_Q, KC_W, KC_E, KC_R, QK_BOOT, - KC_ENT, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, - KC_LALT, KC_SPC, KC_TAB - ), - [1] = LAYOUT_split_3x6_3( - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______ - ), - [2] = LAYOUT_split_3x6_3( - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______ - ), - [3] = LAYOUT_split_3x6_3( - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______ - ), - [4] = LAYOUT_split_3x6_3( - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______ - ), - [5] = LAYOUT_split_3x6_3( - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______ - ), - [6] = LAYOUT_split_3x6_3( - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______ - ), - [7] = LAYOUT_split_3x6_3( - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______ - ) -}; - -#define value 40 -// Change LED color based on layer -const rgblight_segment_t PROGMEM layer0_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, 85, 255, value} // color if layer 0 -); - -const rgblight_segment_t PROGMEM layer1_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, 125, 255, value} // color if layer 1 -); - -const rgblight_segment_t PROGMEM layer2_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, 170, 255, value} // color if layer 2 -); - -const rgblight_segment_t PROGMEM layer3_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, 200, 255, value} // color if layer 3 -); - -const rgblight_segment_t PROGMEM layer4_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, 45, 255, value} // color if layer 4 -); - -const rgblight_segment_t PROGMEM layer5_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, 85, 0, value} // color if layer 5 -); - -const rgblight_segment_t PROGMEM layer6_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, 0, 255, value} // color if layer 6 -); - -const rgblight_segment_t PROGMEM layer7_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, HSV_OFF} // color if layer 6 -); - - -// Now define the array of layers. Later layers take precedence -const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST( - layer0_rgb, // Bottom layer - layer1_rgb, // Overrides above layers - layer2_rgb, // Overrides above layers - layer3_rgb, // Overrides above layers - layer4_rgb, // Overrides above layers - layer5_rgb, // Overrides above layers - layer6_rgb, // Overrides above layers - layer7_rgb // Overrides above layers -); - -void keyboard_post_init_user(void) { - // Enable the LED layers - rgblight_layers = rgb_layers; -} - - -//bellow code block checks and changes state of LED -layer_state_t default_layer_state_set_user(layer_state_t state) { - rgblight_set_layer_state(0, layer_state_cmp(state, 0)); - return state; -} - -layer_state_t layer_state_set_user(layer_state_t state) { - rgblight_set_layer_state(1, layer_state_cmp(state, 1)); - rgblight_set_layer_state(2, layer_state_cmp(state, 2)); - rgblight_set_layer_state(3, layer_state_cmp(state, 3)); - rgblight_set_layer_state(4, layer_state_cmp(state, 4)); - rgblight_set_layer_state(5, layer_state_cmp(state, 5)); - rgblight_set_layer_state(6, layer_state_cmp(state, 6)); - rgblight_set_layer_state(7, layer_state_cmp(state, 7)); - return state; +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_3x6_3( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, QK_BOOT, + KC_ENT, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_LALT, KC_SPC, KC_TAB + ), + [1] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ), + [2] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ), + [3] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ), + [4] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ), + [5] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ), + [6] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ), + [7] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ) +}; + +#define value 40 +// Change LED color based on layer +const rgblight_segment_t PROGMEM layer0_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, 85, 255, value} // color if layer 0 +); + +const rgblight_segment_t PROGMEM layer1_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, 125, 255, value} // color if layer 1 +); + +const rgblight_segment_t PROGMEM layer2_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, 170, 255, value} // color if layer 2 +); + +const rgblight_segment_t PROGMEM layer3_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, 200, 255, value} // color if layer 3 +); + +const rgblight_segment_t PROGMEM layer4_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, 45, 255, value} // color if layer 4 +); + +const rgblight_segment_t PROGMEM layer5_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, 85, 0, value} // color if layer 5 +); + +const rgblight_segment_t PROGMEM layer6_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, 0, 255, value} // color if layer 6 +); + +const rgblight_segment_t PROGMEM layer7_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_OFF} // color if layer 6 +); + + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST( + layer0_rgb, // Bottom layer + layer1_rgb, // Overrides above layers + layer2_rgb, // Overrides above layers + layer3_rgb, // Overrides above layers + layer4_rgb, // Overrides above layers + layer5_rgb, // Overrides above layers + layer6_rgb, // Overrides above layers + layer7_rgb // Overrides above layers +); + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = rgb_layers; +} + + +//bellow code block checks and changes state of LED +layer_state_t default_layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(0, layer_state_cmp(state, 0)); + return state; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(1, layer_state_cmp(state, 1)); + rgblight_set_layer_state(2, layer_state_cmp(state, 2)); + rgblight_set_layer_state(3, layer_state_cmp(state, 3)); + rgblight_set_layer_state(4, layer_state_cmp(state, 4)); + rgblight_set_layer_state(5, layer_state_cmp(state, 5)); + rgblight_set_layer_state(6, layer_state_cmp(state, 6)); + rgblight_set_layer_state(7, layer_state_cmp(state, 7)); + return state; } \ No newline at end of file diff --git a/keyboards/rorian04_kbd/keymaps/vial/vial.json b/keyboards/rorian04_kbd/keymaps/vial/vial.json index 19258310fe..f7c065b00e 100644 --- a/keyboards/rorian04_kbd/keymaps/vial/vial.json +++ b/keyboards/rorian04_kbd/keymaps/vial/vial.json @@ -1,23 +1,23 @@ -{ - "name": "rorian04_kbd", - "matrix": { - "rows": 4, - "cols": 6 - }, - "layouts": { - "keymap": [ - [{"x":3},"0,3"], - [{"y":-0.75,"x":2},"0,2",{"x":1},"0,4"], - [{"y":-0.75},"0,0","0,1",{"x":3},"0,5"], - [{"y":-0.5,"x":3},"1,3"], - [{"y":-0.75,"x":2},"1,2",{"x":1},"1,4"], - [{"y":-0.75},"1,0","1,1",{"x":3},"1,5"], - [{"y":-0.5,"x":3},"2,3"], - [{"y":-0.75,"x":2},"2,2",{"x":1},"2,4"], - [{"y":-0.75},"2,0","2,1",{"x":3},"2,5"], - [{"x":4},"3,3"], - [{"y":-0.75,"x":5},"3,4"], - [{"y":-0.75,"x":6},"3,5"] - ] - } +{ + "name": "rorian04_kbd", + "matrix": { + "rows": 4, + "cols": 6 + }, + "layouts": { + "keymap": [ + [{"x":3},"0,3"], + [{"y":-0.75,"x":2},"0,2",{"x":1},"0,4"], + [{"y":-0.75},"0,0","0,1",{"x":3},"0,5"], + [{"y":-0.5,"x":3},"1,3"], + [{"y":-0.75,"x":2},"1,2",{"x":1},"1,4"], + [{"y":-0.75},"1,0","1,1",{"x":3},"1,5"], + [{"y":-0.5,"x":3},"2,3"], + [{"y":-0.75,"x":2},"2,2",{"x":1},"2,4"], + [{"y":-0.75},"2,0","2,1",{"x":3},"2,5"], + [{"x":4},"3,3"], + [{"y":-0.75,"x":5},"3,4"], + [{"y":-0.75,"x":6},"3,5"] + ] + } } \ No newline at end of file