led_matrix_drivers.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright 2023 QMK
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include <stdint.h>
  5. #if defined(LED_MATRIX_IS31FL3218)
  6. # include "is31fl3218-simple.h"
  7. #elif defined(LED_MATRIX_IS31FL3731)
  8. # include "is31fl3731-simple.h"
  9. #elif defined(LED_MATRIX_IS31FL3733)
  10. # include "is31fl3733-simple.h"
  11. #elif defined(LED_MATRIX_IS31FL3736)
  12. # include "is31fl3736-simple.h"
  13. #elif defined(LED_MATRIX_IS31FL3737)
  14. # include "is31fl3737-simple.h"
  15. #elif defined(LED_MATRIX_IS31FL3741)
  16. # include "is31fl3741-simple.h"
  17. #elif defined(IS31FLCOMMON)
  18. # include "is31flcommon.h"
  19. #elif defined(LED_MATRIX_SNLED27351)
  20. # include "snled27351-simple.h"
  21. #endif
  22. typedef struct {
  23. /* Perform any initialisation required for the other driver functions to work. */
  24. void (*init)(void);
  25. /* Set the brightness of a single LED in the buffer. */
  26. void (*set_value)(int index, uint8_t value);
  27. /* Set the brightness of all LEDS on the keyboard in the buffer. */
  28. void (*set_value_all)(uint8_t value);
  29. /* Flush any buffered changes to the hardware. */
  30. void (*flush)(void);
  31. } led_matrix_driver_t;
  32. extern const led_matrix_driver_t led_matrix_driver;