From 5bc1373a2781046d485e7d934f8a42db89d83de7 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Thu, 8 Jul 2021 21:49:51 -0400 Subject: [PATCH] move RGB_MATRIX_MAXIMUM_BRIGHTNESS to header file --- quantum/rgb_matrix.c | 5 ----- quantum/rgb_matrix.h | 5 +++++ quantum/vialrgb.c | 5 ----- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index ab8dbd849b..47d6044ee1 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -71,11 +71,6 @@ __attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv # undef RGB_DISABLE_WHEN_USB_SUSPENDED #endif -#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX -# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX -#endif - #if !defined(RGB_MATRIX_HUE_STEP) # define RGB_MATRIX_HUE_STEP 8 #endif diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index a615b8422c..2e597500e6 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h @@ -224,3 +224,8 @@ extern last_hit_t g_last_hit_tracker; #ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS extern uint8_t g_rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS]; #endif + +#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX +# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX +#endif diff --git a/quantum/vialrgb.c b/quantum/vialrgb.c index d06ddffcc1..37fc4ea1a5 100644 --- a/quantum/vialrgb.c +++ b/quantum/vialrgb.c @@ -6,11 +6,6 @@ #include "rgb_matrix.h" #include "vial.h" -#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX -# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX -#endif - /* Based on https://github.com/qmk/qmk_firmware/pull/13036 */ void vialrgb_get_value(uint8_t *data, uint8_t length) {