Fixed Side LED and Logo LEDs for GMMK3 ANSI

This commit is contained in:
James Guillochon 2025-07-04 17:14:14 -07:00
parent e0f1d087eb
commit ca905c988c
4 changed files with 51 additions and 25 deletions

View File

@ -17,6 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
#define __ NO_LED
/* Refer to AW20216S manual for these locations
* driver
@ -144,26 +145,22 @@ const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = {
{1, SW7_CS13, SW7_CS14, SW7_CS15}, // 110 SLED7
{1, SW8_CS13, SW8_CS14, SW8_CS15}, // 111 SLED8
{1, SW9_CS13, SW9_CS14, SW9_CS15}, // 112 SLED9
{1, SW10_CS13, SW10_CS14, SW10_CS15}, // 113 SLED10
{1, SW1_CS16, SW1_CS17, SW1_CS18}, // 114 SLED11
{1, SW2_CS16, SW2_CS17, SW2_CS18}, // 115 SLED12
{1, SW3_CS16, SW3_CS17, SW3_CS18}, // 116 SLED13
{1, SW4_CS16, SW4_CS17, SW4_CS18}, // 117 SLED14
{1, SW5_CS16, SW5_CS17, SW5_CS18}, // 118 SLED15
{1, SW6_CS16, SW6_CS17, SW6_CS18}, // 119 SLED16
{1, SW7_CS16, SW7_CS17, SW7_CS18}, // 120 SLED17
{1, SW8_CS16, SW8_CS17, SW8_CS18}, // 121 SLED18
{1, SW9_CS16, SW9_CS17, SW9_CS18}, // 122 SLED19
{1, SW10_CS16, SW10_CS17, SW10_CS18}, // 123 SLED20
{1, SW1_CS16, SW1_CS17, SW1_CS18}, // 113 SLED11
{1, SW2_CS16, SW2_CS17, SW2_CS18}, // 114 SLED12
{1, SW3_CS16, SW3_CS17, SW3_CS18}, // 115 SLED13
{1, SW4_CS16, SW4_CS17, SW4_CS18}, // 116 SLED14
{1, SW5_CS16, SW5_CS17, SW5_CS18}, // 117 SLED15
{1, SW6_CS16, SW6_CS17, SW6_CS18}, // 118 SLED16
{1, SW7_CS16, SW7_CS17, SW7_CS18}, // 119 SLED17
{1, SW8_CS16, SW8_CS17, SW8_CS18}, // 120 SLED18
{1, SW9_CS16, SW9_CS17, SW9_CS18}, // 121 SLED19
{1, SW10_CS1, SW10_CS2, SW10_CS3}, // 124 LOGO
{1, SW10_CS1, SW10_CS2, SW10_CS3}, // 122 LOGO
};
#define __ NO_LED
led_config_t g_led_config = {
{
{
{ 74, __, 31, 99, 98, 101, 91, 5 },
{ 38, 37, 59, 0, 75, 32, 16, 17},
{ 39, 58, 60, __, 76, 53, 1, 18},
@ -178,6 +175,9 @@ led_config_t g_led_config = {
{ 54, 71, 87, 57, 33, __, __, __},
{ 55, 72, 88, 102, 34, __, 52, __},
{ 56, 73, 89, 103, 35, 36, 90, __},
{ 104, 105, 106, 107, 108, 109, 110, 111},
{ 112, 113, 114, 115, 116, 117, 118, 119},
{ 120, 121, 122, __, __, __, __, __},
},
{
{0,0}, {21,0}, {31,0}, {42,0}, {52,0}, {68,0}, {78,0}, {89,0}, {99,0}, {115,0}, {125,0}, {136,0}, {146,0}, {159,0}, {169,0}, {180,0},
@ -187,8 +187,8 @@ led_config_t g_led_config = {
{7,52}, {23,52}, {34,52}, {44,52}, {55,52}, {65,52}, {76,52}, {86,52}, {96,52}, {107,52}, {117,52}, {137,52}, {169,52}, {193,52}, {203,52}, {214,52}, {224,58},
{1,64}, {14,64}, {27,64}, {66,64}, {105,64}, {118,64}, {131,64}, {145,64}, {159,64}, {169,64}, {180,64}, {198,64}, {214,64},
// Left and right side lights
{0, 15}, {0, 20}, {0, 25}, {0, 30}, {0, 35}, {0, 40}, {0, 45}, {0, 50}, {0, 55}, {0, 60},
{224, 15}, {224, 20}, {224, 25}, {224, 30}, {224, 35}, {224, 40}, {224, 45}, {224, 50}, {224, 55}, {224, 60},
{0, 15}, {0, 20}, {0, 25}, {0, 30}, {0, 35}, {0, 40}, {0, 45}, {0, 50}, {0, 55},
{224, 15}, {224, 20}, {224, 25}, {224, 30}, {224, 35}, {224, 40}, {224, 45}, {224, 50}, {224, 55},
// logo
{214, 0},
},
@ -201,8 +201,8 @@ led_config_t g_led_config = {
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
// Left and right side lights
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2,
// Logo
8,
}
@ -219,9 +219,9 @@ void spi_init(void) {
is_initialised = true;
// Try releasing special pins for a short time
gpio_set_pin_input(SPI_SCK_PIN);
gpio_set_pin_input(SPI_MOSI_PIN);
gpio_set_pin_input(SPI_MISO_PIN);
setPinInput(SPI_SCK_PIN);
setPinInput(SPI_MOSI_PIN);
setPinInput(SPI_MISO_PIN);
chThdSleepMilliseconds(10);

View File

@ -18,7 +18,7 @@
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "C1", "C2", "C3"],
"rows": ["B0", "B1", "B2", "B3", "B4", "B5", "C14", "C15", "B8", "B9", "B10", "C8", "C9", "A15"]
"rows": ["B0", "B1", "B2", "B3", "B4", "B5", "C14", "C15", "B8", "B9", "B10", "C8", "C9", "A15", "C4", "C5", "C6"]
},
"diode_direction": "COL2ROW",
"eeprom": {

View File

@ -172,7 +172,7 @@
}
],
"matrix": {
"rows": 14,
"rows": 17,
"cols": 8
},
"layouts": {
@ -427,6 +427,31 @@
},
"12,3\nl102",
"13,3\nl103"
],
[
"14,0\nl104",
"14,1\nl105",
"14,2\nl106",
"14,3\nl107",
"14,4\nl108",
"14,5\nl109",
"14,6\nl110",
"14,7\nl111"
],
[
"15,0\nl112",
"15,2\nl113",
"15,3\nl114",
"15,4\nl115",
"15,5\nl116",
"15,6\nl117",
"15,7\nl118"
],
[
"16,0\nl119",
"16,1\nl120",
"16,2\nl121",
"16,3\nl122"
]
]
}

View File

@ -35,7 +35,8 @@
#define AW20216S_EN_PIN C13
#define DRIVER_1_LED_TOTAL (67)
#define DRIVER_2_LED_TOTAL (59)
#define DRIVER_2_LED_TOTAL (56)
#define MATRIX_ROWS 17
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
#define DIP_SWITCH_PINS { A13 }