summaryrefslogtreecommitdiff
path: root/keyboards/hs60
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-11-28 16:39:48 +1100
committerNick Brassel <nick@tzarc.org>2023-11-28 16:40:47 +1100
commit0115951de12bd4c798a43a380651c34552552e85 (patch)
tree62999011ae782d93aa6dc9c889615db2a840cafc /keyboards/hs60
parent0379d1f59e58cefa18cdb72ba1b77507d1108ae6 (diff)
parent4d99e0a23cff02f4c6e55e093b5de08a9be0df7c (diff)
`develop` -> `master`, 2023q4 edition
Diffstat (limited to 'keyboards/hs60')
-rw-r--r--keyboards/hs60/v1/config.h5
-rw-r--r--keyboards/hs60/v1/v1.c4
-rw-r--r--keyboards/hs60/v2/ansi/config.h4
-rw-r--r--keyboards/hs60/v2/ansi/keymaps/stanrc85/config.h38
-rw-r--r--keyboards/hs60/v2/ansi/keymaps/stanrc85/keymap.c59
-rw-r--r--keyboards/hs60/v2/ansi/keymaps/stanrc85/readme.md48
-rw-r--r--keyboards/hs60/v2/ansi/keymaps/stanrc85/rules.mk1
-rw-r--r--keyboards/hs60/v2/ansi/rules.mk4
-rw-r--r--keyboards/hs60/v2/hhkb/config.h4
-rw-r--r--keyboards/hs60/v2/hhkb/rules.mk4
-rw-r--r--keyboards/hs60/v2/iso/config.h4
-rw-r--r--keyboards/hs60/v2/iso/rules.mk4
-rw-r--r--keyboards/hs60/v2/v2.c79
13 files changed, 94 insertions, 164 deletions
diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h
index 62c800b9bc..c864464390 100644
--- a/keyboards/hs60/v1/config.h
+++ b/keyboards/hs60/v1/config.h
@@ -41,10 +41,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 215
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110101
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SCL
-#define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 30
#ifdef HS60_ANSI
diff --git a/keyboards/hs60/v1/v1.c b/keyboards/hs60/v1/v1.c
index 6c5f03f428..50f6215a02 100644
--- a/keyboards/hs60/v1/v1.c
+++ b/keyboards/hs60/v1/v1.c
@@ -91,7 +91,7 @@ void raw_hid_receive( uint8_t *data, uint8_t length )
#ifdef HS60_ANSI
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -199,7 +199,7 @@ led_config_t g_led_config = { {
#else
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/hs60/v2/ansi/config.h b/keyboards/hs60/v2/ansi/config.h
index 614b44d4d4..e96c36313c 100644
--- a/keyboards/hs60/v2/ansi/config.h
+++ b/keyboards/hs60/v2/ansi/config.h
@@ -53,8 +53,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
-#define DRIVER_COUNT 2
-#define RGB_MATRIX_LED_COUNT 64
+#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_LED_COUNT 64
// These define which keys in the matrix are alphas/mods
// Used for backlight effects so colors are different for
diff --git a/keyboards/hs60/v2/ansi/keymaps/stanrc85/config.h b/keyboards/hs60/v2/ansi/keymaps/stanrc85/config.h
deleted file mode 100644
index bf39aae3a2..0000000000
--- a/keyboards/hs60/v2/ansi/keymaps/stanrc85/config.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#pragma once
-
-// disable backlight after timeout in minutes, 0 = no timeout
-#undef RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT
-#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 20
-
-#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_0
-#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_1
-#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_2
-#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_3
-#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_4
-
-#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0010000000000001
-#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001
-#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 //Setting \ key to "MOD" instead of "ALPHA" for lighting
-#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0010000000000001
-#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111
-
-#undef RGB_BACKLIGHT_CAPS_LOCK_INDICATOR
-#undef RGB_BACKLIGHT_LAYER_1_INDICATOR
-#undef RGB_BACKLIGHT_LAYER_2_INDICATOR
-#undef RGB_BACKLIGHT_LAYER_3_INDICATOR
-
-#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 200, .s = 255 }, .index = 3-1 } //purple
-#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 100, .s = 255 }, .index = 60-1 } //green
-#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 150, .s = 255 }, .index = 60-1 } //blue
-#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 60-1 } //white
-
-#undef RGB_BACKLIGHT_BRIGHTNESS
-#define RGB_BACKLIGHT_BRIGHTNESS 175
-
-#undef RGB_BACKLIGHT_COLOR_1
-#undef RGB_BACKLIGHT_COLOR_2
-
-#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
-#define RGB_BACKLIGHT_COLOR_2 { .h = 150, .s = 255 }
-
-#define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/hs60/v2/ansi/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/ansi/keymaps/stanrc85/keymap.c
deleted file mode 100644
index 13fb7f005b..0000000000
--- a/keyboards/hs60/v2/ansi/keymaps/stanrc85/keymap.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright 2018 Stanrc85
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
-#include QMK_KEYBOARD_H
-#include "stanrc85.h"
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_60_ansi(
- TD_TESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
- KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(_FN2_60), TD_TCTL),
-
- [_DEFAULT] = LAYOUT_60_ansi(
- QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1_60), MO(_FN2_60), KC_RCTL),
-
- [_FN1_60] = LAYOUT_60_ansi(
- KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
- _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS,
- KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,
- _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______),
-
- [_FN2_60] = LAYOUT_60_ansi(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EE_CLR,
- _______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, QK_BOOT,
- _______, EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, KC_MAKE,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, TG(_DEFAULT))
-};
-
-// Backlight specific keys:
-// EF_INC, EF_DEC, // next/previous backlight effect
-// H1_INC, H1_DEC, // Color 1 hue increase/decrease
-// S1_INC, S1_DEC, // Color 1 saturation increase/decrease
-// H2_INC, H2_DEC, // Color 2 hue increase/decrease
-// S2_INC, S2_DEC, // Color 2 saturation increase/decrease
-// BR_INC, BR_DEC, // backlight brightness increase/decrease
-
-bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
- return true;
-}
diff --git a/keyboards/hs60/v2/ansi/keymaps/stanrc85/readme.md b/keyboards/hs60/v2/ansi/keymaps/stanrc85/readme.md
deleted file mode 100644
index 430d363f37..0000000000
--- a/keyboards/hs60/v2/ansi/keymaps/stanrc85/readme.md
+++ /dev/null
@@ -1,48 +0,0 @@
-<!-- Copyright 2019 Stanrc85
-
-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 <http://www.gnu.org/licenses/>.-->
-
-# Stanrc85's Standard ANSI 60% Layout
-
-## Keymap Notes
-- Layer 0 is default QWERTY layout with additional custom features:
- - SpaceFN to function layer 2 on `Space`
- - `CTRL` when held and `ESC` when tapped on `CAPS LOCK`
- - Tap Dance on `Fn1` for `CTRL+ALT+DEL` and `WIN+L`
- - Tap Dance on `ESC` for `ESC` and ` ` `
-
-![Base QWERTY Layer](https://imgur.com/lGcyLJx.png)
-
-- Layer 1 is default QWERTY with no custom features used mostly for gaming
- - Enabled by `Fn2+CAPS` from base layer
-
-![Default ANSI Layer](https://imgur.com/M7T9PNT.png)
-
-- Layer 2 is Function layer:
- - F keys
- - Arrows
- - Volume and Media controls
- - AutoHotkey shortcuts based on [Speaker Control](https://github.com/stanrc85/Speaker-Control) script
- - AHK Mic is used to mute/unmute microphone
- - AHK Speaker switches audio output between headphones and speakers
-
-![Function Layer](https://imgur.com/YPl0JrU.png)
-
-- Layer 3 is Backlight control and RESET
- - `Fn2+CAPS` used to toggle Default QWERTY layer on and off
-
-![RGB and RESET Layer](https://imgur.com/mMHoJPa.png)
-
-### Build
-To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85`.
diff --git a/keyboards/hs60/v2/ansi/keymaps/stanrc85/rules.mk b/keyboards/hs60/v2/ansi/keymaps/stanrc85/rules.mk
deleted file mode 100644
index 1e5b99807c..0000000000
--- a/keyboards/hs60/v2/ansi/keymaps/stanrc85/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-VIA_ENABLE = yes
diff --git a/keyboards/hs60/v2/ansi/rules.mk b/keyboards/hs60/v2/ansi/rules.mk
index a231765dff..bc8cb00131 100644
--- a/keyboards/hs60/v2/ansi/rules.mk
+++ b/keyboards/hs60/v2/ansi/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/led/issi/is31fl3733.c \
- quantum/color.c \
- i2c_master.c
+ quantum/color.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/hs60/v2/hhkb/config.h b/keyboards/hs60/v2/hhkb/config.h
index e834616068..6a6fa375bc 100644
--- a/keyboards/hs60/v2/hhkb/config.h
+++ b/keyboards/hs60/v2/hhkb/config.h
@@ -53,8 +53,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
-#define DRIVER_COUNT 2
-#define RGB_MATRIX_LED_COUNT 64
+#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_LED_COUNT 64
// These define which keys in the matrix are alphas/mods
// Used for backlight effects so colors are different for
diff --git a/keyboards/hs60/v2/hhkb/rules.mk b/keyboards/hs60/v2/hhkb/rules.mk
index a231765dff..bc8cb00131 100644
--- a/keyboards/hs60/v2/hhkb/rules.mk
+++ b/keyboards/hs60/v2/hhkb/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/led/issi/is31fl3733.c \
- quantum/color.c \
- i2c_master.c
+ quantum/color.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/hs60/v2/iso/config.h b/keyboards/hs60/v2/iso/config.h
index 7421f1bf12..5f1a55b1d1 100644
--- a/keyboards/hs60/v2/iso/config.h
+++ b/keyboards/hs60/v2/iso/config.h
@@ -50,8 +50,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
-#define DRIVER_COUNT 2
-#define RGB_MATRIX_LED_COUNT 64
+#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_LED_COUNT 64
// These define which keys in the matrix are alphas/mods
// Used for backlight effects so colors are different for
diff --git a/keyboards/hs60/v2/iso/rules.mk b/keyboards/hs60/v2/iso/rules.mk
index a231765dff..bc8cb00131 100644
--- a/keyboards/hs60/v2/iso/rules.mk
+++ b/keyboards/hs60/v2/iso/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/led/issi/is31fl3733.c \
- quantum/color.c \
- i2c_master.c
+ quantum/color.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/hs60/v2/v2.c b/keyboards/hs60/v2/v2.c
index f817ef19e7..45b1f54d5f 100644
--- a/keyboards/hs60/v2/v2.c
+++ b/keyboards/hs60/v2/v2.c
@@ -15,5 +15,82 @@
*/
#ifndef RGB_BACKLIGHT_HS60
-#error RGB_BACKLIGHT_HS60 not defined, recheck config.h
+# error RGB_BACKLIGHT_HS60 not defined, recheck config.h
+#else
+# include "drivers/led/issi/is31fl3733.h"
+#endif
+
+#if defined(RGB_MATRIX_ENABLE) || defined(RGB_BACKLIGHT_HS60)
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, B_1, A_1, C_1}, //LA1
+ {0, E_1, D_1, F_1}, //LA2
+ {0, H_1, G_1, I_1}, //LA3
+ {0, K_1, J_1, L_1}, //LA4
+ {0, B_2, A_2, C_2}, //LA5
+ {0, E_2, D_2, F_2}, //LA6
+ {0, H_2, G_2, I_2}, //LA7
+ {0, K_2, J_2, L_2}, //LA8
+ {0, B_3, A_3, C_3}, //LA9
+ {0, E_3, D_3, F_3}, //LA10
+ {0, H_3, G_3, I_3}, //LA11
+ {0, K_3, J_3, L_3}, //LA12
+ {0, B_4, A_4, C_4}, //LA13
+ {0, E_4, D_4, F_4}, //LA14
+ {0, H_4, G_4, I_4}, //LA15
+ {0, K_4, J_4, L_4}, //LA16
+ {0, B_5, A_5, C_5}, //LA17
+ {0, E_5, D_5, F_5}, //LA18
+ {0, H_5, G_5, I_5}, //LA19
+ {0, K_5, J_5, L_5}, //LA20
+ {0, B_6, A_6, C_6}, //LA21
+ {0, E_6, D_6, F_6}, //LA22
+ {0, H_6, G_6, I_6}, //LA23
+ {0, K_6, J_6, L_6}, //LA24
+ {0, B_7, A_7, C_7}, //LA25
+ {0, E_7, D_7, F_7}, //LA26
+ {0, H_7, G_7, I_7}, //LA27
+ {0, K_7, J_7, L_7}, //LA28
+ {0, B_8, A_8, C_8}, //LA29
+ {0, E_8, D_8, F_8}, //LA30
+ {0, H_8, G_8, I_8}, //LA31
+ {0, K_8, J_8, L_8}, //LA32
+ {0, B_9, A_9, C_9}, //LA33
+ {0, E_9, D_9, F_9}, //LA34
+ {0, H_9, G_9, I_9}, //LA35
+ {0, K_9, J_9, L_9}, //LA36
+ {0, B_10, A_10, C_10}, //LA37
+ {0, E_10, D_10, F_10}, //LA38
+ {0, H_10, G_10, I_10}, //LA39
+ {0, K_10, J_10, L_10}, //LA40
+ {0, B_11, A_11, C_11}, //LA41
+ {0, E_11, D_11, F_11}, //LA42
+ {0, H_11, G_11, I_11}, //LA43
+ {0, K_11, J_11, L_11}, //LA44
+ {0, B_12, A_12, C_12}, //LA45
+ {0, E_12, D_12, F_12}, //LA46
+ {0, H_12, G_12, I_12}, //LA47
+ {0, K_12, J_12, L_12}, //LA48
+ {0, B_13, A_13, C_13}, //LA49
+ {0, E_13, D_13, F_13}, //LA50
+ {0, H_13, G_13, I_13}, //LA51
+ {0, K_13, J_13, L_13}, //LA52
+ {0, B_14, A_14, C_14}, //LA53
+ {0, E_14, D_14, F_14}, //LA54
+ {0, H_14, G_14, I_14}, //LA55
+ {0, K_14, J_14, L_14}, //LA56
+ {0, B_15, A_15, C_15}, //LA57
+ {0, E_15, D_15, F_15}, //LA58
+ {0, H_15, G_15, I_15}, //LA59
+ {0, K_15, J_15, L_15}, //LA60
+ {0, B_16, A_16, C_16}, //LA61
+ {0, E_16, D_16, F_16}, //LA62
+ {0, H_16, G_16, I_16}, //LA63
+ {0, K_16, J_16, L_16}, //LA64
+};
#endif