diff options
| -rw-r--r-- | docs/feature_rgb_matrix.md | 2 | ||||
| -rw-r--r-- | quantum/rgb_matrix.c | 35 | ||||
| -rw-r--r-- | quantum/rgb_matrix_types.h | 1 | ||||
| -rw-r--r-- | quantum/split_common/transport.c | 35 | ||||
| -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 |
8 files changed, 86 insertions, 10 deletions
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index fd866bd57..878acaf8b 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md | |||
| @@ -439,6 +439,8 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo | |||
| 439 | #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set | 439 | #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set |
| 440 | #define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set | 440 | #define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set |
| 441 | #define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature) | 441 | #define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature) |
| 442 | #define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right. | ||
| 443 | // If RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR | ||
| 442 | ``` | 444 | ``` |
| 443 | 445 | ||
| 444 | ## EEPROM storage :id=eeprom-storage | 446 | ## EEPROM storage :id=eeprom-storage |
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index ec17b4d72..69d4c0209 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c | |||
| @@ -131,7 +131,7 @@ last_hit_t g_last_hit_tracker; | |||
| 131 | // internals | 131 | // internals |
| 132 | static uint8_t rgb_last_enable = UINT8_MAX; | 132 | static uint8_t rgb_last_enable = UINT8_MAX; |
| 133 | static uint8_t rgb_last_effect = UINT8_MAX; | 133 | static uint8_t rgb_last_effect = UINT8_MAX; |
| 134 | static effect_params_t rgb_effect_params = {0, 0xFF}; | 134 | static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false}; |
| 135 | static rgb_task_states rgb_task_state = SYNCING; | 135 | static rgb_task_states rgb_task_state = SYNCING; |
| 136 | #if RGB_DISABLE_TIMEOUT > 0 | 136 | #if RGB_DISABLE_TIMEOUT > 0 |
| 137 | static uint32_t rgb_anykey_timer; | 137 | static uint32_t rgb_anykey_timer; |
| @@ -143,6 +143,11 @@ static uint32_t rgb_timer_buffer; | |||
| 143 | static last_hit_t last_hit_buffer; | 143 | static last_hit_t last_hit_buffer; |
| 144 | #endif // RGB_MATRIX_KEYREACTIVE_ENABLED | 144 | #endif // RGB_MATRIX_KEYREACTIVE_ENABLED |
| 145 | 145 | ||
| 146 | // split rgb matrix | ||
| 147 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 148 | const uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT; | ||
| 149 | #endif | ||
| 150 | |||
| 146 | void eeconfig_read_rgb_matrix(void) { eeprom_read_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); } | 151 | void eeconfig_read_rgb_matrix(void) { eeprom_read_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); } |
| 147 | 152 | ||
| 148 | void eeconfig_update_rgb_matrix(void) { eeprom_update_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); } | 153 | void eeconfig_update_rgb_matrix(void) { eeprom_update_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); } |
| @@ -153,6 +158,7 @@ void eeconfig_update_rgb_matrix_default(void) { | |||
| 153 | rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE; | 158 | rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE; |
| 154 | rgb_matrix_config.hsv = (HSV){RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL}; | 159 | rgb_matrix_config.hsv = (HSV){RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL}; |
| 155 | rgb_matrix_config.speed = RGB_MATRIX_STARTUP_SPD; | 160 | rgb_matrix_config.speed = RGB_MATRIX_STARTUP_SPD; |
| 161 | rgb_matrix_config.flags = LED_FLAG_ALL; | ||
| 156 | eeconfig_update_rgb_matrix(); | 162 | eeconfig_update_rgb_matrix(); |
| 157 | } | 163 | } |
| 158 | 164 | ||
| @@ -164,6 +170,7 @@ void eeconfig_debug_rgb_matrix(void) { | |||
| 164 | dprintf("rgb_matrix_config.hsv.s = %d\n", rgb_matrix_config.hsv.s); | 170 | dprintf("rgb_matrix_config.hsv.s = %d\n", rgb_matrix_config.hsv.s); |
| 165 | dprintf("rgb_matrix_config.hsv.v = %d\n", rgb_matrix_config.hsv.v); | 171 | dprintf("rgb_matrix_config.hsv.v = %d\n", rgb_matrix_config.hsv.v); |
| 166 | dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed); | 172 | dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed); |
| 173 | dprintf("rgb_matrix_config.flags = %d\n", rgb_matrix_config.flags); | ||
| 167 | } | 174 | } |
| 168 | 175 | ||
| 169 | __attribute__((weak)) uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { return 0; } | 176 | __attribute__((weak)) uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { return 0; } |
| @@ -180,9 +187,23 @@ uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *l | |||
| 180 | 187 | ||
| 181 | void rgb_matrix_update_pwm_buffers(void) { rgb_matrix_driver.flush(); } | 188 | void rgb_matrix_update_pwm_buffers(void) { rgb_matrix_driver.flush(); } |
| 182 | 189 | ||
| 183 | void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { rgb_matrix_driver.set_color(index, red, green, blue); } | 190 | void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { |
| 191 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 192 | if (!is_keyboard_left() && index >= k_rgb_matrix_split[0]) | ||
| 193 | rgb_matrix_driver.set_color(index - k_rgb_matrix_split[0], red, green, blue); | ||
| 194 | else if (is_keyboard_left() && index < k_rgb_matrix_split[0]) | ||
| 195 | #endif | ||
| 196 | rgb_matrix_driver.set_color(index, red, green, blue); | ||
| 197 | } | ||
| 184 | 198 | ||
| 185 | void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { rgb_matrix_driver.set_color_all(red, green, blue); } | 199 | void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { |
| 200 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 201 | for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) | ||
| 202 | rgb_matrix_set_color(i, red, green, blue); | ||
| 203 | #else | ||
| 204 | rgb_matrix_driver.set_color_all(red, green, blue); | ||
| 205 | #endif | ||
| 206 | } | ||
| 186 | 207 | ||
| 187 | void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed) { | 208 | void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed) { |
| 188 | #ifndef RGB_MATRIX_SPLIT | 209 | #ifndef RGB_MATRIX_SPLIT |
| @@ -315,6 +336,10 @@ static void rgb_task_start(void) { | |||
| 315 | static void rgb_task_render(uint8_t effect) { | 336 | static void rgb_task_render(uint8_t effect) { |
| 316 | bool rendering = false; | 337 | bool rendering = false; |
| 317 | rgb_effect_params.init = (effect != rgb_last_effect) || (rgb_matrix_config.enable != rgb_last_enable); | 338 | rgb_effect_params.init = (effect != rgb_last_effect) || (rgb_matrix_config.enable != rgb_last_enable); |
| 339 | if (rgb_effect_params.flags != rgb_matrix_config.flags) { | ||
| 340 | rgb_effect_params.flags = rgb_matrix_config.flags; | ||
| 341 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 342 | } | ||
| 318 | 343 | ||
| 319 | // each effect can opt to do calculations | 344 | // each effect can opt to do calculations |
| 320 | // and/or request PWM buffer updates. | 345 | // and/or request PWM buffer updates. |
| @@ -618,6 +643,6 @@ void rgb_matrix_decrease_speed_helper(bool write_to_eeprom) { rgb_matrix_set_spe | |||
| 618 | void rgb_matrix_decrease_speed_noeeprom(void) { rgb_matrix_decrease_speed_helper(false); } | 643 | void rgb_matrix_decrease_speed_noeeprom(void) { rgb_matrix_decrease_speed_helper(false); } |
| 619 | void rgb_matrix_decrease_speed(void) { rgb_matrix_decrease_speed_helper(true); } | 644 | void rgb_matrix_decrease_speed(void) { rgb_matrix_decrease_speed_helper(true); } |
| 620 | 645 | ||
| 621 | led_flags_t rgb_matrix_get_flags(void) { return rgb_effect_params.flags; } | 646 | led_flags_t rgb_matrix_get_flags(void) { return rgb_matrix_config.flags; } |
| 622 | 647 | ||
| 623 | void rgb_matrix_set_flags(led_flags_t flags) { rgb_effect_params.flags = flags; } | 648 | void rgb_matrix_set_flags(led_flags_t flags) { rgb_matrix_config.flags = flags; } |
diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix_types.h index 7b8171fb2..8cd5b17a7 100644 --- a/quantum/rgb_matrix_types.h +++ b/quantum/rgb_matrix_types.h | |||
| @@ -89,6 +89,7 @@ typedef union { | |||
| 89 | uint8_t mode : 6; | 89 | uint8_t mode : 6; |
| 90 | HSV hsv; | 90 | HSV hsv; |
| 91 | uint8_t speed; // EECONFIG needs to be increased to support this | 91 | uint8_t speed; // EECONFIG needs to be increased to support this |
| 92 | led_flags_t flags; | ||
| 92 | }; | 93 | }; |
| 93 | } rgb_config_t; | 94 | } rgb_config_t; |
| 94 | 95 | ||
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c index 61b61ea08..daa60bb73 100644 --- a/quantum/split_common/transport.c +++ b/quantum/split_common/transport.c | |||
| @@ -22,6 +22,10 @@ static pin_t encoders_pad[] = ENCODERS_PAD_A; | |||
| 22 | # define NUMBER_OF_ENCODERS (sizeof(encoders_pad) / sizeof(pin_t)) | 22 | # define NUMBER_OF_ENCODERS (sizeof(encoders_pad) / sizeof(pin_t)) |
| 23 | #endif | 23 | #endif |
| 24 | 24 | ||
| 25 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 26 | # include "rgb_matrix.h" | ||
| 27 | #endif | ||
| 28 | |||
| 25 | #if defined(USE_I2C) | 29 | #if defined(USE_I2C) |
| 26 | 30 | ||
| 27 | # include "i2c_master.h" | 31 | # include "i2c_master.h" |
| @@ -54,6 +58,10 @@ typedef struct _I2C_slave_buffer_t { | |||
| 54 | # ifdef WPM_ENABLE | 58 | # ifdef WPM_ENABLE |
| 55 | uint8_t current_wpm; | 59 | uint8_t current_wpm; |
| 56 | # endif | 60 | # endif |
| 61 | # if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 62 | rgb_config_t rgb_matrix; | ||
| 63 | bool rgb_suspend_state; | ||
| 64 | # endif | ||
| 57 | } I2C_slave_buffer_t; | 65 | } I2C_slave_buffer_t; |
| 58 | 66 | ||
| 59 | static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg; | 67 | static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg; |
| @@ -68,6 +76,8 @@ static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_re | |||
| 68 | # define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync) | 76 | # define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync) |
| 69 | # define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state) | 77 | # define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state) |
| 70 | # define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm) | 78 | # define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm) |
| 79 | # define I2C_RGB_MATRIX_START offsetof(I2C_slave_buffer_t, rgb_matrix) | ||
| 80 | # define I2C_RGB_SUSPEND_START offsetof(I2C_slave_buffer_t, rgb_suspend_state) | ||
| 71 | 81 | ||
| 72 | # define TIMEOUT 100 | 82 | # define TIMEOUT 100 |
| 73 | 83 | ||
| @@ -141,6 +151,11 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) | |||
| 141 | # endif | 151 | # endif |
| 142 | # endif | 152 | # endif |
| 143 | 153 | ||
| 154 | # if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 155 | i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_START, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix), TIMEOUT); | ||
| 156 | i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_SUSPEND_START, (void *)g_suspend_state, sizeof(i2c_buffer->rgb_suspend_state), TIMEOUT); | ||
| 157 | # endif | ||
| 158 | |||
| 144 | # ifndef DISABLE_SYNC_TIMER | 159 | # ifndef DISABLE_SYNC_TIMER |
| 145 | i2c_buffer->sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; | 160 | i2c_buffer->sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; |
| 146 | i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_SYNC_TIME_START, (void *)&i2c_buffer->sync_timer, sizeof(i2c_buffer->sync_timer), TIMEOUT); | 161 | i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_SYNC_TIME_START, (void *)&i2c_buffer->sync_timer, sizeof(i2c_buffer->sync_timer), TIMEOUT); |
| @@ -186,6 +201,11 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) | |||
| 186 | set_oneshot_mods(i2c_buffer->oneshot_mods); | 201 | set_oneshot_mods(i2c_buffer->oneshot_mods); |
| 187 | # endif | 202 | # endif |
| 188 | # endif | 203 | # endif |
| 204 | |||
| 205 | # if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 206 | memcpy((void*)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix)); | ||
| 207 | memcpy((void*)i2c_buffer->rgb_suspend_state, (void *)g_suspend_state, sizeof(i2c_buffer->rgb_suspend_state)); | ||
| 208 | # endif | ||
| 189 | } | 209 | } |
| 190 | 210 | ||
| 191 | void transport_master_init(void) { i2c_init(); } | 211 | void transport_master_init(void) { i2c_init(); } |
| @@ -226,6 +246,10 @@ typedef struct _Serial_m2s_buffer_t { | |||
| 226 | # ifdef WPM_ENABLE | 246 | # ifdef WPM_ENABLE |
| 227 | uint8_t current_wpm; | 247 | uint8_t current_wpm; |
| 228 | # endif | 248 | # endif |
| 249 | # if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 250 | rgb_config_t rgb_matrix; | ||
| 251 | bool rgb_suspend_state; | ||
| 252 | # endif | ||
| 229 | } Serial_m2s_buffer_t; | 253 | } Serial_m2s_buffer_t; |
| 230 | 254 | ||
| 231 | # if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) | 255 | # if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) |
| @@ -343,6 +367,12 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) | |||
| 343 | serial_m2s_buffer.oneshot_mods = get_oneshot_mods(); | 367 | serial_m2s_buffer.oneshot_mods = get_oneshot_mods(); |
| 344 | # endif | 368 | # endif |
| 345 | # endif | 369 | # endif |
| 370 | |||
| 371 | # if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 372 | serial_m2s_buffer.rgb_matrix = rgb_matrix_config; | ||
| 373 | serial_m2s_buffer.rgb_suspend_state = g_suspend_state; | ||
| 374 | # endif | ||
| 375 | |||
| 346 | # ifndef DISABLE_SYNC_TIMER | 376 | # ifndef DISABLE_SYNC_TIMER |
| 347 | serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; | 377 | serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; |
| 348 | # endif | 378 | # endif |
| @@ -381,6 +411,11 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) | |||
| 381 | set_oneshot_mods(serial_m2s_buffer.oneshot_mods); | 411 | set_oneshot_mods(serial_m2s_buffer.oneshot_mods); |
| 382 | # endif | 412 | # endif |
| 383 | # endif | 413 | # endif |
| 414 | |||
| 415 | # if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 416 | rgb_matrix_config = serial_m2s_buffer.rgb_matrix; | ||
| 417 | g_suspend_state = serial_m2s_buffer.rgb_suspend_state; | ||
| 418 | # endif | ||
| 384 | } | 419 | } |
| 385 | 420 | ||
| 386 | #endif | 421 | #endif |
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) |
