You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.5 KiB

  1. // Copyright 2023 QMK
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include <stdint.h>
  5. #if defined(RGB_MATRIX_AW20216S)
  6. # include "aw20216s.h"
  7. #elif defined(RGB_MATRIX_IS31FL3218)
  8. # include "is31fl3218.h"
  9. #elif defined(RGB_MATRIX_IS31FL3729)
  10. # include "is31fl3729.h"
  11. #elif defined(RGB_MATRIX_IS31FL3731)
  12. # include "is31fl3731.h"
  13. #elif defined(RGB_MATRIX_IS31FL3733)
  14. # include "is31fl3733.h"
  15. #elif defined(RGB_MATRIX_IS31FL3736)
  16. # include "is31fl3736.h"
  17. #elif defined(RGB_MATRIX_IS31FL3737)
  18. # include "is31fl3737.h"
  19. #elif defined(RGB_MATRIX_IS31FL3741)
  20. # include "is31fl3741.h"
  21. #elif defined(RGB_MATRIX_IS31FL3742A)
  22. # include "is31fl3742a.h"
  23. #elif defined(RGB_MATRIX_IS31FL3743A)
  24. # include "is31fl3743a.h"
  25. #elif defined(RGB_MATRIX_IS31FL3745)
  26. # include "is31fl3745.h"
  27. #elif defined(RGB_MATRIX_IS31FL3746A)
  28. # include "is31fl3746a.h"
  29. #elif defined(RGB_MATRIX_SNLED27351)
  30. # include "snled27351.h"
  31. #elif defined(RGB_MATRIX_WS2812)
  32. # include "ws2812.h"
  33. #endif
  34. typedef struct {
  35. /* Perform any initialisation required for the other driver functions to work. */
  36. void (*init)(void);
  37. /* Set the colour of a single LED in the buffer. */
  38. void (*set_color)(int index, uint8_t r, uint8_t g, uint8_t b);
  39. /* Set the colour of all LEDS on the keyboard in the buffer. */
  40. void (*set_color_all)(uint8_t r, uint8_t g, uint8_t b);
  41. /* Flush any buffered changes to the hardware. */
  42. void (*flush)(void);
  43. } rgb_matrix_driver_t;
  44. extern const rgb_matrix_driver_t rgb_matrix_driver;