3x5_3 make via keymap pristine

- move shutdown function to 3x5_3.c
This commit is contained in:
casuanoob 2023-11-16 13:06:10 +11:00
parent 58dd4bf3f3
commit 1359d26dc0
2 changed files with 9 additions and 12 deletions

View File

@ -92,4 +92,12 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
} }
return false; return false;
}; };
// Forward-declare this helper function since it is defined in rgb_matrix.c.
void rgb_matrix_update_pwm_buffers(void);
__attribute__((weak)) void shutdown_user(void) {
rgb_matrix_set_color_all(rgb_matrix_get_val(), 0x00, 0x00);
rgb_matrix_update_pwm_buffers();
}
#endif // RGB_MATRIX_ENABLE #endif // RGB_MATRIX_ENABLE

View File

@ -167,15 +167,4 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[LAYER_SYMBOLS] = {ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_LEFT, KC_RGHT)}, [LAYER_SYMBOLS] = {ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_LEFT, KC_RGHT)},
}; };
// clang-format on // clang-format on
#endif // ENCODER_MAP_ENABL #endif // ENCODER_MAP_ENABLE
#ifdef RGB_MATRIX_ENABLE
// Forward-declare this helper function since it is defined in rgb_matrix.c.
void rgb_matrix_update_pwm_buffers(void);
void shutdown_user(void) {
rgb_matrix_set_color_all(rgb_matrix_get_val(), 0x00, 0x00);
rgb_matrix_update_pwm_buffers();
#endif // RGB_MATRIX_ENABLE
}