diff options
| -rw-r--r-- | quantum/rgb_matrix.c | 48 | ||||
| -rw-r--r-- | quantum/rgb_matrix.h | 39 | ||||
| -rw-r--r-- | tmk_core/common/eeconfig.c | 3 | ||||
| -rw-r--r-- | tmk_core/common/eeconfig.h | 6 | ||||
| -rw-r--r-- | users/xulkal/process_records.c | 4 |
5 files changed, 35 insertions, 65 deletions
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index d20daf5e4..f170cfc1b 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c | |||
| @@ -66,10 +66,6 @@ | |||
| 66 | #define RGB_DISABLE_WHEN_USB_SUSPENDED false | 66 | #define RGB_DISABLE_WHEN_USB_SUSPENDED false |
| 67 | #endif | 67 | #endif |
| 68 | 68 | ||
| 69 | #ifndef EECONFIG_RGB_MATRIX | ||
| 70 | #define EECONFIG_RGB_MATRIX EECONFIG_RGBLIGHT | ||
| 71 | #endif | ||
| 72 | |||
| 73 | #if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX | 69 | #if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX |
| 74 | #undef RGB_MATRIX_MAXIMUM_BRIGHTNESS | 70 | #undef RGB_MATRIX_MAXIMUM_BRIGHTNESS |
| 75 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX | 71 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX |
| @@ -116,12 +112,12 @@ uint8_t rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}}; | |||
| 116 | static last_hit_t last_hit_buffer; | 112 | static last_hit_t last_hit_buffer; |
| 117 | #endif // RGB_MATRIX_KEYREACTIVE_ENABLED | 113 | #endif // RGB_MATRIX_KEYREACTIVE_ENABLED |
| 118 | 114 | ||
| 119 | uint32_t eeconfig_read_rgb_matrix(void) { | 115 | void eeconfig_read_rgb_matrix(void) { |
| 120 | return eeprom_read_dword(EECONFIG_RGB_MATRIX); | 116 | eeprom_read_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); |
| 121 | } | 117 | } |
| 122 | 118 | ||
| 123 | void eeconfig_update_rgb_matrix(uint32_t val) { | 119 | void eeconfig_update_rgb_matrix(void) { |
| 124 | eeprom_update_dword(EECONFIG_RGB_MATRIX, val); | 120 | eeprom_update_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); |
| 125 | } | 121 | } |
| 126 | 122 | ||
| 127 | void eeconfig_update_rgb_matrix_default(void) { | 123 | void eeconfig_update_rgb_matrix_default(void) { |
| @@ -130,7 +126,7 @@ void eeconfig_update_rgb_matrix_default(void) { | |||
| 130 | rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE; | 126 | rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE; |
| 131 | rgb_matrix_config.hsv = (HSV){ 0, UINT8_MAX, RGB_MATRIX_MAXIMUM_BRIGHTNESS }; | 127 | rgb_matrix_config.hsv = (HSV){ 0, UINT8_MAX, RGB_MATRIX_MAXIMUM_BRIGHTNESS }; |
| 132 | rgb_matrix_config.speed = UINT8_MAX / 2; | 128 | rgb_matrix_config.speed = UINT8_MAX / 2; |
| 133 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 129 | eeconfig_update_rgb_matrix(); |
| 134 | } | 130 | } |
| 135 | 131 | ||
| 136 | void eeconfig_debug_rgb_matrix(void) { | 132 | void eeconfig_debug_rgb_matrix(void) { |
| @@ -431,12 +427,10 @@ void rgb_matrix_init(void) { | |||
| 431 | eeconfig_update_rgb_matrix_default(); | 427 | eeconfig_update_rgb_matrix_default(); |
| 432 | } | 428 | } |
| 433 | 429 | ||
| 434 | rgb_matrix_config.raw = eeconfig_read_rgb_matrix(); | 430 | eeconfig_read_rgb_matrix(); |
| 435 | rgb_matrix_config.speed = UINT8_MAX / 2; //EECONFIG needs to be increased to support this | ||
| 436 | if (!rgb_matrix_config.mode) { | 431 | if (!rgb_matrix_config.mode) { |
| 437 | dprintf("rgb_matrix_init_drivers rgb_matrix_config.mode = 0. Write default values to EEPROM.\n"); | 432 | dprintf("rgb_matrix_init_drivers rgb_matrix_config.mode = 0. Write default values to EEPROM.\n"); |
| 438 | eeconfig_update_rgb_matrix_default(); | 433 | eeconfig_update_rgb_matrix_default(); |
| 439 | rgb_matrix_config.raw = eeconfig_read_rgb_matrix(); | ||
| 440 | } | 434 | } |
| 441 | eeconfig_debug_rgb_matrix(); // display current eeprom values | 435 | eeconfig_debug_rgb_matrix(); // display current eeprom values |
| 442 | } | 436 | } |
| @@ -448,12 +442,12 @@ void rgb_matrix_set_suspend_state(bool state) { | |||
| 448 | void rgb_matrix_toggle(void) { | 442 | void rgb_matrix_toggle(void) { |
| 449 | rgb_matrix_config.enable ^= 1; | 443 | rgb_matrix_config.enable ^= 1; |
| 450 | rgb_task_state = STARTING; | 444 | rgb_task_state = STARTING; |
| 451 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 445 | eeconfig_update_rgb_matrix(); |
| 452 | } | 446 | } |
| 453 | 447 | ||
| 454 | void rgb_matrix_enable(void) { | 448 | void rgb_matrix_enable(void) { |
| 455 | rgb_matrix_enable_noeeprom(); | 449 | rgb_matrix_enable_noeeprom(); |
| 456 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 450 | eeconfig_update_rgb_matrix(); |
| 457 | } | 451 | } |
| 458 | 452 | ||
| 459 | void rgb_matrix_enable_noeeprom(void) { | 453 | void rgb_matrix_enable_noeeprom(void) { |
| @@ -464,7 +458,7 @@ void rgb_matrix_enable_noeeprom(void) { | |||
| 464 | 458 | ||
| 465 | void rgb_matrix_disable(void) { | 459 | void rgb_matrix_disable(void) { |
| 466 | rgb_matrix_disable_noeeprom(); | 460 | rgb_matrix_disable_noeeprom(); |
| 467 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 461 | eeconfig_update_rgb_matrix(); |
| 468 | } | 462 | } |
| 469 | 463 | ||
| 470 | void rgb_matrix_disable_noeeprom(void) { | 464 | void rgb_matrix_disable_noeeprom(void) { |
| @@ -478,7 +472,7 @@ void rgb_matrix_step(void) { | |||
| 478 | if (rgb_matrix_config.mode >= RGB_MATRIX_EFFECT_MAX) | 472 | if (rgb_matrix_config.mode >= RGB_MATRIX_EFFECT_MAX) |
| 479 | rgb_matrix_config.mode = 1; | 473 | rgb_matrix_config.mode = 1; |
| 480 | rgb_task_state = STARTING; | 474 | rgb_task_state = STARTING; |
| 481 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 475 | eeconfig_update_rgb_matrix(); |
| 482 | } | 476 | } |
| 483 | 477 | ||
| 484 | void rgb_matrix_step_reverse(void) { | 478 | void rgb_matrix_step_reverse(void) { |
| @@ -486,49 +480,49 @@ void rgb_matrix_step_reverse(void) { | |||
| 486 | if (rgb_matrix_config.mode < 1) | 480 | if (rgb_matrix_config.mode < 1) |
| 487 | rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1; | 481 | rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1; |
| 488 | rgb_task_state = STARTING; | 482 | rgb_task_state = STARTING; |
| 489 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 483 | eeconfig_update_rgb_matrix(); |
| 490 | } | 484 | } |
| 491 | 485 | ||
| 492 | void rgb_matrix_increase_hue(void) { | 486 | void rgb_matrix_increase_hue(void) { |
| 493 | rgb_matrix_config.hsv.h += RGB_MATRIX_HUE_STEP; | 487 | rgb_matrix_config.hsv.h += RGB_MATRIX_HUE_STEP; |
| 494 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 488 | eeconfig_update_rgb_matrix(); |
| 495 | } | 489 | } |
| 496 | 490 | ||
| 497 | void rgb_matrix_decrease_hue(void) { | 491 | void rgb_matrix_decrease_hue(void) { |
| 498 | rgb_matrix_config.hsv.h -= RGB_MATRIX_HUE_STEP; | 492 | rgb_matrix_config.hsv.h -= RGB_MATRIX_HUE_STEP; |
| 499 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 493 | eeconfig_update_rgb_matrix(); |
| 500 | } | 494 | } |
| 501 | 495 | ||
| 502 | void rgb_matrix_increase_sat(void) { | 496 | void rgb_matrix_increase_sat(void) { |
| 503 | rgb_matrix_config.hsv.s = qadd8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP); | 497 | rgb_matrix_config.hsv.s = qadd8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP); |
| 504 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 498 | eeconfig_update_rgb_matrix(); |
| 505 | } | 499 | } |
| 506 | 500 | ||
| 507 | void rgb_matrix_decrease_sat(void) { | 501 | void rgb_matrix_decrease_sat(void) { |
| 508 | rgb_matrix_config.hsv.s = qsub8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP); | 502 | rgb_matrix_config.hsv.s = qsub8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP); |
| 509 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 503 | eeconfig_update_rgb_matrix(); |
| 510 | } | 504 | } |
| 511 | 505 | ||
| 512 | void rgb_matrix_increase_val(void) { | 506 | void rgb_matrix_increase_val(void) { |
| 513 | rgb_matrix_config.hsv.v = qadd8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP); | 507 | rgb_matrix_config.hsv.v = qadd8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP); |
| 514 | if (rgb_matrix_config.hsv.v > RGB_MATRIX_MAXIMUM_BRIGHTNESS) | 508 | if (rgb_matrix_config.hsv.v > RGB_MATRIX_MAXIMUM_BRIGHTNESS) |
| 515 | rgb_matrix_config.hsv.v = RGB_MATRIX_MAXIMUM_BRIGHTNESS; | 509 | rgb_matrix_config.hsv.v = RGB_MATRIX_MAXIMUM_BRIGHTNESS; |
| 516 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 510 | eeconfig_update_rgb_matrix(); |
| 517 | } | 511 | } |
| 518 | 512 | ||
| 519 | void rgb_matrix_decrease_val(void) { | 513 | void rgb_matrix_decrease_val(void) { |
| 520 | rgb_matrix_config.hsv.v = qsub8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP); | 514 | rgb_matrix_config.hsv.v = qsub8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP); |
| 521 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 515 | eeconfig_update_rgb_matrix(); |
| 522 | } | 516 | } |
| 523 | 517 | ||
| 524 | void rgb_matrix_increase_speed(void) { | 518 | void rgb_matrix_increase_speed(void) { |
| 525 | rgb_matrix_config.speed = qadd8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP); | 519 | rgb_matrix_config.speed = qadd8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP); |
| 526 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this | 520 | eeconfig_update_rgb_matrix(); |
| 527 | } | 521 | } |
| 528 | 522 | ||
| 529 | void rgb_matrix_decrease_speed(void) { | 523 | void rgb_matrix_decrease_speed(void) { |
| 530 | rgb_matrix_config.speed = qsub8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP); | 524 | rgb_matrix_config.speed = qsub8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP); |
| 531 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this | 525 | eeconfig_update_rgb_matrix(); |
| 532 | } | 526 | } |
| 533 | 527 | ||
| 534 | led_flags_t rgb_matrix_get_flags(void) { | 528 | led_flags_t rgb_matrix_get_flags(void) { |
| @@ -542,7 +536,7 @@ void rgb_matrix_set_flags(led_flags_t flags) { | |||
| 542 | void rgb_matrix_mode(uint8_t mode) { | 536 | void rgb_matrix_mode(uint8_t mode) { |
| 543 | rgb_matrix_config.mode = mode; | 537 | rgb_matrix_config.mode = mode; |
| 544 | rgb_task_state = STARTING; | 538 | rgb_task_state = STARTING; |
| 545 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 539 | eeconfig_update_rgb_matrix(); |
| 546 | } | 540 | } |
| 547 | 541 | ||
| 548 | void rgb_matrix_mode_noeeprom(uint8_t mode) { | 542 | void rgb_matrix_mode_noeeprom(uint8_t mode) { |
| @@ -555,7 +549,7 @@ uint8_t rgb_matrix_get_mode(void) { | |||
| 555 | 549 | ||
| 556 | void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { | 550 | void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { |
| 557 | rgb_matrix_sethsv_noeeprom(hue, sat, val); | 551 | rgb_matrix_sethsv_noeeprom(hue, sat, val); |
| 558 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 552 | eeconfig_update_rgb_matrix(); |
| 559 | } | 553 | } |
| 560 | 554 | ||
| 561 | void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { | 555 | void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { |
diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index 96a8b7662..749926822 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h | |||
| @@ -56,12 +56,6 @@ | |||
| 56 | 56 | ||
| 57 | #define RGB_MATRIX_TEST_LED_FLAGS() if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) continue | 57 | #define RGB_MATRIX_TEST_LED_FLAGS() if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) continue |
| 58 | 58 | ||
| 59 | typedef struct | ||
| 60 | { | ||
| 61 | HSV color; | ||
| 62 | uint8_t index; | ||
| 63 | } rgb_indicator; | ||
| 64 | |||
| 65 | enum rgb_matrix_effects { | 59 | enum rgb_matrix_effects { |
| 66 | RGB_MATRIX_NONE = 0, | 60 | RGB_MATRIX_NONE = 0, |
| 67 | 61 | ||
| @@ -87,11 +81,18 @@ enum rgb_matrix_effects { | |||
| 87 | RGB_MATRIX_EFFECT_MAX | 81 | RGB_MATRIX_EFFECT_MAX |
| 88 | }; | 82 | }; |
| 89 | 83 | ||
| 84 | void eeconfig_update_rgb_matrix_default(void); | ||
| 85 | |||
| 86 | uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i); | ||
| 90 | uint8_t rgb_matrix_map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led_i); | 87 | uint8_t rgb_matrix_map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led_i); |
| 91 | 88 | ||
| 92 | void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ); | 89 | void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ); |
| 93 | void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); | 90 | void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); |
| 94 | 91 | ||
| 92 | bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record); | ||
| 93 | |||
| 94 | void rgb_matrix_task(void); | ||
| 95 | |||
| 95 | // This runs after another backlight effect and replaces | 96 | // This runs after another backlight effect and replaces |
| 96 | // colors already set | 97 | // colors already set |
| 97 | void rgb_matrix_indicators(void); | 98 | void rgb_matrix_indicators(void); |
| @@ -99,37 +100,14 @@ void rgb_matrix_indicators_kb(void); | |||
| 99 | void rgb_matrix_indicators_user(void); | 100 | void rgb_matrix_indicators_user(void); |
| 100 | 101 | ||
| 101 | void rgb_matrix_init(void); | 102 | void rgb_matrix_init(void); |
| 102 | void rgb_matrix_setup_drivers(void); | ||
| 103 | 103 | ||
| 104 | void rgb_matrix_set_suspend_state(bool state); | 104 | void rgb_matrix_set_suspend_state(bool state); |
| 105 | void rgb_matrix_set_indicator_state(uint8_t state); | ||
| 106 | |||
| 107 | |||
| 108 | void rgb_matrix_task(void); | ||
| 109 | |||
| 110 | // This should not be called from an interrupt | ||
| 111 | // (eg. from a timer interrupt). | ||
| 112 | // Call this while idle (in between matrix scans). | ||
| 113 | // If the buffer is dirty, it will update the driver with the buffer. | ||
| 114 | void rgb_matrix_update_pwm_buffers(void); | ||
| 115 | |||
| 116 | bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record); | ||
| 117 | |||
| 118 | void rgb_matrix_increase(void); | ||
| 119 | void rgb_matrix_decrease(void); | ||
| 120 | |||
| 121 | // void *backlight_get_key_color_eeprom_address(uint8_t led); | ||
| 122 | // void backlight_get_key_color( uint8_t led, HSV *hsv ); | ||
| 123 | // void backlight_set_key_color( uint8_t row, uint8_t column, HSV hsv ); | ||
| 124 | |||
| 125 | void rgb_matrix_toggle(void); | 105 | void rgb_matrix_toggle(void); |
| 126 | void rgb_matrix_enable(void); | 106 | void rgb_matrix_enable(void); |
| 127 | void rgb_matrix_enable_noeeprom(void); | 107 | void rgb_matrix_enable_noeeprom(void); |
| 128 | void rgb_matrix_disable(void); | 108 | void rgb_matrix_disable(void); |
| 129 | void rgb_matrix_disable_noeeprom(void); | 109 | void rgb_matrix_disable_noeeprom(void); |
| 130 | void rgb_matrix_step(void); | 110 | void rgb_matrix_step(void); |
| 131 | void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val); | ||
| 132 | void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); | ||
| 133 | void rgb_matrix_step_reverse(void); | 111 | void rgb_matrix_step_reverse(void); |
| 134 | void rgb_matrix_increase_hue(void); | 112 | void rgb_matrix_increase_hue(void); |
| 135 | void rgb_matrix_decrease_hue(void); | 113 | void rgb_matrix_decrease_hue(void); |
| @@ -144,6 +122,8 @@ void rgb_matrix_set_flags(led_flags_t flags); | |||
| 144 | void rgb_matrix_mode(uint8_t mode); | 122 | void rgb_matrix_mode(uint8_t mode); |
| 145 | void rgb_matrix_mode_noeeprom(uint8_t mode); | 123 | void rgb_matrix_mode_noeeprom(uint8_t mode); |
| 146 | uint8_t rgb_matrix_get_mode(void); | 124 | uint8_t rgb_matrix_get_mode(void); |
| 125 | void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val); | ||
| 126 | void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); | ||
| 147 | 127 | ||
| 148 | #ifndef RGBLIGHT_ENABLE | 128 | #ifndef RGBLIGHT_ENABLE |
| 149 | #define rgblight_toggle() rgb_matrix_toggle() | 129 | #define rgblight_toggle() rgb_matrix_toggle() |
| @@ -166,7 +146,6 @@ uint8_t rgb_matrix_get_mode(void); | |||
| 166 | #define rgblight_mode(mode) rgb_matrix_mode(mode) | 146 | #define rgblight_mode(mode) rgb_matrix_mode(mode) |
| 167 | #define rgblight_mode_noeeprom(mode) rgb_matrix_mode_noeeprom(mode) | 147 | #define rgblight_mode_noeeprom(mode) rgb_matrix_mode_noeeprom(mode) |
| 168 | #define rgblight_get_mode() rgb_matrix_get_mode() | 148 | #define rgblight_get_mode() rgb_matrix_get_mode() |
| 169 | |||
| 170 | #endif | 149 | #endif |
| 171 | 150 | ||
| 172 | typedef struct { | 151 | typedef struct { |
diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 30dc7a48d..4f440abc9 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c | |||
| @@ -47,9 +47,8 @@ void eeconfig_init_quantum(void) { | |||
| 47 | eeprom_update_byte(EECONFIG_STENOMODE, 0); | 47 | eeprom_update_byte(EECONFIG_STENOMODE, 0); |
| 48 | eeprom_update_dword(EECONFIG_HAPTIC, 0); | 48 | eeprom_update_dword(EECONFIG_HAPTIC, 0); |
| 49 | eeprom_update_byte(EECONFIG_VELOCIKEY, 0); | 49 | eeprom_update_byte(EECONFIG_VELOCIKEY, 0); |
| 50 | #ifdef EECONFIG_RGB_MATRIX | ||
| 51 | eeprom_update_dword(EECONFIG_RGB_MATRIX, 0); | 50 | eeprom_update_dword(EECONFIG_RGB_MATRIX, 0); |
| 52 | #endif | 51 | eeprom_update_byte(EECONFIG_RGB_MATRIX_SPEED, 0); |
| 53 | 52 | ||
| 54 | eeconfig_init_kb(); | 53 | eeconfig_init_kb(); |
| 55 | } | 54 | } |
diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h index 0ac3dff07..3100041b4 100644 --- a/tmk_core/common/eeconfig.h +++ b/tmk_core/common/eeconfig.h | |||
| @@ -37,12 +37,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 37 | #define EECONFIG_UNICODEMODE (uint8_t *)12 | 37 | #define EECONFIG_UNICODEMODE (uint8_t *)12 |
| 38 | #define EECONFIG_STENOMODE (uint8_t *)13 | 38 | #define EECONFIG_STENOMODE (uint8_t *)13 |
| 39 | // EEHANDS for two handed boards | 39 | // EEHANDS for two handed boards |
| 40 | #define EECONFIG_HANDEDNESS (uint8_t *)14 | 40 | #define EECONFIG_HANDEDNESS (uint8_t *)14 |
| 41 | #define EECONFIG_KEYBOARD (uint32_t *)15 | 41 | #define EECONFIG_KEYBOARD (uint32_t *)15 |
| 42 | #define EECONFIG_USER (uint32_t *)19 | 42 | #define EECONFIG_USER (uint32_t *)19 |
| 43 | #define EECONFIG_VELOCIKEY (uint8_t *)23 | 43 | #define EECONFIG_VELOCIKEY (uint8_t *)23 |
| 44 | 44 | ||
| 45 | #define EECONFIG_HAPTIC (uint32_t*)24 | 45 | #define EECONFIG_HAPTIC (uint32_t *)24 |
| 46 | #define EECONFIG_RGB_MATRIX (uint32_t *)28 | ||
| 47 | #define EECONFIG_RGB_MATRIX_SPEED (uint8_t *)32 | ||
| 46 | 48 | ||
| 47 | /* debug bit */ | 49 | /* debug bit */ |
| 48 | #define EECONFIG_DEBUG_ENABLE (1<<0) | 50 | #define EECONFIG_DEBUG_ENABLE (1<<0) |
diff --git a/users/xulkal/process_records.c b/users/xulkal/process_records.c index 115623caa..2c5d2a4e7 100644 --- a/users/xulkal/process_records.c +++ b/users/xulkal/process_records.c | |||
| @@ -2,10 +2,6 @@ | |||
| 2 | #include "custom_keycodes.h" | 2 | #include "custom_keycodes.h" |
| 3 | #include "timer_utils.h" | 3 | #include "timer_utils.h" |
| 4 | 4 | ||
| 5 | #if defined(RGB_MATRIX_ENABLE) | ||
| 6 | extern void eeconfig_update_rgb_matrix_default(void); | ||
| 7 | #endif | ||
| 8 | |||
| 9 | #ifdef TRILAYER_ENABLED | 5 | #ifdef TRILAYER_ENABLED |
| 10 | uint32_t layer_state_set_user(uint32_t state) | 6 | uint32_t layer_state_set_user(uint32_t state) |
| 11 | { | 7 | { |
