summaryrefslogtreecommitdiff
path: root/keyboards/tzarc/djinn
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/tzarc/djinn')
-rw-r--r--keyboards/tzarc/djinn/config.h4
-rw-r--r--keyboards/tzarc/djinn/djinn.c21
-rw-r--r--keyboards/tzarc/djinn/djinn.h3
-rw-r--r--keyboards/tzarc/djinn/djinn_split_sync.c5
-rw-r--r--keyboards/tzarc/djinn/graphics/theme_djinn_default.c1
-rw-r--r--keyboards/tzarc/djinn/info.json7
-rw-r--r--keyboards/tzarc/djinn/keymaps/default/keymap.c2
-rw-r--r--keyboards/tzarc/djinn/keymaps/via/keymap.c2
-rw-r--r--keyboards/tzarc/djinn/rev1/rev1.c3
-rw-r--r--keyboards/tzarc/djinn/rev1/rev1.h3
-rw-r--r--keyboards/tzarc/djinn/rev2/rev2.c3
-rw-r--r--keyboards/tzarc/djinn/rev2/rev2.h3
-rw-r--r--keyboards/tzarc/djinn/rules.mk3
13 files changed, 21 insertions, 39 deletions
diff --git a/keyboards/tzarc/djinn/config.h b/keyboards/tzarc/djinn/config.h
index e8b2abc1f6..af98f887db 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
@@ -40,7 +41,6 @@
#define BACKLIGHT_PAL_MODE 1
// RGB configuration
-#define RGB_DI_PIN B2
#define WS2812_EXTERNAL_PULLUP
#define WS2812_PWM_DRIVER PWMD20
#define WS2812_PWM_CHANNEL 1
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/info.json b/keyboards/tzarc/djinn/info.json
index 19f5e52060..c1c313e9ef 100644
--- a/keyboards/tzarc/djinn/info.json
+++ b/keyboards/tzarc/djinn/info.json
@@ -33,6 +33,13 @@
"pin": "A7",
"levels": 4
},
+ "ws2812": {
+ "pin": "B2",
+ "driver": "pwm"
+ },
+ "rgb_matrix": {
+ "driver": "WS2812"
+ },
"split": {
"enabled": true,
"main": "pin",
diff --git a/keyboards/tzarc/djinn/keymaps/default/keymap.c b/keyboards/tzarc/djinn/keymaps/default/keymap.c
index 65b494cf32..626233946c 100644
--- a/keyboards/tzarc/djinn/keymaps/default/keymap.c
+++ b/keyboards/tzarc/djinn/keymaps/default/keymap.c
@@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Encoder map
// clang-format off
-const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[_QWERTY] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_LOWER] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) },
[_RAISE] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) },
diff --git a/keyboards/tzarc/djinn/keymaps/via/keymap.c b/keyboards/tzarc/djinn/keymaps/via/keymap.c
index 65b494cf32..626233946c 100644
--- a/keyboards/tzarc/djinn/keymaps/via/keymap.c
+++ b/keyboards/tzarc/djinn/keymaps/via/keymap.c
@@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Encoder map
// clang-format off
-const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[_QWERTY] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_LOWER] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) },
[_RAISE] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) },
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/djinn/rules.mk b/keyboards/tzarc/djinn/rules.mk
index 9b81a4bfaf..e7c32e4dc1 100644
--- a/keyboards/tzarc/djinn/rules.mk
+++ b/keyboards/tzarc/djinn/rules.mk
@@ -2,11 +2,8 @@ CUSTOM_MATRIX = lite
SERIAL_DRIVER = usart
-WS2812_DRIVER = pwm
CIE1931_CURVE = yes
-RGB_MATRIX_DRIVER = WS2812
-
EEPROM_DRIVER = spi
AUDIO_DRIVER = pwm_software