From f6dd8dea2e493dc549a60fee99de871c4088d09a Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 31 Jan 2023 06:03:30 +1100 Subject: Remove usages of config_common.h from config.h files. (#19714) --- keyboards/nullbitsco/nibble/config.h | 1 - keyboards/nullbitsco/scramble/v1/config.h | 1 - keyboards/nullbitsco/tidbit/config.h | 1 - 3 files changed, 3 deletions(-) (limited to 'keyboards/nullbitsco') diff --git a/keyboards/nullbitsco/nibble/config.h b/keyboards/nullbitsco/nibble/config.h index 16b069dae0..2fa6b9e165 100644 --- a/keyboards/nullbitsco/nibble/config.h +++ b/keyboards/nullbitsco/nibble/config.h @@ -15,7 +15,6 @@ */ #pragma once -#include "config_common.h" /* Used to set host for remote KB if VUSB detect doesn't work. */ // #define KEYBOARD_HOST // Force host mode diff --git a/keyboards/nullbitsco/scramble/v1/config.h b/keyboards/nullbitsco/scramble/v1/config.h index b249b99851..d8f10d68ea 100644 --- a/keyboards/nullbitsco/scramble/v1/config.h +++ b/keyboards/nullbitsco/scramble/v1/config.h @@ -19,7 +19,6 @@ along with this program. If not, see . #pragma once -#include "config_common.h" /* key matrix size */ #define MATRIX_ROWS 2 diff --git a/keyboards/nullbitsco/tidbit/config.h b/keyboards/nullbitsco/tidbit/config.h index 5e3d640dbd..4188bcf0fa 100644 --- a/keyboards/nullbitsco/tidbit/config.h +++ b/keyboards/nullbitsco/tidbit/config.h @@ -15,7 +15,6 @@ */ #pragma once -#include "config_common.h" /* Used to set remote for remote KB if VUSB detect doesn't work. */ // #define KEYBOARD_REMOTE -- cgit v1.2.3 From d84a7351ea965010ea51a2c9410add0f4e0306de Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 30 Jan 2023 20:40:12 +0000 Subject: Strip out more of config_common (#19722) --- keyboards/nullbitsco/scramble/v2/config.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'keyboards/nullbitsco') diff --git a/keyboards/nullbitsco/scramble/v2/config.h b/keyboards/nullbitsco/scramble/v2/config.h index a2eb9712f9..83e44e6f47 100644 --- a/keyboards/nullbitsco/scramble/v2/config.h +++ b/keyboards/nullbitsco/scramble/v2/config.h @@ -19,8 +19,6 @@ along with this program. If not, see . #pragma once -#include "config_common.h" - /* key matrix size */ #define MATRIX_ROWS 2 #define MATRIX_COLS 3 -- cgit v1.2.3 From ebb512db827e84619e7151fcf76e3daf9328fe59 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 4 Feb 2023 06:19:58 +1100 Subject: Debounce defines cleanup (#19742) * Clean up `DEBOUNCE` in config.h, 0-9 * Clean up `DEBOUNCE` in config.h, A * Clean up `DEBOUNCE` in config.h, B * Clean up `DEBOUNCE` in config.h, C * Clean up `DEBOUNCE` in config.h, D * Clean up `DEBOUNCE` in config.h, E * Clean up `DEBOUNCE` in config.h, F * Clean up `DEBOUNCE` in config.h, G * Clean up `DEBOUNCE` in config.h, H * Clean up `DEBOUNCE` in config.h, handwired * Clean up `DEBOUNCE` in config.h, I * Clean up `DEBOUNCE` in config.h, J * Clean up `DEBOUNCE` in config.h, K * Clean up `DEBOUNCE` in config.h, L * Clean up `DEBOUNCE` in config.h, M * Clean up `DEBOUNCE` in config.h, N * Clean up `DEBOUNCE` in config.h, O * Clean up `DEBOUNCE` in config.h, P * Clean up `DEBOUNCE` in config.h, Q * Clean up `DEBOUNCE` in config.h, R * Clean up `DEBOUNCE` in config.h, S * Clean up `DEBOUNCE` in config.h, T * Clean up `DEBOUNCE` in config.h, U * Clean up `DEBOUNCE` in config.h, V * Clean up `DEBOUNCE` in config.h, W * Clean up `DEBOUNCE` in config.h, X * Clean up `DEBOUNCE` in config.h, Y * Clean up `DEBOUNCE` in config.h, Z * Remove default debounce from info.json * Migrate non-default debounce to info.json --- keyboards/nullbitsco/nibble/config.h | 3 --- keyboards/nullbitsco/nibble/info.json | 1 + keyboards/nullbitsco/scramble/info.json | 1 + keyboards/nullbitsco/scramble/v1/config.h | 3 --- keyboards/nullbitsco/scramble/v2/config.h | 3 --- 5 files changed, 2 insertions(+), 9 deletions(-) (limited to 'keyboards/nullbitsco') diff --git a/keyboards/nullbitsco/nibble/config.h b/keyboards/nullbitsco/nibble/config.h index 2fa6b9e165..2d203594bf 100644 --- a/keyboards/nullbitsco/nibble/config.h +++ b/keyboards/nullbitsco/nibble/config.h @@ -28,9 +28,6 @@ #define MATRIX_COLS 16 #define MATRIX_MUX_COLS 4 -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 10 - /* * Keyboard Matrix Assignments * The nibble uses a demultiplexer for the cols. diff --git a/keyboards/nullbitsco/nibble/info.json b/keyboards/nullbitsco/nibble/info.json index 33ae369936..c12acf5f26 100644 --- a/keyboards/nullbitsco/nibble/info.json +++ b/keyboards/nullbitsco/nibble/info.json @@ -7,6 +7,7 @@ "pid": "0x6060", "device_version": "0.0.1" }, + "debounce": 10, "layouts": { "LAYOUT_all": { "layout": [ diff --git a/keyboards/nullbitsco/scramble/info.json b/keyboards/nullbitsco/scramble/info.json index cc5fd28d76..216d83e49e 100644 --- a/keyboards/nullbitsco/scramble/info.json +++ b/keyboards/nullbitsco/scramble/info.json @@ -8,6 +8,7 @@ "pid": "0x6062", "device_version": "0.0.1" }, + "debounce": 10, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/nullbitsco/scramble/v1/config.h b/keyboards/nullbitsco/scramble/v1/config.h index d8f10d68ea..6f512db4c5 100644 --- a/keyboards/nullbitsco/scramble/v1/config.h +++ b/keyboards/nullbitsco/scramble/v1/config.h @@ -26,9 +26,6 @@ along with this program. If not, see . #define DIRECT_PINS {{D4,D5,B1}, {C3,C2,C1}} -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 10 - /* Optional encoder pins */ #define ENCODERS_PAD_A { D6 } #define ENCODERS_PAD_B { D7 } diff --git a/keyboards/nullbitsco/scramble/v2/config.h b/keyboards/nullbitsco/scramble/v2/config.h index 83e44e6f47..4e6ab66b44 100644 --- a/keyboards/nullbitsco/scramble/v2/config.h +++ b/keyboards/nullbitsco/scramble/v2/config.h @@ -25,9 +25,6 @@ along with this program. If not, see . #define DIRECT_PINS {{GP6,GP8,GP10}, {GP29,GP28,GP22}} -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 10 - /* Optional encoder pins */ #define ENCODERS_PAD_A { GP24 } #define ENCODERS_PAD_B { GP25 } -- cgit v1.2.3 From f9aeea64c1f85d388485503e52035b5f7533ed26 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 8 Feb 2023 18:41:46 +1100 Subject: Migrate `MCU` and `BOOTLOADER` to data-driven (#19529) --- keyboards/nullbitsco/nibble/info.json | 2 ++ keyboards/nullbitsco/nibble/rules.mk | 6 ------ keyboards/nullbitsco/scramble/v1/info.json | 4 ++++ keyboards/nullbitsco/scramble/v1/rules.mk | 8 -------- keyboards/nullbitsco/scramble/v2/info.json | 4 ++++ keyboards/nullbitsco/scramble/v2/rules.mk | 8 -------- keyboards/nullbitsco/tidbit/info.json | 2 ++ keyboards/nullbitsco/tidbit/rules.mk | 6 ------ 8 files changed, 12 insertions(+), 28 deletions(-) create mode 100644 keyboards/nullbitsco/scramble/v1/info.json create mode 100644 keyboards/nullbitsco/scramble/v2/info.json (limited to 'keyboards/nullbitsco') diff --git a/keyboards/nullbitsco/nibble/info.json b/keyboards/nullbitsco/nibble/info.json index c12acf5f26..b59fee2411 100644 --- a/keyboards/nullbitsco/nibble/info.json +++ b/keyboards/nullbitsco/nibble/info.json @@ -7,6 +7,8 @@ "pid": "0x6060", "device_version": "0.0.1" }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", "debounce": 10, "layouts": { "LAYOUT_all": { diff --git a/keyboards/nullbitsco/nibble/rules.mk b/keyboards/nullbitsco/nibble/rules.mk index f33bfbb9b8..0d5d3e2aac 100644 --- a/keyboards/nullbitsco/nibble/rules.mk +++ b/keyboards/nullbitsco/nibble/rules.mk @@ -1,9 +1,3 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # diff --git a/keyboards/nullbitsco/scramble/v1/info.json b/keyboards/nullbitsco/scramble/v1/info.json new file mode 100644 index 0000000000..11307eba89 --- /dev/null +++ b/keyboards/nullbitsco/scramble/v1/info.json @@ -0,0 +1,4 @@ +{ + "processor": "atmega328p", + "bootloader": "usbasploader" +} diff --git a/keyboards/nullbitsco/scramble/v1/rules.mk b/keyboards/nullbitsco/scramble/v1/rules.mk index c1cf175c64..f917d68f4e 100644 --- a/keyboards/nullbitsco/scramble/v1/rules.mk +++ b/keyboards/nullbitsco/scramble/v1/rules.mk @@ -1,11 +1,3 @@ -# NOTE: This file is specific to AVR builds. - -# MCU name -MCU = atmega328p - -# Bootloader selection -BOOTLOADER = usbasploader - # Build Options # change yes to no to disable # diff --git a/keyboards/nullbitsco/scramble/v2/info.json b/keyboards/nullbitsco/scramble/v2/info.json new file mode 100644 index 0000000000..87b7fcf7ec --- /dev/null +++ b/keyboards/nullbitsco/scramble/v2/info.json @@ -0,0 +1,4 @@ +{ + "processor": "RP2040", + "bootloader": "rp2040" +} diff --git a/keyboards/nullbitsco/scramble/v2/rules.mk b/keyboards/nullbitsco/scramble/v2/rules.mk index f93963285b..f917d68f4e 100644 --- a/keyboards/nullbitsco/scramble/v2/rules.mk +++ b/keyboards/nullbitsco/scramble/v2/rules.mk @@ -1,11 +1,3 @@ -# NOTE: This file is is specific to RP2040 builds. - -# MCU name -MCU = RP2040 - -# Bootloader selection -BOOTLOADER = rp2040 - # Build Options # change yes to no to disable # diff --git a/keyboards/nullbitsco/tidbit/info.json b/keyboards/nullbitsco/tidbit/info.json index 7b9c4eb8ae..ec014a6680 100644 --- a/keyboards/nullbitsco/tidbit/info.json +++ b/keyboards/nullbitsco/tidbit/info.json @@ -7,6 +7,8 @@ "pid": "0x6064", "device_version": "0.0.1" }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/nullbitsco/tidbit/rules.mk b/keyboards/nullbitsco/tidbit/rules.mk index 13893a69e2..3b7ff078bb 100644 --- a/keyboards/nullbitsco/tidbit/rules.mk +++ b/keyboards/nullbitsco/tidbit/rules.mk @@ -1,9 +1,3 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # -- cgit v1.2.3 From 37fc08af8446b60c243f8b7cf53909b0fc9a8a66 Mon Sep 17 00:00:00 2001 From: jack <0x6A73@pm.me> Date: Sun, 12 Feb 2023 23:10:51 -0700 Subject: Remove lingering `I2CD2` usages w/ RP2040 (#19833) --- keyboards/nullbitsco/scramble/v2/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/nullbitsco') diff --git a/keyboards/nullbitsco/scramble/v2/config.h b/keyboards/nullbitsco/scramble/v2/config.h index 4e6ab66b44..b4d7820aad 100644 --- a/keyboards/nullbitsco/scramble/v2/config.h +++ b/keyboards/nullbitsco/scramble/v2/config.h @@ -34,4 +34,4 @@ along with this program. If not, see . #define RP2040_FLASH_GENERIC_03H #define I2C1_SDA_PIN GP26 #define I2C1_SCL_PIN GP27 -#define I2C_DRIVER I2CD2 +#define I2C_DRIVER I2CD1 -- cgit v1.2.3 From 2cdf99ae950a82e233482347651b7689c4896827 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 14 Feb 2023 18:39:41 +1100 Subject: Migrate `DIRECT_PINS` to data driven (#19826) --- keyboards/nullbitsco/scramble/v1/config.h | 7 ------- keyboards/nullbitsco/scramble/v1/info.json | 8 +++++++- keyboards/nullbitsco/scramble/v2/config.h | 6 ------ keyboards/nullbitsco/scramble/v2/info.json | 8 +++++++- 4 files changed, 14 insertions(+), 15 deletions(-) (limited to 'keyboards/nullbitsco') diff --git a/keyboards/nullbitsco/scramble/v1/config.h b/keyboards/nullbitsco/scramble/v1/config.h index 6f512db4c5..6a7742ce87 100644 --- a/keyboards/nullbitsco/scramble/v1/config.h +++ b/keyboards/nullbitsco/scramble/v1/config.h @@ -19,13 +19,6 @@ along with this program. If not, see . #pragma once - -/* key matrix size */ -#define MATRIX_ROWS 2 -#define MATRIX_COLS 3 - -#define DIRECT_PINS {{D4,D5,B1}, {C3,C2,C1}} - /* Optional encoder pins */ #define ENCODERS_PAD_A { D6 } #define ENCODERS_PAD_B { D7 } diff --git a/keyboards/nullbitsco/scramble/v1/info.json b/keyboards/nullbitsco/scramble/v1/info.json index 11307eba89..0acb699373 100644 --- a/keyboards/nullbitsco/scramble/v1/info.json +++ b/keyboards/nullbitsco/scramble/v1/info.json @@ -1,4 +1,10 @@ { "processor": "atmega328p", - "bootloader": "usbasploader" + "bootloader": "usbasploader", + "matrix_pins": { + "direct": [ + ["D4", "D5", "B1"], + ["C3", "C2", "C1"] + ] + } } diff --git a/keyboards/nullbitsco/scramble/v2/config.h b/keyboards/nullbitsco/scramble/v2/config.h index b4d7820aad..dd2ae62749 100644 --- a/keyboards/nullbitsco/scramble/v2/config.h +++ b/keyboards/nullbitsco/scramble/v2/config.h @@ -19,12 +19,6 @@ along with this program. If not, see . #pragma once -/* key matrix size */ -#define MATRIX_ROWS 2 -#define MATRIX_COLS 3 - -#define DIRECT_PINS {{GP6,GP8,GP10}, {GP29,GP28,GP22}} - /* Optional encoder pins */ #define ENCODERS_PAD_A { GP24 } #define ENCODERS_PAD_B { GP25 } diff --git a/keyboards/nullbitsco/scramble/v2/info.json b/keyboards/nullbitsco/scramble/v2/info.json index 87b7fcf7ec..ba27823b36 100644 --- a/keyboards/nullbitsco/scramble/v2/info.json +++ b/keyboards/nullbitsco/scramble/v2/info.json @@ -1,4 +1,10 @@ { "processor": "RP2040", - "bootloader": "rp2040" + "bootloader": "rp2040", + "matrix_pins": { + "direct": [ + ["GP6", "GP8", "GP10"], + ["GP29", "GP28", "GP22"] + ] + } } -- cgit v1.2.3 From 2da0827d4ffbcba161126d6001f370e97d0172a8 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 17 Feb 2023 16:08:25 +1100 Subject: Remove matrix size defines (#19581) --- keyboards/nullbitsco/tidbit/config.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'keyboards/nullbitsco') diff --git a/keyboards/nullbitsco/tidbit/config.h b/keyboards/nullbitsco/tidbit/config.h index 4188bcf0fa..37f05b06e2 100644 --- a/keyboards/nullbitsco/tidbit/config.h +++ b/keyboards/nullbitsco/tidbit/config.h @@ -22,10 +22,6 @@ // Workaround for freezing after MacOS sleep #define USB_SUSPEND_WAKEUP_DELAY 200 -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 6 - /* key matrix pins */ #define MATRIX_ROW_PINS { B1, E6, D7, C6, D4 } #define MATRIX_COL_PINS { NO_PIN, NO_PIN, F4, F5, F6, F7 } -- cgit v1.2.3 From e837a32b2b4d6eb96ffacad0022699d67c0f8f1e Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 19 Feb 2023 18:55:12 +1100 Subject: Move layouts for direct_pins boards to data driven (#19872) --- keyboards/nullbitsco/scramble/info.json | 31 ++++++----------------------- keyboards/nullbitsco/scramble/scramble.c | 18 ----------------- keyboards/nullbitsco/scramble/scramble.h | 34 -------------------------------- keyboards/nullbitsco/scramble/v1/v1.h | 2 +- keyboards/nullbitsco/scramble/v2/v2.h | 2 +- 5 files changed, 8 insertions(+), 79 deletions(-) delete mode 100644 keyboards/nullbitsco/scramble/scramble.c delete mode 100644 keyboards/nullbitsco/scramble/scramble.h (limited to 'keyboards/nullbitsco') diff --git a/keyboards/nullbitsco/scramble/info.json b/keyboards/nullbitsco/scramble/info.json index 216d83e49e..32bb6f299e 100644 --- a/keyboards/nullbitsco/scramble/info.json +++ b/keyboards/nullbitsco/scramble/info.json @@ -12,31 +12,12 @@ "layouts": { "LAYOUT": { "layout": [ - { - "label": "n", - "x": 0, - "y": 0 - }, - { - "x": 1, - "y": 0 - }, - { - "x": 2, - "y": 0 - }, - { - "x": 0, - "y": 1 - }, - { - "x": 1, - "y": 1 - }, - { - "x": 2, - "y": 1 - } + {"x": 0, "y": 0, "matrix": [0, 0]}, + {"x": 1, "y": 0, "matrix": [0, 1]}, + {"x": 2, "y": 0, "matrix": [0, 2]}, + {"x": 0, "y": 1, "matrix": [1, 0]}, + {"x": 1, "y": 1, "matrix": [1, 1]}, + {"x": 2, "y": 1, "matrix": [1, 2]} ] } } diff --git a/keyboards/nullbitsco/scramble/scramble.c b/keyboards/nullbitsco/scramble/scramble.c deleted file mode 100644 index c8a55e0d48..0000000000 --- a/keyboards/nullbitsco/scramble/scramble.c +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2021 Jay Greco - -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 diff --git a/keyboards/nullbitsco/scramble/scramble.h b/keyboards/nullbitsco/scramble/scramble.h deleted file mode 100644 index 22c112040b..0000000000 --- a/keyboards/nullbitsco/scramble/scramble.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2021 Jay Greco - * - * 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 "quantum.h" - -#if defined(KEYBOARD_nullbitsco_scramble_v1) - #include "v1.h" -#elif defined(KEYBOARD_nullbitsco_scramble_v2) - #include "v2.h" -#endif - -// Layout is the same in all revisions -#define LAYOUT( \ - K01, K02, K03, \ - K11, K12, K13 \ -) { \ - {K01, K02, K03}, \ - {K11, K12, K13}, \ -} diff --git a/keyboards/nullbitsco/scramble/v1/v1.h b/keyboards/nullbitsco/scramble/v1/v1.h index 5dc6d4a0e8..5c0b62357f 100644 --- a/keyboards/nullbitsco/scramble/v1/v1.h +++ b/keyboards/nullbitsco/scramble/v1/v1.h @@ -3,7 +3,7 @@ #pragma once -#include "scramble.h" +#include "quantum.h" // Indication LED settings #define LED_ON 2 diff --git a/keyboards/nullbitsco/scramble/v2/v2.h b/keyboards/nullbitsco/scramble/v2/v2.h index d278c0a86a..c86282f658 100644 --- a/keyboards/nullbitsco/scramble/v2/v2.h +++ b/keyboards/nullbitsco/scramble/v2/v2.h @@ -3,7 +3,7 @@ #pragma once -#include "scramble.h" +#include "quantum.h" #include enum led_mode { -- cgit v1.2.3 From 7f805cc7799deb0ca75f751cebd32c6640058af9 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 23 Feb 2023 09:19:00 +1100 Subject: VIA Protocol 12 + fixes (#19916) Co-authored-by: Wilba Co-authored-by: zvecr --- keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c | 2 +- keyboards/nullbitsco/nibble/keymaps/via/keymap.c | 13 +------------ 2 files changed, 2 insertions(+), 13 deletions(-) (limited to 'keyboards/nullbitsco') diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c index 631f28171a..33652005cb 100644 --- a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c +++ b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c @@ -29,7 +29,7 @@ enum layer_names { #define KC_DISC_DEAF KC_F24 enum custom_keycodes { - PROG = USER00, + PROG = QK_KB_0, DISC_MUTE, DISC_DEAF, SUPER_ALT_TAB, diff --git a/keyboards/nullbitsco/nibble/keymaps/via/keymap.c b/keyboards/nullbitsco/nibble/keymaps/via/keymap.c index aab6a41af3..b71f9119ef 100644 --- a/keyboards/nullbitsco/nibble/keymaps/via/keymap.c +++ b/keyboards/nullbitsco/nibble/keymaps/via/keymap.c @@ -24,11 +24,9 @@ enum layer_names { #define KC_DISC_MUTE KC_F23 #define KC_DISC_DEAF KC_F24 -#define NUM_CUST_KEYCODES (_NUM_CUST_KCS - SAFE_RANGE) -#define VIA_KEYCODE_RANGE USER00 enum custom_keycodes { - PROG = SAFE_RANGE, + PROG = QK_KB_0, DISC_MUTE, DISC_DEAF, SUPER_ALT_TAB, @@ -76,17 +74,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void map_via_keycode(uint16_t * keycode) { - if (abs(*keycode - VIA_KEYCODE_RANGE) < NUM_CUST_KEYCODES) { //make into macro? - dprintf("VIA custom keycode found, mapping to QMK keycode.\n"); - uint16_t new_keycode = (*keycode - VIA_KEYCODE_RANGE) + SAFE_RANGE; - dprintf("VIA KC: %u QMK KC: %u\n", *keycode, new_keycode); - *keycode = new_keycode; - } -} bool process_record_user(uint16_t keycode, keyrecord_t *record) { - map_via_keycode(&keycode); // Send keystrokes to host keyboard, if connected (see readme) process_record_remote_kb(keycode, record); switch(keycode) { -- cgit v1.2.3 From 7e0299117b389b1c7fcdfa2f20891ba2287ea771 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 26 Feb 2023 09:45:12 +1100 Subject: Move encoder config to data driven (#19923) Co-authored-by: Nick Brassel --- keyboards/nullbitsco/nibble/config.h | 4 ---- keyboards/nullbitsco/nibble/info.json | 5 +++++ keyboards/nullbitsco/scramble/v1/config.h | 3 --- keyboards/nullbitsco/scramble/v1/info.json | 5 +++++ keyboards/nullbitsco/scramble/v2/config.h | 3 --- keyboards/nullbitsco/scramble/v2/info.json | 5 +++++ keyboards/nullbitsco/tidbit/config.h | 5 ----- keyboards/nullbitsco/tidbit/info.json | 8 ++++++++ 8 files changed, 23 insertions(+), 15 deletions(-) (limited to 'keyboards/nullbitsco') diff --git a/keyboards/nullbitsco/nibble/config.h b/keyboards/nullbitsco/nibble/config.h index 2d203594bf..af85027e64 100644 --- a/keyboards/nullbitsco/nibble/config.h +++ b/keyboards/nullbitsco/nibble/config.h @@ -52,7 +52,3 @@ #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE #define RGBLIGHT_SLEEP - -/* Optional encoder pins */ -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { B4 } diff --git a/keyboards/nullbitsco/nibble/info.json b/keyboards/nullbitsco/nibble/info.json index b59fee2411..5c69cb0e7e 100644 --- a/keyboards/nullbitsco/nibble/info.json +++ b/keyboards/nullbitsco/nibble/info.json @@ -7,6 +7,11 @@ "pid": "0x6060", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B4"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "debounce": 10, diff --git a/keyboards/nullbitsco/scramble/v1/config.h b/keyboards/nullbitsco/scramble/v1/config.h index 6a7742ce87..bb0ee7d785 100644 --- a/keyboards/nullbitsco/scramble/v1/config.h +++ b/keyboards/nullbitsco/scramble/v1/config.h @@ -19,7 +19,4 @@ along with this program. If not, see . #pragma once -/* Optional encoder pins */ -#define ENCODERS_PAD_A { D6 } -#define ENCODERS_PAD_B { D7 } #define TAP_CODE_DELAY 10 diff --git a/keyboards/nullbitsco/scramble/v1/info.json b/keyboards/nullbitsco/scramble/v1/info.json index 0acb699373..77a00d91f4 100644 --- a/keyboards/nullbitsco/scramble/v1/info.json +++ b/keyboards/nullbitsco/scramble/v1/info.json @@ -1,4 +1,9 @@ { + "encoder": { + "rotary": [ + {"pin_a": "D6", "pin_b": "D7"} + ] + }, "processor": "atmega328p", "bootloader": "usbasploader", "matrix_pins": { diff --git a/keyboards/nullbitsco/scramble/v2/config.h b/keyboards/nullbitsco/scramble/v2/config.h index dd2ae62749..d3b3c44222 100644 --- a/keyboards/nullbitsco/scramble/v2/config.h +++ b/keyboards/nullbitsco/scramble/v2/config.h @@ -19,9 +19,6 @@ along with this program. If not, see . #pragma once -/* Optional encoder pins */ -#define ENCODERS_PAD_A { GP24 } -#define ENCODERS_PAD_B { GP25 } #define TAP_CODE_DELAY 10 /* RP2040-specific defines*/ diff --git a/keyboards/nullbitsco/scramble/v2/info.json b/keyboards/nullbitsco/scramble/v2/info.json index ba27823b36..5255c32205 100644 --- a/keyboards/nullbitsco/scramble/v2/info.json +++ b/keyboards/nullbitsco/scramble/v2/info.json @@ -1,4 +1,9 @@ { + "encoder": { + "rotary": [ + {"pin_a": "GP24", "pin_b": "GP25"} + ] + }, "processor": "RP2040", "bootloader": "rp2040", "matrix_pins": { diff --git a/keyboards/nullbitsco/tidbit/config.h b/keyboards/nullbitsco/tidbit/config.h index 37f05b06e2..23b2f5f1a4 100644 --- a/keyboards/nullbitsco/tidbit/config.h +++ b/keyboards/nullbitsco/tidbit/config.h @@ -42,8 +42,3 @@ #define RGBLIGHT_EFFECT_RGB_TEST #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE - -/* Optional encoder pins */ -// Encoders are defined in order. 1: B2 & B3, 2: B4 & B5, 3: D0 & D1, 4: D2 & D3 -#define ENCODERS_PAD_A { B2, B4, D0, D3 } -#define ENCODERS_PAD_B { B3, B5, D1, D2 } diff --git a/keyboards/nullbitsco/tidbit/info.json b/keyboards/nullbitsco/tidbit/info.json index ec014a6680..cce2a2902c 100644 --- a/keyboards/nullbitsco/tidbit/info.json +++ b/keyboards/nullbitsco/tidbit/info.json @@ -7,6 +7,14 @@ "pid": "0x6064", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B3"}, + {"pin_a": "B4", "pin_b": "B5"}, + {"pin_a": "D0", "pin_b": "D1"}, + {"pin_a": "D3", "pin_b": "D2"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { -- cgit v1.2.3