diff options
Diffstat (limited to 'keyboards/tzarc')
-rw-r--r-- | keyboards/tzarc/djinn/config.h | 3 | ||||
-rw-r--r-- | keyboards/tzarc/djinn/djinn.c | 21 | ||||
-rw-r--r-- | keyboards/tzarc/djinn/djinn.h | 3 | ||||
-rw-r--r-- | keyboards/tzarc/djinn/djinn_split_sync.c | 5 | ||||
-rw-r--r-- | keyboards/tzarc/djinn/graphics/theme_djinn_default.c | 1 | ||||
-rw-r--r-- | keyboards/tzarc/djinn/rev1/rev1.c | 3 | ||||
-rw-r--r-- | keyboards/tzarc/djinn/rev1/rev1.h | 3 | ||||
-rw-r--r-- | keyboards/tzarc/djinn/rev2/rev2.c | 3 | ||||
-rw-r--r-- | keyboards/tzarc/djinn/rev2/rev2.h | 3 | ||||
-rw-r--r-- | keyboards/tzarc/ghoul/ghoul.c | 2 | ||||
-rw-r--r-- | keyboards/tzarc/ghoul/info.json | 82 |
11 files changed, 54 insertions, 75 deletions
diff --git a/keyboards/tzarc/djinn/config.h b/keyboards/tzarc/djinn/config.h index e8b2abc1f6..c1c2f6832a 100644 --- a/keyboards/tzarc/djinn/config.h +++ b/keyboards/tzarc/djinn/config.h @@ -1,4 +1,4 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) +// Copyright 2018-2023 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -16,6 +16,7 @@ #define SPLIT_LED_STATE_ENABLE #define SPLIT_MODS_ENABLE #define SPLIT_WPM_ENABLE +#define SPLIT_ACTIVITY_ENABLE // SPI Configuration #define SPI_DRIVER SPID3 diff --git a/keyboards/tzarc/djinn/djinn.c b/keyboards/tzarc/djinn/djinn.c index 93b1ee775e..17e5833ee9 100644 --- a/keyboards/tzarc/djinn/djinn.c +++ b/keyboards/tzarc/djinn/djinn.c @@ -1,4 +1,4 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) +// Copyright 2018-2023 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #include <string.h> #include "quantum.h" @@ -74,7 +74,6 @@ void keyboard_post_init_kb(void) { qp_init(lcd, QP_ROTATION_0); // Turn on the LCD and clear the display - kb_state.lcd_power = 1; qp_power(lcd, true); qp_rect(lcd, 0, 0, 239, 319, HSV_BLACK, true); @@ -187,18 +186,14 @@ void housekeeping_task_kb(void) { } // Turn on/off the LCD - static bool lcd_on = false; - if (lcd_on != (bool)kb_state.lcd_power) { - lcd_on = (bool)kb_state.lcd_power; - qp_power(lcd, lcd_on); - } + bool peripherals_on = last_input_activity_elapsed() < LCD_ACTIVITY_TIMEOUT; // Enable/disable RGB - if (lcd_on) { + if (peripherals_on) { // Turn on RGB writePinHigh(RGB_POWER_ENABLE_PIN); // Modify the RGB state if different to the LCD state - if (rgb_matrix_is_enabled() != lcd_on) { + if (rgb_matrix_is_enabled() != peripherals_on) { // Wait for a small amount of time to allow the RGB capacitors to charge, before enabling RGB output wait_ms(10); // Enable RGB @@ -208,21 +203,21 @@ void housekeeping_task_kb(void) { // Turn off RGB writePinLow(RGB_POWER_ENABLE_PIN); // Disable the PWM output for the RGB - if (rgb_matrix_is_enabled() != lcd_on) { + if (rgb_matrix_is_enabled() != peripherals_on) { rgb_matrix_disable_noeeprom(); } } // Match the backlight to the LCD state - if (is_keyboard_master() && is_backlight_enabled() != lcd_on) { - if (lcd_on) + if (is_keyboard_master() && is_backlight_enabled() != peripherals_on) { + if (peripherals_on) backlight_enable(); else backlight_disable(); } // Draw the UI - if (kb_state.lcd_power) { + if (peripherals_on) { draw_ui_user(false); } diff --git a/keyboards/tzarc/djinn/djinn.h b/keyboards/tzarc/djinn/djinn.h index ff6b555e8e..70aa34ff08 100644 --- a/keyboards/tzarc/djinn/djinn.h +++ b/keyboards/tzarc/djinn/djinn.h @@ -1,4 +1,4 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) +// Copyright 2018-2023 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include "quantum.h" @@ -20,7 +20,6 @@ const char* usbpd_str(usbpd_allowance_t allowance); #pragma pack(push) #pragma pack(1) typedef struct kb_runtime_config { - unsigned lcd_power : 1; usbpd_allowance_t current_setting : 2; } kb_runtime_config; #pragma pack(pop) diff --git a/keyboards/tzarc/djinn/djinn_split_sync.c b/keyboards/tzarc/djinn/djinn_split_sync.c index 3c7a58d155..8b10e88b4b 100644 --- a/keyboards/tzarc/djinn/djinn_split_sync.c +++ b/keyboards/tzarc/djinn/djinn_split_sync.c @@ -1,4 +1,4 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) +// Copyright 2018-2023 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #include <string.h> #include "quantum.h" @@ -13,9 +13,6 @@ void kb_state_update(void) { if (is_keyboard_master()) { // Modify allowed current limits usbpd_update(); - - // Turn off the LCD if there's been no matrix activity - kb_state.lcd_power = (last_input_activity_elapsed() < LCD_ACTIVITY_TIMEOUT) ? 1 : 0; } } diff --git a/keyboards/tzarc/djinn/graphics/theme_djinn_default.c b/keyboards/tzarc/djinn/graphics/theme_djinn_default.c index c9863f2285..f321308ac5 100644 --- a/keyboards/tzarc/djinn/graphics/theme_djinn_default.c +++ b/keyboards/tzarc/djinn/graphics/theme_djinn_default.c @@ -1,6 +1,5 @@ // Copyright 2018-2022 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later -#include QMK_KEYBOARD_H #include <hal.h> #include <string.h> #include <ctype.h> diff --git a/keyboards/tzarc/djinn/rev1/rev1.c b/keyboards/tzarc/djinn/rev1/rev1.c deleted file mode 100644 index 95f0e20020..0000000000 --- a/keyboards/tzarc/djinn/rev1/rev1.c +++ /dev/null @@ -1,3 +0,0 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) -// SPDX-License-Identifier: GPL-2.0-or-later -#include "rev1.h" diff --git a/keyboards/tzarc/djinn/rev1/rev1.h b/keyboards/tzarc/djinn/rev1/rev1.h deleted file mode 100644 index 1845cb8fdd..0000000000 --- a/keyboards/tzarc/djinn/rev1/rev1.h +++ /dev/null @@ -1,3 +0,0 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) -// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once diff --git a/keyboards/tzarc/djinn/rev2/rev2.c b/keyboards/tzarc/djinn/rev2/rev2.c deleted file mode 100644 index f55e0c224a..0000000000 --- a/keyboards/tzarc/djinn/rev2/rev2.c +++ /dev/null @@ -1,3 +0,0 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) -// SPDX-License-Identifier: GPL-2.0-or-later -#include "rev2.h" diff --git a/keyboards/tzarc/djinn/rev2/rev2.h b/keyboards/tzarc/djinn/rev2/rev2.h deleted file mode 100644 index 1845cb8fdd..0000000000 --- a/keyboards/tzarc/djinn/rev2/rev2.h +++ /dev/null @@ -1,3 +0,0 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) -// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once diff --git a/keyboards/tzarc/ghoul/ghoul.c b/keyboards/tzarc/ghoul/ghoul.c index aceb24764b..a97399110c 100644 --- a/keyboards/tzarc/ghoul/ghoul.c +++ b/keyboards/tzarc/ghoul/ghoul.c @@ -1,6 +1,6 @@ // Copyright 2018-2022 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-3.0-or-later -#include QMK_KEYBOARD_H +#include "quantum.h" #include "analog.h" #include "spi_master.h" diff --git a/keyboards/tzarc/ghoul/info.json b/keyboards/tzarc/ghoul/info.json index 14e833c5b2..58c5175cb2 100644 --- a/keyboards/tzarc/ghoul/info.json +++ b/keyboards/tzarc/ghoul/info.json @@ -26,47 +26,47 @@ "layouts": { "LAYOUT": { "layout": [ - { "label": "Q", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 }, - { "label": "W", "matrix": [0, 4], "w": 1, "x": 1, "y": 0 }, - { "label": "E", "matrix": [1, 0], "w": 1, "x": 2, "y": 0 }, - { "label": "R", "matrix": [1, 4], "w": 1, "x": 3, "y": 0 }, - { "label": "T", "matrix": [2, 0], "w": 1, "x": 4, "y": 0 }, - { "label": "kEC", "matrix": [5, 0], "w": 1, "x": 5.5, "y": 0 }, - { "label": "Y", "matrix": [2, 4], "w": 1, "x": 7, "y": 0 }, - { "label": "U", "matrix": [3, 0], "w": 1, "x": 8, "y": 0 }, - { "label": "I", "matrix": [3, 4], "w": 1, "x": 9, "y": 0 }, - { "label": "O", "matrix": [4, 0], "w": 1, "x": 10, "y": 0 }, - { "label": "P", "matrix": [4, 4], "w": 1, "x": 11, "y": 0 }, - { "label": "A", "matrix": [0, 1], "w": 1, "x": 0, "y": 1 }, - { "label": "S", "matrix": [0, 5], "w": 1, "x": 1, "y": 1 }, - { "label": "D", "matrix": [1, 1], "w": 1, "x": 2, "y": 1 }, - { "label": "F", "matrix": [1, 5], "w": 1, "x": 3, "y": 1 }, - { "label": "G", "matrix": [2, 1], "w": 1, "x": 4, "y": 1 }, - { "label": "H", "matrix": [2, 5], "w": 1, "x": 7, "y": 1 }, - { "label": "J", "matrix": [3, 1], "w": 1, "x": 8, "y": 1 }, - { "label": "K", "matrix": [3, 5], "w": 1, "x": 9, "y": 1 }, - { "label": "L", "matrix": [4, 1], "w": 1, "x": 10, "y": 1 }, - { "label": ";", "matrix": [4, 5], "w": 1, "x": 11, "y": 1 }, - { "label": "Z", "matrix": [0, 2], "w": 1, "x": 0, "y": 2 }, - { "label": "X", "matrix": [0, 6], "w": 1, "x": 1, "y": 2 }, - { "label": "C", "matrix": [1, 2], "w": 1, "x": 2, "y": 2 }, - { "label": "V", "matrix": [1, 6], "w": 1, "x": 3, "y": 2 }, - { "label": "B", "matrix": [2, 2], "w": 1, "x": 4, "y": 2 }, - { "label": "N", "matrix": [2, 6], "w": 1, "x": 7, "y": 2 }, - { "label": "M", "matrix": [3, 2], "w": 1, "x": 8, "y": 2 }, - { "label": ",", "matrix": [3, 6], "w": 1, "x": 9, "y": 2 }, - { "label": ".", "matrix": [4, 2], "w": 1, "x": 10, "y": 2 }, - { "label": "/", "matrix": [4, 6], "w": 1, "x": 11, "y": 2 }, - { "label": "Ctrl", "matrix": [0, 3], "w": 1, "x": 0, "y": 3 }, - { "label": "Alt", "matrix": [0, 7], "w": 1, "x": 1, "y": 3 }, - { "label": "Super", "matrix": [1, 3], "w": 1, "x": 2, "y": 3 }, - { "label": "Lower", "matrix": [1, 7], "w": 1, "x": 3, "y": 3 }, - { "label": "Space", "matrix": [2, 3], "w": 1, "x": 4, "y": 3 }, - { "label": "Space", "matrix": [2, 7], "w": 1, "x": 7, "y": 3 }, - { "label": "Raise", "matrix": [3, 3], "w": 1, "x": 8, "y": 3 }, - { "label": "←", "matrix": [3, 7], "w": 1, "x": 9, "y": 3 }, - { "label": "↓", "matrix": [4, 3], "w": 1, "x": 10, "y": 3 }, - { "label": "↑", "matrix": [4, 7], "w": 1, "x": 11, "y": 3 } + { "label": "Q", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "W", "matrix": [0, 4], "x": 1, "y": 0 }, + { "label": "E", "matrix": [1, 0], "x": 2, "y": 0 }, + { "label": "R", "matrix": [1, 4], "x": 3, "y": 0 }, + { "label": "T", "matrix": [2, 0], "x": 4, "y": 0 }, + { "label": "kEC", "matrix": [5, 0], "x": 5.5, "y": 0 }, + { "label": "Y", "matrix": [2, 4], "x": 7, "y": 0 }, + { "label": "U", "matrix": [3, 0], "x": 8, "y": 0 }, + { "label": "I", "matrix": [3, 4], "x": 9, "y": 0 }, + { "label": "O", "matrix": [4, 0], "x": 10, "y": 0 }, + { "label": "P", "matrix": [4, 4], "x": 11, "y": 0 }, + { "label": "A", "matrix": [0, 1], "x": 0, "y": 1 }, + { "label": "S", "matrix": [0, 5], "x": 1, "y": 1 }, + { "label": "D", "matrix": [1, 1], "x": 2, "y": 1 }, + { "label": "F", "matrix": [1, 5], "x": 3, "y": 1 }, + { "label": "G", "matrix": [2, 1], "x": 4, "y": 1 }, + { "label": "H", "matrix": [2, 5], "x": 7, "y": 1 }, + { "label": "J", "matrix": [3, 1], "x": 8, "y": 1 }, + { "label": "K", "matrix": [3, 5], "x": 9, "y": 1 }, + { "label": "L", "matrix": [4, 1], "x": 10, "y": 1 }, + { "label": ";", "matrix": [4, 5], "x": 11, "y": 1 }, + { "label": "Z", "matrix": [0, 2], "x": 0, "y": 2 }, + { "label": "X", "matrix": [0, 6], "x": 1, "y": 2 }, + { "label": "C", "matrix": [1, 2], "x": 2, "y": 2 }, + { "label": "V", "matrix": [1, 6], "x": 3, "y": 2 }, + { "label": "B", "matrix": [2, 2], "x": 4, "y": 2 }, + { "label": "N", "matrix": [2, 6], "x": 7, "y": 2 }, + { "label": "M", "matrix": [3, 2], "x": 8, "y": 2 }, + { "label": ",", "matrix": [3, 6], "x": 9, "y": 2 }, + { "label": ".", "matrix": [4, 2], "x": 10, "y": 2 }, + { "label": "/", "matrix": [4, 6], "x": 11, "y": 2 }, + { "label": "Ctrl", "matrix": [0, 3], "x": 0, "y": 3 }, + { "label": "Alt", "matrix": [0, 7], "x": 1, "y": 3 }, + { "label": "Super", "matrix": [1, 3], "x": 2, "y": 3 }, + { "label": "Lower", "matrix": [1, 7], "x": 3, "y": 3 }, + { "label": "Space", "matrix": [2, 3], "x": 4, "y": 3 }, + { "label": "Space", "matrix": [2, 7], "x": 7, "y": 3 }, + { "label": "Raise", "matrix": [3, 3], "x": 8, "y": 3 }, + { "label": "←", "matrix": [3, 7], "x": 9, "y": 3 }, + { "label": "↓", "matrix": [4, 3], "x": 10, "y": 3 }, + { "label": "↑", "matrix": [4, 7], "x": 11, "y": 3 } ] } } |