diff --git a/keyboards/system76/launch_beta_1/config.h b/keyboards/system76/launch_beta_1/config.h index a7dc902bb76..25387774123 100644 --- a/keyboards/system76/launch_beta_1/config.h +++ b/keyboards/system76/launch_beta_1/config.h @@ -28,6 +28,7 @@ #define RGB_DI_PIN E2 #define RGBLED_NUM 84 +#define DRIVER_LED_TOTAL RGBLED_NUM #define RGBLIGHT_ANIMATIONS // Limit brightness to support USB-A at 0.5A //TODO: do this dynamically based on power source diff --git a/keyboards/system76/launch_beta_1/launch_beta_1.c b/keyboards/system76/launch_beta_1/launch_beta_1.c index fef5a6abe25..51f2999cc07 100644 --- a/keyboards/system76/launch_beta_1/launch_beta_1.c +++ b/keyboards/system76/launch_beta_1/launch_beta_1.c @@ -4,6 +4,51 @@ #include "launch_beta_1.h" #include "usb_mux.h" +// LEDs by index +// 0 1 2 3 4 5 6 7 8 9 +// 00 LM4 LL4 LK4 LJ4 LI4 LH4 LG4 LF4 LE4 LD4 +// 10 LC4 LB4 LA4 LA5 LB5 LC5 LD5 LE5 LG5 LH5 +// 20 LI5 LJ5 LK5 LL5 LM5 LO3 LM3 LL3 LK3 LJ3 +// 30 LI3 LH3 LG3 LF3 LE3 LD3 LC3 LB3 LA3 LA2 +// 40 LB2 LC2 LD2 LE2 LF2 LG2 LH2 LI2 LJ2 LK2 +// 50 LL2 LM2 LN2 LO2 LO1 LN1 LM1 LL1 LK1 LJ1 +// 60 LI1 LH1 LG1 LF1 LE1 LD1 LC1 LB1 LA1 LA0 +// 70 LB0 LC0 LD0 LE0 LF0 LG0 LH0 LI0 LJ0 LK0 +// 80 LL0 LM0 LN0 LO0 +led_config_t g_led_config = { LAYOUT( + // Key matrix to LED index + /* A B C D E F G H I J K L M N O */ +/* 0 */ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, +/* 1 */ 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, +/* 2 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, +/* 3 */ 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, +/* 4 */ 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, +/* 5 */ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 +), { + // LED index to physical position (this is a pain, see qmk.sh in launch repo) +/* 00 */ {209, 51}, {190, 51}, {171, 51}, {156, 51}, {140, 51}, {125, 51}, {110, 51}, {95, 51}, {80, 51}, {65, 51}, +/* 10 */ {49, 51}, {34, 51}, {11, 51}, {8, 64}, {27, 64}, {42, 64}, {57, 64}, {80, 64}, {110, 64}, {133, 64}, +/* 20 */ {148, 64}, {167, 64}, {194, 64}, {209, 64}, {224, 64}, {224, 38}, {197, 38}, {178, 38}, {163, 38}, {148, 38}, +/* 30 */ {133, 38}, {118, 38}, {103, 38}, {87, 38}, {72, 38}, {57, 38}, {42, 38}, {27, 38}, {8, 38}, {4, 26}, +/* 40 */ {23, 26}, {38, 26}, {53, 26}, {68, 26}, {84, 26}, {99, 26}, {114, 26}, {129, 26}, {144, 26}, {159, 26}, +/* 50 */ {175, 26}, {190, 26}, {205, 26}, {224, 26}, {224, 13}, {201, 13}, {182, 13}, {167, 13}, {152, 13}, {137, 13}, +/* 60 */ {121, 13}, {106, 13}, {91, 13}, {76, 13}, {61, 13}, {46, 13}, {30, 13}, {15, 13}, {0, 13}, {0, 0}, +/* 70 */ {15, 0}, {30, 0}, {46, 0}, {61, 0}, {76, 0}, {91, 0}, {106, 0}, {121, 0}, {137, 0}, {152, 0}, +/* 80 */ {167, 0}, {182, 0}, {201, 0}, {224, 0} +}, { + // LED index to flags (not really used) + /* 0 1 2 3 4 5 6 7 8 9 */ +/* 00 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +/* 10 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +/* 20 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +/* 30 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +/* 40 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +/* 50 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +/* 60 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +/* 70 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +/* 80 */ 0, 0, 0, 0 +} }; + bool eeprom_is_valid(void) { return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); diff --git a/keyboards/system76/launch_beta_1/rules.mk b/keyboards/system76/launch_beta_1/rules.mk index fe4a1ac9f7b..7b492cfaaf5 100644 --- a/keyboards/system76/launch_beta_1/rules.mk +++ b/keyboards/system76/launch_beta_1/rules.mk @@ -29,6 +29,7 @@ DYNAMIC_KEYMAP_ENABLE = yes # Reconfigurable keyboard without flashing firmware NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RAW_ENABLE = yes # Enable RAW HID commands (used by keyboard configurator) RGBLIGHT_ENABLE = yes # Support for RGB backlight +RGB_MATRIX_ENABLE = WS2812 # Support for RGB matrix # Add System76 EC command interface SRC+=system76_ec.c