From a9226273191a3fc4b16995c1ba74285d77f1cd62 Mon Sep 17 00:00:00 2001 From: Less/Rikki <86894501+lesshonor@users.noreply.github.com> Date: Mon, 1 Apr 2024 12:33:50 -0400 Subject: [PATCH] refactor: flehrad/bigswitch (#23384) --- keyboards/flehrad/bigswitch/bigswitch.c | 37 ----------- keyboards/flehrad/bigswitch/config.h | 23 ------- keyboards/flehrad/bigswitch/keyboard.json | 64 ++++++++++--------- .../bigswitch/keymaps/default/keymap.c | 7 +- .../flehrad/bigswitch/keymaps/via/keymap.c | 9 +-- 5 files changed, 35 insertions(+), 105 deletions(-) delete mode 100644 keyboards/flehrad/bigswitch/bigswitch.c delete mode 100644 keyboards/flehrad/bigswitch/config.h diff --git a/keyboards/flehrad/bigswitch/bigswitch.c b/keyboards/flehrad/bigswitch/bigswitch.c deleted file mode 100644 index 987e816ee9..0000000000 --- a/keyboards/flehrad/bigswitch/bigswitch.c +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2018 QMK Contributors - -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" - -volatile uint8_t runonce = true; -static uint16_t my_timer; - -__attribute__ ((weak)) -void matrix_init_user(void) { - my_timer = timer_read(); -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -#if defined(RGBLIGHT_ENABLE) - if (runonce && timer_elapsed(my_timer) > 1000) { - runonce = false; - rgblight_sethsv_noeeprom(0x0, 0xff, 0x80); - rgblight_mode_noeeprom(9); - rgblight_enable_noeeprom(); - } -#endif -} diff --git a/keyboards/flehrad/bigswitch/config.h b/keyboards/flehrad/bigswitch/config.h deleted file mode 100644 index 4416393247..0000000000 --- a/keyboards/flehrad/bigswitch/config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2018 QMK Contributors - -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 - -/* key combination for command */ -#define IS_COMMAND() ( \ - false \ -) diff --git a/keyboards/flehrad/bigswitch/keyboard.json b/keyboards/flehrad/bigswitch/keyboard.json index a56c0b1e9e..ac68db1a35 100644 --- a/keyboards/flehrad/bigswitch/keyboard.json +++ b/keyboards/flehrad/bigswitch/keyboard.json @@ -1,36 +1,15 @@ { - "keyboard_name": "BigSwitch PCB", "manufacturer": "flehrad", + "keyboard_name": "BigSwitch PCB", "maintainer": "qmk", - "usb": { - "vid": "0x1209", - "pid": "0xB195", - "device_version": "0.0.1" - }, - "rgblight": { - "led_count": 8, - "animations": { - "breathing": true, - "rainbow_mood": true, - "rainbow_swirl": true, - "snake": true, - "knight": true, - "christmas": true, - "static_gradient": true, - "rgb_test": true, - "alternating": true, - "twinkle": true - } - }, - "ws2812": { - "pin": "D3" - }, + "debounce": 50, + "development_board": "promicro", + "diode_direction": "ROW2COL", "features": { "bootmagic": false, - "command": true, "console": true, - "extrakey": false, - "mousekey": false, + "extrakey": true, + "mousekey": true, "nkro": false, "rgblight": true }, @@ -38,10 +17,33 @@ "cols": ["B6"], "rows": ["B5"] }, - "diode_direction": "ROW2COL", - "processor": "atmega32u4", - "bootloader": "caterina", - "debounce": 50, + "rgblight": { + "animations": { + "alternating": true, + "breathing": true, + "christmas": true, + "knight": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "rgb_test": true, + "snake": true, + "static_gradient": true, + "twinkle": true + }, + "default": { + "animation": "rainbow_swirl", + "val": 127 + }, + "led_count": 8 + }, + "usb": { + "device_version": "0.0.1", + "pid": "0xB195", + "vid": "0x1209" + }, + "ws2812": { + "pin": "D3" + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/flehrad/bigswitch/keymaps/default/keymap.c b/keyboards/flehrad/bigswitch/keymaps/default/keymap.c index 210d001236..f5d99b656b 100644 --- a/keyboards/flehrad/bigswitch/keymaps/default/keymap.c +++ b/keyboards/flehrad/bigswitch/keymaps/default/keymap.c @@ -16,12 +16,7 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -#define KC_OSX_EJECT 0x66 -#define LOCK_OSX LSFT(LCTL(KC_OSX_EJECT)) -#define SLEEP_OSX LALT(LGUI(KC_OSX_EJECT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -LAYOUT(SLEEP_OSX), - + [0] = LAYOUT(LALT(LGUI(KC_KB_POWER))) // OSX Sleep }; diff --git a/keyboards/flehrad/bigswitch/keymaps/via/keymap.c b/keyboards/flehrad/bigswitch/keymaps/via/keymap.c index f253f4b12e..621b38605c 100644 --- a/keyboards/flehrad/bigswitch/keymaps/via/keymap.c +++ b/keyboards/flehrad/bigswitch/keymaps/via/keymap.c @@ -18,12 +18,5 @@ along with this program. If not, see . #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT(KC_TRNS), - - [1] = LAYOUT(KC_TRNS), - - [2] = LAYOUT(KC_TRNS), - - [3] = LAYOUT(KC_TRNS) + [0] = LAYOUT(LALT(LGUI(KC_KB_POWER))) // OSX Sleep };