aboutsummaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/tkc/portico/config.h60
-rw-r--r--keyboards/tkc/portico/keymaps/default/keymap.c20
-rw-r--r--keyboards/tkc/portico/keymaps/via/keymap.c20
-rw-r--r--keyboards/tkc/portico/portico.c2
-rw-r--r--keyboards/tkc/portico/portico.h4
-rw-r--r--keyboards/tkc/portico/rules.mk11
-rw-r--r--keyboards/wilba_tech/wt_rgb_backlight.c129
7 files changed, 237 insertions, 9 deletions
diff --git a/keyboards/tkc/portico/config.h b/keyboards/tkc/portico/config.h
index 4a7da833f..bd4d09625 100644
--- a/keyboards/tkc/portico/config.h
+++ b/keyboards/tkc/portico/config.h
@@ -70,4 +70,62 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
70# define DRIVER_1_LED_TOTAL 36 70# define DRIVER_1_LED_TOTAL 36
71# define DRIVER_2_LED_TOTAL 31 71# define DRIVER_2_LED_TOTAL 31
72# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) 72# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
73#endif 73
74#else
75// IS31FL3731 driver
76#define DRIVER_COUNT 2
77#define DRIVER_LED_TOTAL 67
78
79#define RGB_BACKLIGHT_ENABLED 1
80
81// This conditionally compiles the backlight code for Dawn60 specifics
82#define RGB_BACKLIGHT_PORTICO
83
84// disable backlight when USB suspended (PC sleep/hibernate/shutdown)
85#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 1
86
87// disable backlight after timeout in minutes, 0 = no timeout
88#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
89
90// the default brightness
91#define RGB_BACKLIGHT_BRIGHTNESS 255
92
93// the default effect (RGB test)
94#define RGB_BACKLIGHT_EFFECT 255
95
96// the default effect speed (0-3)
97#define RGB_BACKLIGHT_EFFECT_SPEED 0
98
99// the default color1 and color2
100#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
101#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
102
103#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0
104#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0
105#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0
106#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0
107#define RGB_BACKLIGHT_USE_ISO_ENTER 0
108#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0
109#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
110#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
111#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
112#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
113
114// These define which keys in the matrix are alphas/mods
115// Used for backlight effects so colors are different for
116// alphas vs. mods
117// Each value is for a row, bit 0 is column 0
118// Alpha=0 Mod=1
119#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0110000000000001
120#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0110000000000001
121#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0111000000000001
122#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001
123#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b1111111111111111
124
125// Backlight config starts after VIA's EEPROM usage,
126// dynamic keymaps start after this.
127#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31
128
129// VIA lighting is handled by the keyboard-level code
130#define VIA_CUSTOM_LIGHTING_ENABLE
131#endif \ No newline at end of file
diff --git a/keyboards/tkc/portico/keymaps/default/keymap.c b/keyboards/tkc/portico/keymaps/default/keymap.c
index bbc68c3b9..344206701 100644
--- a/keyboards/tkc/portico/keymaps/default/keymap.c
+++ b/keyboards/tkc/portico/keymaps/default/keymap.c
@@ -17,6 +17,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
18#include QMK_KEYBOARD_H 18#include QMK_KEYBOARD_H
19 19
20// RGB-specific keys:
21// EF_INC, EF_DEC, // next/previous backlight effect
22// H1_INC, H1_DEC, // Color 1 hue increase/decrease
23// S1_INC, S1_DEC, // Color 1 saturation increase/decrease
24// H2_INC, H2_DEC, // Color 2 hue increase/decrease
25// S2_INC, S2_DEC, // Color 2 saturation increase/decrease
26// BR_INC, BR_DEC, // backlight brightness increase/decrease
27
20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 28const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21 [0] = LAYOUT_65_ansi_blocker( 29 [0] = LAYOUT_65_ansi_blocker(
22 KC_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_HOME, 30 KC_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_HOME,
@@ -25,13 +33,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25 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_UP, KC_END, 33 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_UP, KC_END,
26 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT 34 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
27 ), 35 ),
36#ifdef RGB_BACKLIGHT_PORTICO
37 [1] = LAYOUT_65_ansi_blocker(
38 KC_GESC, 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, KC_HOME,
39 _______, EF_INC, EF_DEC, BR_INC, BR_DEC, H1_INC, H1_DEC, S1_INC, S1_DEC, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP,
40 KC_CAPS, _______, _______, _______, _______, H2_INC, H2_DEC, S2_INC, S2_DEC, _______, _______, _______, _______, KC_PGDN,
41 KC_LSFT, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, KC_MUTE,
42 _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
43 ),
44#else
28 [1] = LAYOUT_65_ansi_blocker( 45 [1] = LAYOUT_65_ansi_blocker(
29 KC_GESC, 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, KC_HOME, 46 KC_GESC, 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, KC_HOME,
30 _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP, 47 _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP,
31 KC_CAPS, RGB_SPI, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, KC_PGDN, 48 KC_CAPS, RGB_SPI, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN,
32 KC_LSFT, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, KC_MUTE, 49 KC_LSFT, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, KC_MUTE,
33 _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT 50 _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
34 ), 51 ),
52#endif
35 [2] = LAYOUT_65_ansi_blocker( 53 [2] = LAYOUT_65_ansi_blocker(
36 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 54 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
37 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 55 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
diff --git a/keyboards/tkc/portico/keymaps/via/keymap.c b/keyboards/tkc/portico/keymaps/via/keymap.c
index bbc68c3b9..344206701 100644
--- a/keyboards/tkc/portico/keymaps/via/keymap.c
+++ b/keyboards/tkc/portico/keymaps/via/keymap.c
@@ -17,6 +17,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
18#include QMK_KEYBOARD_H 18#include QMK_KEYBOARD_H
19 19
20// RGB-specific keys:
21// EF_INC, EF_DEC, // next/previous backlight effect
22// H1_INC, H1_DEC, // Color 1 hue increase/decrease
23// S1_INC, S1_DEC, // Color 1 saturation increase/decrease
24// H2_INC, H2_DEC, // Color 2 hue increase/decrease
25// S2_INC, S2_DEC, // Color 2 saturation increase/decrease
26// BR_INC, BR_DEC, // backlight brightness increase/decrease
27
20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 28const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21 [0] = LAYOUT_65_ansi_blocker( 29 [0] = LAYOUT_65_ansi_blocker(
22 KC_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_HOME, 30 KC_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_HOME,
@@ -25,13 +33,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25 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_UP, KC_END, 33 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_UP, KC_END,
26 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT 34 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
27 ), 35 ),
36#ifdef RGB_BACKLIGHT_PORTICO
37 [1] = LAYOUT_65_ansi_blocker(
38 KC_GESC, 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, KC_HOME,
39 _______, EF_INC, EF_DEC, BR_INC, BR_DEC, H1_INC, H1_DEC, S1_INC, S1_DEC, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP,
40 KC_CAPS, _______, _______, _______, _______, H2_INC, H2_DEC, S2_INC, S2_DEC, _______, _______, _______, _______, KC_PGDN,
41 KC_LSFT, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, KC_MUTE,
42 _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
43 ),
44#else
28 [1] = LAYOUT_65_ansi_blocker( 45 [1] = LAYOUT_65_ansi_blocker(
29 KC_GESC, 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, KC_HOME, 46 KC_GESC, 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, KC_HOME,
30 _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP, 47 _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP,
31 KC_CAPS, RGB_SPI, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, KC_PGDN, 48 KC_CAPS, RGB_SPI, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN,
32 KC_LSFT, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, KC_MUTE, 49 KC_LSFT, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, KC_MUTE,
33 _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT 50 _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
34 ), 51 ),
52#endif
35 [2] = LAYOUT_65_ansi_blocker( 53 [2] = LAYOUT_65_ansi_blocker(
36 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 54 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
37 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 55 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
diff --git a/keyboards/tkc/portico/portico.c b/keyboards/tkc/portico/portico.c
index e4fd74107..a65a85d24 100644
--- a/keyboards/tkc/portico/portico.c
+++ b/keyboards/tkc/portico/portico.c
@@ -136,4 +136,4 @@ void rgb_matrix_indicators_kb(void) {
136 rgb_matrix_driver.flush(); 136 rgb_matrix_driver.flush();
137 } 137 }
138} 138}
139#endif 139#endif \ No newline at end of file
diff --git a/keyboards/tkc/portico/portico.h b/keyboards/tkc/portico/portico.h
index 7add42943..71b28074d 100644
--- a/keyboards/tkc/portico/portico.h
+++ b/keyboards/tkc/portico/portico.h
@@ -18,6 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
18#pragma once 18#pragma once
19 19
20#include "quantum.h" 20#include "quantum.h"
21#ifdef RGB_BACKLIGHT_PORTICO
22#include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h"
23#include "via.h"
24#endif
21 25
22#define XXX KC_NO 26#define XXX KC_NO
23 27
diff --git a/keyboards/tkc/portico/rules.mk b/keyboards/tkc/portico/rules.mk
index 1cbcd95d6..84a65370e 100644
--- a/keyboards/tkc/portico/rules.mk
+++ b/keyboards/tkc/portico/rules.mk
@@ -20,7 +20,16 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow 20RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth 21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output 22AUDIO_ENABLE = no # Audio output
23RGB_MATRIX_ENABLE = yes # Use RGB matrix 23RGB_MATRIX_ENABLE = no
24RGB_MATRIX_DRIVER = IS31FL3731 24RGB_MATRIX_DRIVER = IS31FL3731
25CIE1931_CURVE = yes
26
27# project specific files
28SRC += keyboards/wilba_tech/wt_main.c \
29 keyboards/wilba_tech/wt_rgb_backlight.c \
30 quantum/color.c \
31 drivers/issi/is31fl3731.c
32
33QUANTUM_LIB_SRC += i2c_master.c
25 34
26LAYOUTS = 65_ansi_blocker 35LAYOUTS = 65_ansi_blocker
diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c
index 306f8186e..e57d061b2 100644
--- a/keyboards/wilba_tech/wt_rgb_backlight.c
+++ b/keyboards/wilba_tech/wt_rgb_backlight.c
@@ -30,6 +30,7 @@
30 defined(RGB_BACKLIGHT_NEBULA68) || \ 30 defined(RGB_BACKLIGHT_NEBULA68) || \
31 defined(RGB_BACKLIGHT_U80_A) || \ 31 defined(RGB_BACKLIGHT_U80_A) || \
32 defined(RGB_BACKLIGHT_DAWN60) || \ 32 defined(RGB_BACKLIGHT_DAWN60) || \
33 defined(RGB_BACKLIGHT_PORTICO) || \
33 defined(RGB_BACKLIGHT_WT60_B) || \ 34 defined(RGB_BACKLIGHT_WT60_B) || \
34 defined(RGB_BACKLIGHT_WT60_BX) || \ 35 defined(RGB_BACKLIGHT_WT60_BX) || \
35 defined(RGB_BACKLIGHT_WT60_C) || \ 36 defined(RGB_BACKLIGHT_WT60_C) || \
@@ -94,6 +95,8 @@ LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL];
94#define BACKLIGHT_LED_COUNT 108 95#define BACKLIGHT_LED_COUNT 108
95#elif defined(RGB_BACKLIGHT_DAWN60) 96#elif defined(RGB_BACKLIGHT_DAWN60)
96#define BACKLIGHT_LED_COUNT 84 //64 + 20 97#define BACKLIGHT_LED_COUNT 84 //64 + 20
98#elif defined(RGB_BACKLIGHT_PORTICO)
99#define BACKLIGHT_LED_COUNT 67 //36 + 31
97#elif defined(RGB_BACKLIGHT_NEBULA12) 100#elif defined(RGB_BACKLIGHT_NEBULA12)
98#define BACKLIGHT_LED_COUNT 16 101#define BACKLIGHT_LED_COUNT 16
99#elif defined(RGB_BACKLIGHT_M10_C) 102#elif defined(RGB_BACKLIGHT_M10_C)
@@ -613,6 +616,91 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
613 {1, C9_15, C8_15, C6_14}, //D15 616 {1, C9_15, C8_15, C6_14}, //D15
614 {1, C9_16, C7_15, C6_15} //D16 617 {1, C9_16, C7_15, C6_15} //D16
615}; 618};
619#elif defined(RGB_BACKLIGHT_PORTICO)
620// This is a 7-bit address, that gets left-shifted and bit 0
621// set to 0 for write, 1 for read (as per I2C protocol)
622#define ISSI_ADDR_1 0x74
623#define ISSI_ADDR_2 0x77
624
625const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
626/* Refer to IS31 manual for these locations
627 * driver
628 * | R location
629 * | | G location
630 * | | | B location
631 * | | | | */
632 { 0, C2_1, C3_1, C4_1 },
633 { 0, C1_1, C3_2, C4_2 },
634 { 0, C1_2, C2_2, C4_3 },
635 { 0, C1_3, C2_3, C3_3 },
636 { 0, C1_4, C2_4, C3_4 },
637 { 0, C1_5, C2_5, C3_5 },
638 { 0, C1_6, C2_6, C3_6 },
639 { 0, C1_7, C2_7, C3_7 },
640 { 0, C1_8, C2_8, C3_8 },
641 { 1, C2_1, C3_1, C4_1 },
642 { 1, C1_1, C3_2, C4_2 },
643 { 1, C1_2, C2_2, C4_3 },
644 { 1, C1_3, C2_3, C3_3 },
645 { 1, C1_4, C2_4, C3_4 },
646 { 1, C1_5, C2_5, C3_5 },
647
648 { 0, C9_1, C8_1, C7_1 },
649 { 0, C9_2, C8_2, C7_2 },
650 { 0, C9_3, C8_3, C7_3 },
651 { 0, C9_4, C8_4, C7_4 },
652 { 0, C9_5, C8_5, C7_5 },
653 { 0, C9_6, C8_6, C7_6 },
654 { 0, C9_7, C8_7, C6_6 },
655 { 0, C9_8, C7_7, C6_7 },
656 { 0, C8_8, C7_8, C6_8 },
657 { 1, C9_1, C8_1, C7_1 },
658 { 1, C9_2, C8_2, C7_2 },
659 { 1, C9_3, C8_3, C7_3 },
660 { 1, C9_4, C8_4, C7_4 },
661 { 1, C9_5, C8_5, C7_5 },
662 { 1, C9_6, C8_6, C7_6 },
663
664 { 0, C1_9, C3_10, C4_10 },
665 { 0, C1_10, C2_10, C4_11 },
666 { 0, C1_11, C2_11, C3_11 },
667 { 0, C1_12, C2_12, C3_12 },
668 { 0, C1_13, C2_13, C3_13 },
669 { 0, C1_14, C2_14, C3_14 },
670 { 0, C1_15, C2_15, C3_15 },
671 { 0, C1_16, C2_16, C3_16 },
672 { 1, C1_10, C2_10, C4_11 },
673 { 1, C1_11, C2_11, C3_11 },
674 { 1, C1_12, C2_12, C3_12 },
675 { 1, C1_13, C2_13, C3_13 },
676 { 1, C1_14, C2_14, C3_14 },
677 { 1, C9_7, C8_7, C6_6 },
678
679 { 0, C2_9, C3_9, C4_9 },
680 { 0, C9_12, C8_12, C7_12 },
681 { 0, C9_13, C8_13, C7_13 },
682 { 0, C9_14, C8_14, C7_14 },
683 { 0, C9_15, C8_15, C6_14 },
684 { 0, C9_16, C7_15, C6_15 },
685 { 1, C2_9, C3_9, C4_9 },
686 { 1, C1_9, C3_10, C4_10 },
687 { 1, C9_9, C8_9, C7_9 },
688 { 1, C9_10, C8_10, C7_10 },
689 { 1, C9_11, C8_11, C7_11 },
690 { 1, C9_14, C8_14, C7_14 },
691 { 1, C1_15, C2_15, C3_15 },
692 { 1, C1_16, C2_16, C3_16 },
693
694 { 0, C9_9, C8_9, C7_9 },
695 { 0, C9_10, C8_10, C7_10 },
696 { 0, C9_11, C8_11, C7_11 },
697 { 0, C8_16, C7_16, C6_16 },
698 { 1, C9_12, C8_12, C7_12 },
699 { 1, C9_13, C8_13, C7_13 },
700 { 1, C9_15, C8_15, C6_14 },
701 { 1, C9_16, C7_15, C6_15 },
702 { 1, C8_16, C7_16, C6_16 }
703};
616#elif defined(RGB_BACKLIGHT_M6_B) 704#elif defined(RGB_BACKLIGHT_M6_B)
617 // Driver has fixed mapping of index to the red, green and blue LEDs 705 // Driver has fixed mapping of index to the red, green and blue LEDs
618#elif defined(RGB_BACKLIGHT_M10_C) 706#elif defined(RGB_BACKLIGHT_M10_C)
@@ -776,7 +864,8 @@ const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = {
776 // LC0..LC17 864 // LC0..LC17
777 {112,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {64,60}, {44,60}, {24,64}, 865 {112,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {64,60}, {44,60}, {24,64},
778 {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {255,255}, {10,48}, {4,64}, 866 {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {255,255}, {10,48}, {4,64},
779 // LD0..LD17 867 // LD0..LD1762
868
780 {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, 869 {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48},
781 {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {160,60}, {180,64}, {208,64}, {255,255} 870 {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {160,60}, {180,64}, {208,64}, {255,255}
782}; 871};
@@ -1156,6 +1245,21 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = {
1156 //11 - 20 1245 //11 - 20
1157 {234,255}, {222,255}, {213,255}, {197,255}, {180,255}, {167,255}, {152,255}, {147,255}, {128,255}, {101,255} 1246 {234,255}, {222,255}, {213,255}, {197,255}, {180,255}, {167,255}, {152,255}, {147,255}, {128,255}, {101,255}
1158}; 1247};
1248#elif defined(RGB_BACKLIGHT_PORTICO)
1249const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = {
1250 { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 203, 0 }, { 224, 0 },
1251 { 4, 16 }, { 23, 16 }, { 38, 16 }, { 53, 16 }, { 68, 16 }, { 83, 16 }, { 98, 16 }, { 113, 16 }, { 128, 16 }, { 143, 16 }, { 158, 16 }, { 173, 16 }, { 188, 16 }, { 206, 16 }, { 224, 16 },
1252 { 6, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 201, 32 }, { 224, 32 },
1253 { 9, 48 }, { 34, 48 }, { 49, 48 }, { 64, 48 }, { 79, 48 }, { 94, 48 }, { 109, 48 }, { 124, 48 }, { 139, 48 }, { 154, 48 }, { 169, 48 }, { 189, 48 }, { 210, 48 }, { 224, 48 },
1254 { 2, 64 }, { 21, 64 }, { 39, 64 }, { 96, 64 }, { 152, 64 }, { 171, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 },
1255};
1256const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = {
1257 { 138, 240 }, { 140, 210 }, { 142, 181 }, { 145, 153 }, { 149, 126 }, { 156, 101 }, { 166, 80 }, { 182, 67 }, { 200, 68 }, { 216, 81 }, { 226, 102 }, { 232, 128 }, { 236, 155 }, { 240, 199 }, { 243, 240 }, //Done through here TM 052421 143PM
1258 { 133, 225 }, { 134, 186 }, { 136, 156 }, { 138, 126 }, { 141, 96 }, { 147, 68 }, { 161, 44 }, { 193, 33 }, { 222, 47 }, { 235, 72 }, { 240, 100 }, { 244, 130 }, { 246, 160 }, { 247, 196 }, { 248, 233 }, //Done through here TM 052421 235PM
1259 { 127, 218 }, { 127, 177 }, { 127, 146 }, { 127, 115 }, { 127, 84 }, { 127, 54 }, { 127, 23 }, { 0, 8 }, { 0, 39 }, { 0, 70 }, { 0, 101 }, { 0, 132 }, { 0, 183 }, { 0, 231 },
1260 { 121, 215 }, { 119, 164 }, { 117, 134 }, { 114, 104 }, { 109, 76 }, { 98, 50 }, { 71, 34 }, { 37, 41 }, { 22, 65 }, { 15, 93 }, { 11, 122 }, { 8, 162 }, { 7, 205 }, { 6, 233 },
1261 { 116, 236 }, { 113, 199 }, { 110, 164 }, { 82, 74 }, { 27, 106 }, { 20, 138 }, { 15, 183 }, { 13, 212 }, { 11, 240 }
1262};
1159#elif defined(RGB_BACKLIGHT_M50_A) 1263#elif defined(RGB_BACKLIGHT_M50_A)
1160const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { 1264const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = {
1161 // LA0..LA17 1265 // LA0..LA17
@@ -1198,7 +1302,7 @@ void map_led_to_point( uint8_t index, Point *point )
1198 point->x = pgm_read_byte(addr); 1302 point->x = pgm_read_byte(addr);
1199 point->y = pgm_read_byte(addr+1); 1303 point->y = pgm_read_byte(addr+1);
1200 1304
1201#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || \ 1305#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_PORTICO) || \
1202 defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NEBULA12) || defined(RGB_BACKLIGHT_KW_MEGA) 1306 defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NEBULA12) || defined(RGB_BACKLIGHT_KW_MEGA)
1203 return; 1307 return;
1204#endif 1308#endif
@@ -1474,6 +1578,14 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
1474 { 31+15, 31+5 , 31+4 , 31+3 , 31+2 , 31+1 , 47+9 , 47+10, 47+11, 47+12, 255 ,47+6 , 47+7 , 15+16}, 1578 { 31+15, 31+5 , 31+4 , 31+3 , 31+2 , 31+1 , 47+9 , 47+10, 47+11, 47+12, 255 ,47+6 , 47+7 , 15+16},
1475 { 31+16, 31+8 , 31+7 , 255 , 255 , 31+6 , 255 , 255 , 255 , 47+13, 47+14, 47+15, 47+16, 47+8 } 1579 { 31+16, 31+8 , 31+7 , 255 , 255 , 31+6 , 255 , 255 , 255 , 47+13, 47+14, 47+15, 47+16, 47+8 }
1476}; 1580};
1581#elif defined(RGB_BACKLIGHT_PORTICO)
1582const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
1583 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
1584 { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
1585 { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 255, 43 },
1586 { 44, 255, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
1587 { 58, 59, 60, 255, 255, 255, 61, 255, 255, 255, 62, 63, 64, 65, 66 }
1588};
1477#elif defined(RGB_BACKLIGHT_M50_A) 1589#elif defined(RGB_BACKLIGHT_M50_A)
1478// LA15, LA14, LA13, LA12, LA11, LA10, LA9, LB1, LB2, LB3, LB4, LB5, LB6 1590// LA15, LA14, LA13, LA12, LA11, LA10, LA9, LB1, LB2, LB3, LB4, LB5, LB6
1479// LA16, LA6, LA5, LA4, LA3, LA2, LA1, LB9, LB10, LB11, LB12, LB13, LB14 1591// LA16, LA6, LA5, LA4, LA3, LA2, LA1, LB9, LB10, LB11, LB12, LB13, LB14
@@ -1546,6 +1658,8 @@ void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
1546 IS31FL3218_set_color( index, red, green, blue ); 1658 IS31FL3218_set_color( index, red, green, blue );
1547#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_KW_MEGA) 1659#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_KW_MEGA)
1548 IS31FL3733_set_color( index, red, green, blue ); 1660 IS31FL3733_set_color( index, red, green, blue );
1661#elif defined (RGB_BACKLIGHT_PORTICO)
1662 IS31FL3731_set_color( index, red, green, blue );
1549#elif defined(RGB_BACKLIGHT_NK87) 1663#elif defined(RGB_BACKLIGHT_NK87)
1550 // This is done to avoid indicator LEDs being set 1664 // This is done to avoid indicator LEDs being set
1551 if (( index != 63+64-1 ) && ( index != 48+64-1 )) { 1665 if (( index != 63+64-1 ) && ( index != 48+64-1 )) {
@@ -1574,6 +1688,11 @@ void backlight_set_color_all( uint8_t red, uint8_t green, uint8_t blue )
1574 for (int i = 0; i < BACKLIGHT_LED_COUNT; i++) { 1688 for (int i = 0; i < BACKLIGHT_LED_COUNT; i++) {
1575 IS31FL3733_set_color(i, red, green, blue); 1689 IS31FL3733_set_color(i, red, green, blue);
1576 } 1690 }
1691#elif defined (RGB_BACKLIGHT_PORTICO)
1692 // This is done to avoid indicator LEDs being set
1693 for (int i = 0; i < BACKLIGHT_LED_COUNT; i++) {
1694 IS31FL3731_set_color(i, red, green, blue);
1695 }
1577#elif defined(RGB_BACKLIGHT_NK87) 1696#elif defined(RGB_BACKLIGHT_NK87)
1578 // This is done to avoid indicator LEDs being set 1697 // This is done to avoid indicator LEDs being set
1579 for (int i = 0; i < BACKLIGHT_LED_COUNT; i++) { 1698 for (int i = 0; i < BACKLIGHT_LED_COUNT; i++) {
@@ -1639,6 +1758,7 @@ void backlight_timer_disable(void)
1639{ 1758{
1640 TIMSK3 &= ~_BV(OCIE3A); 1759 TIMSK3 &= ~_BV(OCIE3A);
1641} 1760}
1761
1642#elif defined(RGB_BACKLIGHT_NEBULA12) //STM32, use GPT with TIM3. Enable in halconf.h 1762#elif defined(RGB_BACKLIGHT_NEBULA12) //STM32, use GPT with TIM3. Enable in halconf.h
1643static void gpt_backlight_timer_task(GPTDriver *gptp); 1763static void gpt_backlight_timer_task(GPTDriver *gptp);
1644// Timer setup at 200Khz, callback at 10k ticks = 20Hz 1764// Timer setup at 200Khz, callback at 10k ticks = 20Hz
@@ -1661,6 +1781,7 @@ void backlight_timer_disable(void)
1661{ 1781{
1662 gptStopTimer(&GPTD3); 1782 gptStopTimer(&GPTD3);
1663} 1783}
1784
1664#else //STM32, use GPT with TIM4. Enable in halconf.h 1785#else //STM32, use GPT with TIM4. Enable in halconf.h
1665static void gpt_backlight_timer_task(GPTDriver *gptp); 1786static void gpt_backlight_timer_task(GPTDriver *gptp);
1666// Timer setup at 200Khz, callback at 10k ticks = 20Hz 1787// Timer setup at 200Khz, callback at 10k ticks = 20Hz
@@ -2851,6 +2972,8 @@ void backlight_init_drivers(void)
2851 ( index == 54+17 ) ); 2972 ( index == 54+17 ) );
2852#elif defined(RGB_BACKLIGHT_M10_C) 2973#elif defined(RGB_BACKLIGHT_M10_C)
2853 bool enabled = true; 2974 bool enabled = true;
2975#elif defined(RGB_BACKLIGHT_PORTICO)
2976 bool enabled = true;
2854#endif 2977#endif
2855 // This only caches it for later 2978 // This only caches it for later
2856 IS31FL3731_set_led_control_register( index, enabled, enabled, enabled ); 2979 IS31FL3731_set_led_control_register( index, enabled, enabled, enabled );
@@ -3121,5 +3244,3 @@ void backlight_debug_led( bool state )
3121 } 3244 }
3122} 3245}
3123#endif // defined(RGB_DEBUGGING_ONLY) 3246#endif // defined(RGB_DEBUGGING_ONLY)
3124
3125