9523ed9e32d89eb518a9c244ce4ebb395763fc85

Author
Eric N. Vander Weele <ericvw@gmail.com>
Committer
GitHub <noreply@github.com>
Date

Message

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.

Diff

 1diff --git a/keyboards/bastardkb/charybdis/charybdis.c b/keyboards/bastardkb/charybdis/charybdis.c
 2index 0ee5c3eed97539aa45ddb730789eda1a9b6c9d0f..2251b247581372aece6326a6571c7e4dd5ab81ca 100644
 3--- a/keyboards/bastardkb/charybdis/charybdis.c
 4+++ b/keyboards/bastardkb/charybdis/charybdis.c
 5@@ -393,7 +393,6 @@ bool shutdown_kb(bool jump_to_bootloader) {
 6     rgblight_setrgb(RGB_RED);
 7 #endif // RGBLIGHT_ENABLE
 8 #ifdef RGB_MATRIX_ENABLE
 9-    void rgb_matrix_update_pwm_buffers(void);
10     rgb_matrix_set_color_all(RGB_RED);
11     rgb_matrix_update_pwm_buffers();
12 #endif // RGB_MATRIX_ENABLE
13diff --git a/keyboards/bastardkb/dilemma/dilemma.c b/keyboards/bastardkb/dilemma/dilemma.c
14index 7c87fdcadd610275a2a031e1c045759d58d85a3a..b406e265261687be6a343cd19b4a0a14d142f861 100644
15--- a/keyboards/bastardkb/dilemma/dilemma.c
16+++ b/keyboards/bastardkb/dilemma/dilemma.c
17@@ -354,7 +354,6 @@ bool shutdown_kb(bool jump_to_bootloader) {
18     rgblight_setrgb(RGB_RED);
19 #endif // RGBLIGHT_ENABLE
20 #ifdef RGB_MATRIX_ENABLE
21-    void rgb_matrix_update_pwm_buffers(void);
22     rgb_matrix_set_color_all(RGB_RED);
23     rgb_matrix_update_pwm_buffers();
24 #endif // RGB_MATRIX_ENABLE
25diff --git a/keyboards/miiiw/blackio83/rev_0100/rev_0100.c b/keyboards/miiiw/blackio83/rev_0100/rev_0100.c
26index 18f4c86510ee7cd359aabaa5a1e87e24a4484df4..139bc1aaaef44493b1343b6c64f9e219fe1f11e2 100644
27--- a/keyboards/miiiw/blackio83/rev_0100/rev_0100.c
28+++ b/keyboards/miiiw/blackio83/rev_0100/rev_0100.c
29@@ -165,7 +165,6 @@ uint32_t loop_10Hz(uint32_t trigger_time, void *cb_arg) {
30             wait_ms(50);
31             eeconfig_init();
32     #ifdef RGB_MATRIX_ENABLE
33-            extern void rgb_matrix_update_pwm_buffers(void);
34             for(int i = 0; i < 5; i++) {
35                 rgb_matrix_set_color_all(RGB_WHITE);
36                 rgb_matrix_update_pwm_buffers();
37diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h
38index 842a60c8b7ed7d848d903ad2dc8f647e538b7ca6..33f7e06a639e8fb8e7173c3b715385d0423e5a9d 100644
39--- a/quantum/rgb_matrix/rgb_matrix.h
40+++ b/quantum/rgb_matrix/rgb_matrix.h
41@@ -212,6 +212,7 @@ void        rgb_matrix_decrease_speed_noeeprom(void);
42 led_flags_t rgb_matrix_get_flags(void);
43 void        rgb_matrix_set_flags(led_flags_t flags);
44 void        rgb_matrix_set_flags_noeeprom(led_flags_t flags);
45+void        rgb_matrix_update_pwm_buffers(void);
46 
47 #ifndef RGBLIGHT_ENABLE
48 #    define eeconfig_update_rgblight_current eeconfig_update_rgb_matrix