]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Init RGB Matrix EEPROM
authorDrashna Jaelre <drashna@live.com>
Tue, 5 Mar 2019 06:10:13 +0000 (22:10 -0800)
committerskullydazed <skullydazed@users.noreply.github.com>
Fri, 19 Apr 2019 21:58:08 +0000 (14:58 -0700)
I'm not sure how to check if it's the same as RGBLIGHT's EEPROM, but if you don't init it, it **will not** work properly until it is initialized.

docs/feature_rgb_matrix.md
tmk_core/common/eeconfig.c

index e744ecc492029db181d8cdac971d5102c61a41e3..05c1ebba815e09a1c9dee2ac4e3025613278f6b1 100644 (file)
@@ -253,10 +253,10 @@ A similar function works in the keymap as `rgb_matrix_indicators_user`.
 The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with:
 
 ```C
 The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with:
 
 ```C
-#define EECONFIG_RGB_MATRIX (uint32_t *)16
+#define EECONFIG_RGB_MATRIX (uint32_t *)28
 ```
 
 ```
 
-Where `16` is an unused index from `eeconfig.h`.
+Where `28` is an unused index from `eeconfig.h`.
 
 ## Suspended state
 
 
 ## Suspended state
 
index 9c1e3520eea8b0559606ad47ae28da8794fd8031..30dc7a48d4c711032ddee08812b33d0b9dc0b83b 100644 (file)
@@ -47,6 +47,9 @@ void eeconfig_init_quantum(void) {
   eeprom_update_byte(EECONFIG_STENOMODE,      0);
   eeprom_update_dword(EECONFIG_HAPTIC,        0);
   eeprom_update_byte(EECONFIG_VELOCIKEY,      0);
   eeprom_update_byte(EECONFIG_STENOMODE,      0);
   eeprom_update_dword(EECONFIG_HAPTIC,        0);
   eeprom_update_byte(EECONFIG_VELOCIKEY,      0);
+#ifdef EECONFIG_RGB_MATRIX
+  eeprom_update_dword(EECONFIG_RGB_MATRIX,    0);
+#endif
 
   eeconfig_init_kb();
 }
 
   eeconfig_init_kb();
 }
@@ -185,5 +188,3 @@ uint32_t eeconfig_read_haptic(void)      { return eeprom_read_dword(EECONFIG_HAP
  * FIXME: needs doc
  */
 void eeconfig_update_haptic(uint32_t val) { eeprom_update_dword(EECONFIG_HAPTIC, val); }
  * FIXME: needs doc
  */
 void eeconfig_update_haptic(uint32_t val) { eeprom_update_dword(EECONFIG_HAPTIC, val); }
-
-