summaryrefslogtreecommitdiff
path: root/tmk_core
diff options
context:
space:
mode:
authorXScorpion2 <rcalt2vt@gmail.com>2021-03-02 14:32:15 -0600
committerGitHub <noreply@github.com>2021-03-03 07:32:15 +1100
commitcde2859a6591b1274da20978bd158f20229faa88 (patch)
tree181d3a637b661b0683282e412672e73efbf10f37 /tmk_core
parent967d7c47dc90c2cc087fb68acb328cc6e3fca76a (diff)
Split RGB Matrix (#11055)
* Split RGB Matrix * Suspend State sync for rgb matrix
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/avr/suspend.c4
-rw-r--r--tmk_core/common/chibios/suspend.c8
-rw-r--r--tmk_core/common/eeconfig.c2
-rw-r--r--tmk_core/common/eeconfig.h9
4 files changed, 18 insertions, 5 deletions
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c
index 47a82a2eec..d52c8ac410 100644
--- a/tmk_core/common/avr/suspend.c
+++ b/tmk_core/common/avr/suspend.c
@@ -28,6 +28,10 @@
# include "rgblight.h"
#endif
+#ifdef RGB_MATRIX_ENABLE
+# include "rgb_matrix.h"
+#endif
+
/** \brief Suspend idle
*
* FIXME: needs doc
diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c
index 49e20641fb..17f024caba 100644
--- a/tmk_core/common/chibios/suspend.c
+++ b/tmk_core/common/chibios/suspend.c
@@ -24,6 +24,10 @@
# include "rgblight.h"
#endif
+#ifdef RGB_MATRIX_ENABLE
+# include "rgb_matrix.h"
+#endif
+
/** \brief suspend idle
*
* FIXME: needs doc
@@ -53,6 +57,10 @@ void suspend_power_down(void) {
backlight_set(0);
#endif
+#ifdef RGB_MATRIX_ENABLE
+ rgb_matrix_task();
+#endif
+
// Turn off LED indicators
uint8_t leds_off = 0;
#if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE)
diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c
index 5e3ebe6ee6..92a5092176 100644
--- a/tmk_core/common/eeconfig.c
+++ b/tmk_core/common/eeconfig.c
@@ -57,7 +57,7 @@ void eeconfig_init_quantum(void) {
eeprom_update_dword(EECONFIG_HAPTIC, 0);
eeprom_update_byte(EECONFIG_VELOCIKEY, 0);
eeprom_update_dword(EECONFIG_RGB_MATRIX, 0);
- eeprom_update_byte(EECONFIG_RGB_MATRIX_SPEED, 0);
+ eeprom_update_word(EECONFIG_RGB_MATRIX_EXTENDED, 0);
// TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS
// within the emulated eeprom via dfu-util or another tool
diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h
index 86b9e6f99b..39bc51d5db 100644
--- a/tmk_core/common/eeconfig.h
+++ b/tmk_core/common/eeconfig.h
@@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdbool.h>
#ifndef EECONFIG_MAGIC_NUMBER
-# define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEEB // When changing, decrement this value to avoid future re-init issues
+# define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEEA // When changing, decrement this value to avoid future re-init issues
#endif
#define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF
@@ -44,11 +44,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define EECONFIG_HAPTIC (uint32_t *)24
#define EECONFIG_RGB_MATRIX (uint32_t *)28
-#define EECONFIG_RGB_MATRIX_SPEED (uint8_t *)32
+// Speed & Flags
+#define EECONFIG_RGB_MATRIX_EXTENDED (uint16_t *)32
// TODO: Combine these into a single word and single block of EEPROM
-#define EECONFIG_KEYMAP_UPPER_BYTE (uint8_t *)33
+#define EECONFIG_KEYMAP_UPPER_BYTE (uint8_t *)34
// Size of EEPROM being used, other code can refer to this for available EEPROM
-#define EECONFIG_SIZE 34
+#define EECONFIG_SIZE 35
/* debug bit */
#define EECONFIG_DEBUG_ENABLE (1 << 0)
#define EECONFIG_DEBUG_MATRIX (1 << 1)