lighting.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #pragma once
  2. // rgb_sequence[RGBLED_NUM]
  3. //
  4. // Array used for sequential lighting effects.
  5. //
  6. // Example LFK78 RevC+ RGB Map:
  7. // 27 29 10 9 8 7 6
  8. // 26 5
  9. // 25 4
  10. // 24 3
  11. // 23 22 21 20 14 15 11 1 2
  12. //
  13. // const uint8_t rgb_sequence[] = {
  14. // 27, 29, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,
  15. // 11, 15, 14, 20, 21, 22, 23, 24, 25, 26
  16. // };
  17. extern const uint8_t rgb_sequence[RGBLED_NUM];
  18. // switch_matrices[]
  19. //
  20. // The ISSI matrices for switch backlighting
  21. //
  22. // Example LFK78 RevC+ - ISSI Device 0, banks 0 and 1:
  23. // switch_matrices[] = {0, 1};
  24. extern const uint8_t switch_matrices[];
  25. // rgb_matrices[]
  26. // The ISSI matrices for RGB Underglow
  27. //
  28. // Example LFK78 RevC+ - ISSI Device 3, banks 0 and 1:
  29. // rgb_matrices[] = {6, 7};
  30. extern const uint8_t rgb_matrices[];
  31. // switch_leds[MATRIX_ROWS][MATRIX_COLS]
  32. // Maps switch LEDs from Row/Col to ISSI matrix.
  33. // Value breakdown:
  34. // Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
  35. // | | ISSI Col | ISSI Row |
  36. // | |
  37. // Device
  38. extern const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS];
  39. void led_test(void);
  40. void force_issi_refresh(void);
  41. void set_backlight(uint8_t level);
  42. void set_underglow(uint8_t red, uint8_t green, uint8_t blue);
  43. void set_rgb(uint8_t rgb_led, uint8_t red, uint8_t green, uint8_t blue);
  44. void set_backlight_by_keymap(uint8_t col, uint8_t row);