diff options
author | Ryan <[email protected]> | 2023-12-08 16:54:47 +1100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-12-08 16:54:47 +1100 |
commit | 24511d31b6fbf92d182d84d97193f65cbbdfeaa4 (patch) | |
tree | c6f4de1b6836a711377d1e04cfc623f9133193b4 /quantum/rgb_matrix/rgb_matrix_drivers.h | |
parent | 2d3f2e92d82187d3509f4f9be716bb0b31771eb9 (diff) | |
download | qmk_firmware-24511d31b6fbf92d182d84d97193f65cbbdfeaa4.tar.gz qmk_firmware-24511d31b6fbf92d182d84d97193f65cbbdfeaa4.zip |
LED/RGB Matrix: add header for drivers (#22628)
Diffstat (limited to 'quantum/rgb_matrix/rgb_matrix_drivers.h')
-rw-r--r-- | quantum/rgb_matrix/rgb_matrix_drivers.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.h b/quantum/rgb_matrix/rgb_matrix_drivers.h new file mode 100644 index 0000000000..991344f087 --- /dev/null +++ b/quantum/rgb_matrix/rgb_matrix_drivers.h @@ -0,0 +1,41 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include <stdint.h> + +#if defined(RGB_MATRIX_AW20216S) +# include "aw20216s.h" +#elif 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_WS2812) +# include "ws2812.h" +#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; + +extern const rgb_matrix_driver_t rgb_matrix_driver; |