diff options
Diffstat (limited to 'quantum/rgb_matrix/rgb_matrix.h')
| -rw-r--r-- | quantum/rgb_matrix/rgb_matrix.h | 40 | 
1 files changed, 5 insertions, 35 deletions
| diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h index 9a3ffb8ea3..f8a6845e02 100644 --- a/quantum/rgb_matrix/rgb_matrix.h +++ b/quantum/rgb_matrix/rgb_matrix.h @@ -21,31 +21,10 @@  #include <stdint.h>  #include <stdbool.h>  #include "rgb_matrix_types.h" +#include "rgb_matrix_drivers.h"  #include "color.h"  #include "keyboard.h" -#if defined(RGB_MATRIX_IS31FL3218) -#    include "is31fl3218.h" -#elif defined(RGB_MATRIX_IS31FL3731) -#    include "is31fl3731.h" -#elif defined(RGB_MATRIX_IS31FL3733) -#    include "is31fl3733.h" -#elif defined(RGB_MATRIX_IS31FL3736) -#    include "is31fl3736.h" -#elif defined(RGB_MATRIX_IS31FL3737) -#    include "is31fl3737.h" -#elif defined(RGB_MATRIX_IS31FL3741) -#    include "is31fl3741.h" -#elif defined(IS31FLCOMMON) -#    include "is31flcommon.h" -#elif defined(RGB_MATRIX_SNLED27351) -#    include "snled27351.h" -#elif defined(RGB_MATRIX_AW20216S) -#    include "aw20216s.h" -#elif defined(RGB_MATRIX_WS2812) -#    include "ws2812.h" -#endif -  #ifndef RGB_MATRIX_TIMEOUT  #    define RGB_MATRIX_TIMEOUT 0  #endif @@ -99,6 +78,10 @@  #    define RGB_MATRIX_DEFAULT_SPD UINT8_MAX / 2  #endif +#ifndef RGB_MATRIX_DEFAULT_FLAGS +#    define RGB_MATRIX_DEFAULT_FLAGS LED_FLAG_ALL +#endif +  #ifndef RGB_MATRIX_LED_FLUSH_LIMIT  #    define RGB_MATRIX_LED_FLUSH_LIMIT 16  #endif @@ -272,17 +255,6 @@ void        rgb_matrix_set_flags_noeeprom(led_flags_t flags);  #    define rgblight_decrease_speed_noeeprom rgb_matrix_decrease_speed_noeeprom  #endif -typedef struct { -    /* Perform any initialisation required for the other driver functions to work. */ -    void (*init)(void); -    /* Set the colour of a single LED in the buffer. */ -    void (*set_color)(int index, uint8_t r, uint8_t g, uint8_t b); -    /* Set the colour of all LEDS on the keyboard in the buffer. */ -    void (*set_color_all)(uint8_t r, uint8_t g, uint8_t b); -    /* Flush any buffered changes to the hardware. */ -    void (*flush)(void); -} rgb_matrix_driver_t; -  static inline bool rgb_matrix_check_finished_leds(uint8_t led_idx) {  #if defined(RGB_MATRIX_SPLIT)      if (is_keyboard_left()) { @@ -295,8 +267,6 @@ static inline bool rgb_matrix_check_finished_leds(uint8_t led_idx) {  #endif  } -extern const rgb_matrix_driver_t rgb_matrix_driver; -  extern rgb_config_t rgb_matrix_config;  extern uint32_t     g_rgb_timer; | 
