qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

rgb_matrix_drivers.h (1611B)


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