From ace372d90de13dafc815df5d8049497cb351b69b Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 11 Mar 2023 00:34:34 +1100 Subject: Move matrix config to info.json, part 3 (#19991) Co-authored-by: Nick Brassel --- keyboards/nightly_boards/adellein/config.h | 17 ----------------- keyboards/nightly_boards/adellein/info.json | 5 +++++ 2 files changed, 5 insertions(+), 17 deletions(-) (limited to 'keyboards/nightly_boards/adellein') diff --git a/keyboards/nightly_boards/adellein/config.h b/keyboards/nightly_boards/adellein/config.h index e4e99106a3..031895cf23 100644 --- a/keyboards/nightly_boards/adellein/config.h +++ b/keyboards/nightly_boards/adellein/config.h @@ -17,23 +17,6 @@ along with this program. If not, see . #pragma once - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS { B1, B0, B5, B6 } -#define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, B7, B3, B2, D0, D1, D2, D3 } - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - #define RGB_DI_PIN D5 #ifdef RGB_DI_PIN #define RGBLED_NUM 14 diff --git a/keyboards/nightly_boards/adellein/info.json b/keyboards/nightly_boards/adellein/info.json index 7967cfc99b..97cf05912f 100644 --- a/keyboards/nightly_boards/adellein/info.json +++ b/keyboards/nightly_boards/adellein/info.json @@ -8,6 +8,11 @@ "pid": "0x0010", "device_version": "0.0.1" }, + "matrix_pins": { + "cols": ["F7", "F6", "F5", "F4", "F1", "F0", "B7", "B3", "B2", "D0", "D1", "D2", "D3"], + "rows": ["B1", "B0", "B5", "B6"] + }, + "diode_direction": "COL2ROW", "encoder": { "rotary": [ {"pin_a": "C7", "pin_b": "C6"} -- cgit v1.2.3 From ad625e7c06929092231e8f426cbe972681d91a03 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 23 Mar 2023 21:38:01 +1100 Subject: Remove `RGB_DI_PIN` ifdefs (#20218) --- keyboards/nightly_boards/adellein/config.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'keyboards/nightly_boards/adellein') diff --git a/keyboards/nightly_boards/adellein/config.h b/keyboards/nightly_boards/adellein/config.h index 031895cf23..cefed954f8 100644 --- a/keyboards/nightly_boards/adellein/config.h +++ b/keyboards/nightly_boards/adellein/config.h @@ -18,7 +18,6 @@ along with this program. If not, see . #pragma once #define RGB_DI_PIN D5 -#ifdef RGB_DI_PIN #define RGBLED_NUM 14 #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD @@ -31,8 +30,6 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -#endif - /* Encoders */ #define ENCODERS_CW_KEY { { 3, 3 } } #define ENCODERS_CCW_KEY { { 1, 3 } } -- cgit v1.2.3 From fcf8b804ed95a98561bd4c1d6c85604be0f7cc7b Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Mon, 3 Apr 2023 10:33:45 +0200 Subject: [Core] Refactor `keyevent_t` for 1ms timing resolution (#15847) --- keyboards/nightly_boards/adellein/encoder_action.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'keyboards/nightly_boards/adellein') diff --git a/keyboards/nightly_boards/adellein/encoder_action.c b/keyboards/nightly_boards/adellein/encoder_action.c index 6b553d3969..522fb58d5a 100644 --- a/keyboards/nightly_boards/adellein/encoder_action.c +++ b/keyboards/nightly_boards/adellein/encoder_action.c @@ -26,7 +26,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -38,7 +39,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); -- cgit v1.2.3 From 47966dc2a65c88ac90fcd64d12243d72f3f6753b Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 6 Apr 2023 18:00:54 +1000 Subject: Migrate `rgblight.pin` and `RGB_DI_PIN` to `ws2812.pin` (#20303) --- keyboards/nightly_boards/adellein/config.h | 1 - keyboards/nightly_boards/adellein/info.json | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'keyboards/nightly_boards/adellein') diff --git a/keyboards/nightly_boards/adellein/config.h b/keyboards/nightly_boards/adellein/config.h index cefed954f8..d1703c1c80 100644 --- a/keyboards/nightly_boards/adellein/config.h +++ b/keyboards/nightly_boards/adellein/config.h @@ -17,7 +17,6 @@ along with this program. If not, see . #pragma once -#define RGB_DI_PIN D5 #define RGBLED_NUM 14 #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/nightly_boards/adellein/info.json b/keyboards/nightly_boards/adellein/info.json index 97cf05912f..d45356262d 100644 --- a/keyboards/nightly_boards/adellein/info.json +++ b/keyboards/nightly_boards/adellein/info.json @@ -18,6 +18,9 @@ {"pin_a": "C7", "pin_b": "C6"} ] }, + "ws2812": { + "pin": "D5" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { -- cgit v1.2.3 From f111bea3cda240b7c54bff2e12b5043b7b0797f7 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 25 Apr 2023 02:38:35 +1000 Subject: Move miscellaneous layouts to data driven (#20516) --- keyboards/nightly_boards/adellein/adellein.h | 35 ----- keyboards/nightly_boards/adellein/info.json | 214 ++++++++++++++------------- 2 files changed, 111 insertions(+), 138 deletions(-) (limited to 'keyboards/nightly_boards/adellein') diff --git a/keyboards/nightly_boards/adellein/adellein.h b/keyboards/nightly_boards/adellein/adellein.h index c78b76fbad..33cf8e0b68 100644 --- a/keyboards/nightly_boards/adellein/adellein.h +++ b/keyboards/nightly_boards/adellein/adellein.h @@ -18,38 +18,3 @@ #include "quantum.h" #include "encoder_action.h" - -/* This is a shortcut to help you visually see your layout. - * - * The first section contains all of the arguments representing the physical - * layout of the board and position of the keys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ - -#define LAYOUT_40ergo_split_ent( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - K30, K32, K34, K35, K37, K39, K3C \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \ - { K30, KC_NO, K32, KC_NO, K34, K35, KC_NO, K37, KC_NO, K39, KC_NO, KC_NO, K3C }, \ -} - -#define LAYOUT_40ergo_split_ent_encoder( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - K30, K32, K34, K35, K37, K39, K3C, \ - E00A, E00B \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \ - { K30, E00A, K32, E00B, K34, K35, KC_NO, K37, KC_NO, K39, KC_NO, KC_NO, K3C }, \ -} - diff --git a/keyboards/nightly_boards/adellein/info.json b/keyboards/nightly_boards/adellein/info.json index d45356262d..5aca4e8a1d 100644 --- a/keyboards/nightly_boards/adellein/info.json +++ b/keyboards/nightly_boards/adellein/info.json @@ -26,112 +26,120 @@ "layouts": { "LAYOUT_40ergo_split_ent": { "layout": [ - {"x":0.5, "y":0}, - {"x":1.5, "y":0}, - {"x":2.5, "y":0}, - {"x":3.5, "y":0}, - {"x":4.5, "y":0}, - {"x":5.5, "y":0}, - {"x":8.25, "y":0}, - {"x":9.25, "y":0}, - {"x":10.25, "y":0}, - {"x":11.25, "y":0}, - {"x":12.25, "y":0}, - {"x":13.25, "y":0}, - {"x":14.25, "y":0, "w":1.5}, - - {"x":0.25, "y":1, "w":1.25}, - {"x":1.5, "y":1}, - {"x":2.5, "y":1}, - {"x":3.5, "y":1}, - {"x":4.5, "y":1}, - {"x":5.5, "y":1}, - {"x":8.75, "y":1}, - {"x":9.75, "y":1}, - {"x":10.75, "y":1}, - {"x":11.75, "y":1}, - {"x":12.75, "y":1}, - {"x":13.75, "y":1}, - {"x":14.75, "y":1, "w":1.25}, - - {"x":0, "y":2, "w":1.75}, - {"x":1.75, "y":2}, - {"x":2.75, "y":2}, - {"x":3.75, "y":2}, - {"x":4.75, "y":2}, - {"x":5.75, "y":2}, - {"x":8.5, "y":2}, - {"x":9.5, "y":2}, - {"x":10.5, "y":2}, - {"x":11.5, "y":2}, - {"x":12.5, "y":2}, - {"x":13.5, "y":2}, - {"x":14.5, "y":2, "w":1.75}, - - {"x":0.25, "y":3, "w":1.25}, - {"x":2.75, "y":3, "w":1.25}, - {"x":4, "y":3, "w":2.25}, - {"x":6.25, "y":3}, - {"x":8, "y":3, "w":2.75}, - {"x":10.75, "y":3, "w":1.25}, - {"x":14.75, "y":3, "w":1.25} - ] + {"matrix": [0, 0], "x": 0.5, "y": 0}, + {"matrix": [0, 1], "x": 1.5, "y": 0}, + {"matrix": [0, 2], "x": 2.5, "y": 0}, + {"matrix": [0, 3], "x": 3.5, "y": 0}, + {"matrix": [0, 4], "x": 4.5, "y": 0}, + {"matrix": [0, 5], "x": 5.5, "y": 0}, + + {"matrix": [0, 6], "x": 8.25, "y": 0}, + {"matrix": [0, 7], "x": 9.25, "y": 0}, + {"matrix": [0, 8], "x": 10.25, "y": 0}, + {"matrix": [0, 9], "x": 11.25, "y": 0}, + {"matrix": [0, 10], "x": 12.25, "y": 0}, + {"matrix": [0, 11], "x": 13.25, "y": 0}, + {"matrix": [0, 12], "x": 14.25, "y": 0, "w": 1.5}, + + {"matrix": [1, 0], "x": 0.25, "y": 1, "w": 1.25}, + {"matrix": [1, 1], "x": 1.5, "y": 1}, + {"matrix": [1, 2], "x": 2.5, "y": 1}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1}, + {"matrix": [1, 5], "x": 5.5, "y": 1}, + + {"matrix": [1, 6], "x": 8.75, "y": 1}, + {"matrix": [1, 7], "x": 9.75, "y": 1}, + {"matrix": [1, 8], "x": 10.75, "y": 1}, + {"matrix": [1, 9], "x": 11.75, "y": 1}, + {"matrix": [1, 10], "x": 12.75, "y": 1}, + {"matrix": [1, 11], "x": 13.75, "y": 1}, + {"matrix": [1, 12], "x": 14.75, "y": 1, "w": 1.25}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2}, + {"matrix": [2, 2], "x": 2.75, "y": 2}, + {"matrix": [2, 3], "x": 3.75, "y": 2}, + {"matrix": [2, 4], "x": 4.75, "y": 2}, + {"matrix": [2, 5], "x": 5.75, "y": 2}, + + {"matrix": [2, 6], "x": 8.5, "y": 2}, + {"matrix": [2, 7], "x": 9.5, "y": 2}, + {"matrix": [2, 8], "x": 10.5, "y": 2}, + {"matrix": [2, 9], "x": 11.5, "y": 2}, + {"matrix": [2, 10], "x": 12.5, "y": 2}, + {"matrix": [2, 11], "x": 13.5, "y": 2}, + {"matrix": [2, 12], "x": 14.5, "y": 2, "w": 1.75}, + + {"matrix": [3, 0], "x": 0.25, "y": 3, "w": 1.25}, + {"matrix": [3, 2], "x": 2.75, "y": 3, "w": 1.25}, + {"matrix": [3, 4], "x": 4, "y": 3, "w": 2.25}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + + {"matrix": [3, 7], "x": 8, "y": 3, "w": 2.75}, + {"matrix": [3, 9], "x": 10.75, "y": 3, "w": 1.25}, + {"matrix": [3, 12], "x": 14.75, "y": 3, "w": 1.25} + ] }, "LAYOUT_40ergo_split_ent_encoder": { "layout": [ - {"x":0.5, "y":0}, - {"x":1.5, "y":0}, - {"x":2.5, "y":0}, - {"x":3.5, "y":0}, - {"x":4.5, "y":0}, - {"x":5.5, "y":0}, - {"x":8.25, "y":0}, - {"x":9.25, "y":0}, - {"x":10.25, "y":0}, - {"x":11.25, "y":0}, - {"x":12.25, "y":0}, - {"x":13.25, "y":0}, - {"x":14.25, "y":0, "w":1.5}, - - {"x":0.25, "y":1, "w":1.25}, - {"x":1.5, "y":1}, - {"x":2.5, "y":1}, - {"x":3.5, "y":1}, - {"x":4.5, "y":1}, - {"x":5.5, "y":1}, - {"x":8.75, "y":1}, - {"x":9.75, "y":1}, - {"x":10.75, "y":1}, - {"x":11.75, "y":1}, - {"x":12.75, "y":1}, - {"x":13.75, "y":1}, - {"x":14.75, "y":1, "w":1.25}, - - {"x":0, "y":2, "w":1.75}, - {"x":1.75, "y":2}, - {"x":2.75, "y":2}, - {"x":3.75, "y":2}, - {"x":4.75, "y":2}, - {"x":5.75, "y":2}, - {"x":8.5, "y":2}, - {"x":9.5, "y":2}, - {"x":10.5, "y":2}, - {"x":11.5, "y":2}, - {"x":12.5, "y":2}, - {"x":13.5, "y":2}, - {"x":14.5, "y":2, "w":1.75}, - - {"x":0.25, "y":3, "w":1.25}, - {"x":2.75, "y":3, "w":1.25}, - {"x":4, "y":3, "w":2.25}, - {"x":6.25, "y":3}, - {"x":8, "y":3, "w":2.75}, - {"x":10.75, "y":3, "w":1.25}, - {"x":14.75, "y":3, "w":1.25}, - - {"x":5.75, "y":4}, - {"x":6.75, "y":4} - ] + {"matrix": [0, 0], "x": 0.5, "y": 0}, + {"matrix": [0, 1], "x": 1.5, "y": 0}, + {"matrix": [0, 2], "x": 2.5, "y": 0}, + {"matrix": [0, 3], "x": 3.5, "y": 0}, + {"matrix": [0, 4], "x": 4.5, "y": 0}, + {"matrix": [0, 5], "x": 5.5, "y": 0}, + + {"matrix": [0, 6], "x": 8.25, "y": 0}, + {"matrix": [0, 7], "x": 9.25, "y": 0}, + {"matrix": [0, 8], "x": 10.25, "y": 0}, + {"matrix": [0, 9], "x": 11.25, "y": 0}, + {"matrix": [0, 10], "x": 12.25, "y": 0}, + {"matrix": [0, 11], "x": 13.25, "y": 0}, + {"matrix": [0, 12], "x": 14.25, "y": 0, "w": 1.5}, + + {"matrix": [1, 0], "x": 0.25, "y": 1, "w": 1.25}, + {"matrix": [1, 1], "x": 1.5, "y": 1}, + {"matrix": [1, 2], "x": 2.5, "y": 1}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1}, + {"matrix": [1, 5], "x": 5.5, "y": 1}, + + {"matrix": [1, 6], "x": 8.75, "y": 1}, + {"matrix": [1, 7], "x": 9.75, "y": 1}, + {"matrix": [1, 8], "x": 10.75, "y": 1}, + {"matrix": [1, 9], "x": 11.75, "y": 1}, + {"matrix": [1, 10], "x": 12.75, "y": 1}, + {"matrix": [1, 11], "x": 13.75, "y": 1}, + {"matrix": [1, 12], "x": 14.75, "y": 1, "w": 1.25}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2}, + {"matrix": [2, 2], "x": 2.75, "y": 2}, + {"matrix": [2, 3], "x": 3.75, "y": 2}, + {"matrix": [2, 4], "x": 4.75, "y": 2}, + {"matrix": [2, 5], "x": 5.75, "y": 2}, + + {"matrix": [2, 6], "x": 8.5, "y": 2}, + {"matrix": [2, 7], "x": 9.5, "y": 2}, + {"matrix": [2, 8], "x": 10.5, "y": 2}, + {"matrix": [2, 9], "x": 11.5, "y": 2}, + {"matrix": [2, 10], "x": 12.5, "y": 2}, + {"matrix": [2, 11], "x": 13.5, "y": 2}, + {"matrix": [2, 12], "x": 14.5, "y": 2, "w": 1.75}, + + {"matrix": [3, 0], "x": 0.25, "y": 3, "w": 1.25}, + {"matrix": [3, 2], "x": 2.75, "y": 3, "w": 1.25}, + {"matrix": [3, 4], "x": 4, "y": 3, "w": 2.25}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + + {"matrix": [3, 7], "x": 8, "y": 3, "w": 2.75}, + {"matrix": [3, 9], "x": 10.75, "y": 3, "w": 1.25}, + {"matrix": [3, 12], "x": 14.75, "y": 3, "w": 1.25}, + + {"matrix": [3, 1], "x": 5.75, "y": 4}, + {"matrix": [3, 3], "x": 6.75, "y": 4} + ] } } } -- cgit v1.2.3 From 79aa31994698c9050141714f77c0177edbcd9488 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 2 May 2023 08:25:15 +1000 Subject: `info.json` whitespace cleanups (#20651) --- keyboards/nightly_boards/adellein/info.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'keyboards/nightly_boards/adellein') diff --git a/keyboards/nightly_boards/adellein/info.json b/keyboards/nightly_boards/adellein/info.json index 5aca4e8a1d..81e21e9377 100644 --- a/keyboards/nightly_boards/adellein/info.json +++ b/keyboards/nightly_boards/adellein/info.json @@ -4,9 +4,9 @@ "url": "", "maintainer": "Neil Brian Ramirez", "usb": { - "vid": "0xD812", - "pid": "0x0010", - "device_version": "0.0.1" + "vid": "0xD812", + "pid": "0x0010", + "device_version": "0.0.1" }, "matrix_pins": { "cols": ["F7", "F6", "F5", "F4", "F1", "F0", "B7", "B3", "B2", "D0", "D1", "D2", "D3"], @@ -14,12 +14,12 @@ }, "diode_direction": "COL2ROW", "encoder": { - "rotary": [ - {"pin_a": "C7", "pin_b": "C6"} - ] + "rotary": [ + {"pin_a": "C7", "pin_b": "C6"} + ] }, "ws2812": { - "pin": "D5" + "pin": "D5" }, "processor": "atmega32u4", "bootloader": "atmel-dfu", -- cgit v1.2.3