From 9523ed9e32d89eb518a9c244ce4ebb395763fc85 Mon Sep 17 00:00:00 2001 From: "Eric N. Vander Weele" Date: Fri, 8 Nov 2024 01:12:59 -0500 Subject: [PATCH] Expose rgb_matrix_update_pwm_buffers to be available in keymaps (#24573) * Expose rgb_matrix_update_pwm_buffers to be available in keymaps Exposing this API enables the examples in the keyboard shutdown/reboot documentation to compile instead of calling `rgb_matrix_driver.flush` directly. * Remove extraneous rgb_matrix_update_pwm_buffers prototype declarations Now that `rgb_matrix_update_pwm_buffers` is public, there isn't the need for local prototype declarations. --- keyboards/bastardkb/charybdis/charybdis.c | 1 - keyboards/bastardkb/dilemma/dilemma.c | 1 - keyboards/miiiw/blackio83/rev_0100/rev_0100.c | 1 - quantum/rgb_matrix/rgb_matrix.h | 1 + 4 files changed, 1 insertion(+), 3 deletions(-) diff --git a/keyboards/bastardkb/charybdis/charybdis.c b/keyboards/bastardkb/charybdis/charybdis.c index 0ee5c3eed97..2251b247581 100644 --- a/keyboards/bastardkb/charybdis/charybdis.c +++ b/keyboards/bastardkb/charybdis/charybdis.c @@ -393,7 +393,6 @@ bool shutdown_kb(bool jump_to_bootloader) { rgblight_setrgb(RGB_RED); #endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE - void rgb_matrix_update_pwm_buffers(void); rgb_matrix_set_color_all(RGB_RED); rgb_matrix_update_pwm_buffers(); #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/bastardkb/dilemma/dilemma.c b/keyboards/bastardkb/dilemma/dilemma.c index 7c87fdcadd6..b406e265261 100644 --- a/keyboards/bastardkb/dilemma/dilemma.c +++ b/keyboards/bastardkb/dilemma/dilemma.c @@ -354,7 +354,6 @@ bool shutdown_kb(bool jump_to_bootloader) { rgblight_setrgb(RGB_RED); #endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE - void rgb_matrix_update_pwm_buffers(void); rgb_matrix_set_color_all(RGB_RED); rgb_matrix_update_pwm_buffers(); #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/miiiw/blackio83/rev_0100/rev_0100.c b/keyboards/miiiw/blackio83/rev_0100/rev_0100.c index 18f4c86510e..139bc1aaaef 100644 --- a/keyboards/miiiw/blackio83/rev_0100/rev_0100.c +++ b/keyboards/miiiw/blackio83/rev_0100/rev_0100.c @@ -165,7 +165,6 @@ uint32_t loop_10Hz(uint32_t trigger_time, void *cb_arg) { wait_ms(50); eeconfig_init(); #ifdef RGB_MATRIX_ENABLE - extern void rgb_matrix_update_pwm_buffers(void); for(int i = 0; i < 5; i++) { rgb_matrix_set_color_all(RGB_WHITE); rgb_matrix_update_pwm_buffers(); diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h index 842a60c8b7e..33f7e06a639 100644 --- a/quantum/rgb_matrix/rgb_matrix.h +++ b/quantum/rgb_matrix/rgb_matrix.h @@ -212,6 +212,7 @@ void rgb_matrix_decrease_speed_noeeprom(void); led_flags_t rgb_matrix_get_flags(void); void rgb_matrix_set_flags(led_flags_t flags); void rgb_matrix_set_flags_noeeprom(led_flags_t flags); +void rgb_matrix_update_pwm_buffers(void); #ifndef RGBLIGHT_ENABLE # define eeconfig_update_rgblight_current eeconfig_update_rgb_matrix