diff options
author | XScorpion2 <rcalt2vt@gmail.com> | 2021-03-02 14:32:15 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 07:32:15 +1100 |
commit | cde2859a6591b1274da20978bd158f20229faa88 (patch) | |
tree | 181d3a637b661b0683282e412672e73efbf10f37 /tmk_core | |
parent | 967d7c47dc90c2cc087fb68acb328cc6e3fca76a (diff) | |
download | qmk_firmware-cde2859a6591b1274da20978bd158f20229faa88.tar.gz qmk_firmware-cde2859a6591b1274da20978bd158f20229faa88.zip |
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.c | 4 | ||||
-rw-r--r-- | tmk_core/common/chibios/suspend.c | 8 | ||||
-rw-r--r-- | tmk_core/common/eeconfig.c | 2 | ||||
-rw-r--r-- | tmk_core/common/eeconfig.h | 9 |
4 files changed, 18 insertions, 5 deletions
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 47a82a2ee..d52c8ac41 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c | |||
@@ -28,6 +28,10 @@ | |||
28 | # include "rgblight.h" | 28 | # include "rgblight.h" |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #ifdef RGB_MATRIX_ENABLE | ||
32 | # include "rgb_matrix.h" | ||
33 | #endif | ||
34 | |||
31 | /** \brief Suspend idle | 35 | /** \brief Suspend idle |
32 | * | 36 | * |
33 | * FIXME: needs doc | 37 | * FIXME: needs doc |
diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c index 49e20641f..17f024cab 100644 --- a/tmk_core/common/chibios/suspend.c +++ b/tmk_core/common/chibios/suspend.c | |||
@@ -24,6 +24,10 @@ | |||
24 | # include "rgblight.h" | 24 | # include "rgblight.h" |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #ifdef RGB_MATRIX_ENABLE | ||
28 | # include "rgb_matrix.h" | ||
29 | #endif | ||
30 | |||
27 | /** \brief suspend idle | 31 | /** \brief suspend idle |
28 | * | 32 | * |
29 | * FIXME: needs doc | 33 | * FIXME: needs doc |
@@ -53,6 +57,10 @@ void suspend_power_down(void) { | |||
53 | backlight_set(0); | 57 | backlight_set(0); |
54 | #endif | 58 | #endif |
55 | 59 | ||
60 | #ifdef RGB_MATRIX_ENABLE | ||
61 | rgb_matrix_task(); | ||
62 | #endif | ||
63 | |||
56 | // Turn off LED indicators | 64 | // Turn off LED indicators |
57 | uint8_t leds_off = 0; | 65 | uint8_t leds_off = 0; |
58 | #if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE) | 66 | #if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE) |
diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 5e3ebe6ee..92a509217 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c | |||
@@ -57,7 +57,7 @@ void eeconfig_init_quantum(void) { | |||
57 | eeprom_update_dword(EECONFIG_HAPTIC, 0); | 57 | eeprom_update_dword(EECONFIG_HAPTIC, 0); |
58 | eeprom_update_byte(EECONFIG_VELOCIKEY, 0); | 58 | eeprom_update_byte(EECONFIG_VELOCIKEY, 0); |
59 | eeprom_update_dword(EECONFIG_RGB_MATRIX, 0); | 59 | eeprom_update_dword(EECONFIG_RGB_MATRIX, 0); |
60 | eeprom_update_byte(EECONFIG_RGB_MATRIX_SPEED, 0); | 60 | eeprom_update_word(EECONFIG_RGB_MATRIX_EXTENDED, 0); |
61 | 61 | ||
62 | // TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS | 62 | // TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS |
63 | // within the emulated eeprom via dfu-util or another tool | 63 | // 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 86b9e6f99..39bc51d5d 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/>. | |||
21 | #include <stdbool.h> | 21 | #include <stdbool.h> |
22 | 22 | ||
23 | #ifndef EECONFIG_MAGIC_NUMBER | 23 | #ifndef EECONFIG_MAGIC_NUMBER |
24 | # define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEEB // When changing, decrement this value to avoid future re-init issues | 24 | # define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEEA // When changing, decrement this value to avoid future re-init issues |
25 | #endif | 25 | #endif |
26 | #define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF | 26 | #define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF |
27 | 27 | ||
@@ -44,11 +44,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
44 | 44 | ||
45 | #define EECONFIG_HAPTIC (uint32_t *)24 | 45 | #define EECONFIG_HAPTIC (uint32_t *)24 |
46 | #define EECONFIG_RGB_MATRIX (uint32_t *)28 | 46 | #define EECONFIG_RGB_MATRIX (uint32_t *)28 |
47 | #define EECONFIG_RGB_MATRIX_SPEED (uint8_t *)32 | 47 | // Speed & Flags |
48 | #define EECONFIG_RGB_MATRIX_EXTENDED (uint16_t *)32 | ||
48 | // TODO: Combine these into a single word and single block of EEPROM | 49 | // TODO: Combine these into a single word and single block of EEPROM |
49 | #define EECONFIG_KEYMAP_UPPER_BYTE (uint8_t *)33 | 50 | #define EECONFIG_KEYMAP_UPPER_BYTE (uint8_t *)34 |
50 | // Size of EEPROM being used, other code can refer to this for available EEPROM | 51 | // Size of EEPROM being used, other code can refer to this for available EEPROM |
51 | #define EECONFIG_SIZE 34 | 52 | #define EECONFIG_SIZE 35 |
52 | /* debug bit */ | 53 | /* debug bit */ |
53 | #define EECONFIG_DEBUG_ENABLE (1 << 0) | 54 | #define EECONFIG_DEBUG_ENABLE (1 << 0) |
54 | #define EECONFIG_DEBUG_MATRIX (1 << 1) | 55 | #define EECONFIG_DEBUG_MATRIX (1 << 1) |