Skip to content

Commit

Permalink
Expose rgb_matrix_update_pwm_buffers to be available in keymaps (qmk#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
ericvw authored and DmNosachev committed Dec 7, 2024
1 parent 83a036b commit 9932776
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion keyboards/bastardkb/charybdis/charybdis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion keyboards/bastardkb/dilemma/dilemma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion keyboards/miiiw/blackio83/rev_0100/rev_0100.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions quantum/rgb_matrix/rgb_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9932776

Please sign in to comment.