summaryrefslogtreecommitdiffstats
path: root/keyboards/lfkeyboards/lighting.h
diff options
context:
space:
mode:
authorScott Wilson <scott.t.wilson@gmail.com>2017-12-03 16:32:07 +0100
committerJack Humbert <jack.humb@gmail.com>2017-12-09 06:01:58 +0100
commitc51dfef958bce4a792b66db337d5c7cdf0956fc4 (patch)
treeb51a3d2a95c5ba47416e2964bc98c9ad329cf168 /keyboards/lfkeyboards/lighting.h
parent8b1862330a960b0413046ed6fdba78d2570e7988 (diff)
downloadqmk_firmware-c51dfef958bce4a792b66db337d5c7cdf0956fc4.tar.gz
qmk_firmware-c51dfef958bce4a792b66db337d5c7cdf0956fc4.tar.xz
Add support for LFKeyboard products: LFK78, LFK87 and SMK65
Diffstat (limited to 'keyboards/lfkeyboards/lighting.h')
-rw-r--r--keyboards/lfkeyboards/lighting.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/keyboards/lfkeyboards/lighting.h b/keyboards/lfkeyboards/lighting.h
new file mode 100644
index 000000000..69e63268d
--- /dev/null
+++ b/keyboards/lfkeyboards/lighting.h
@@ -0,0 +1,53 @@
+#ifndef LIGHTING_H
+#define LIGHTING_H
+
+
+// rgb_sequence[RGBLED_NUM]
+//
+// Array used for sequential lighting effects.
+//
+// Example LFK78 RevC+ RGB Map:
+// 27 29 10 9 8 7 6
+// 26 5
+// 25 4
+// 24 3
+// 23 22 21 20 14 15 11 1 2
+//
+// const uint8_t rgb_sequence[] = {
+// 27, 29, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,
+// 11, 15, 14, 20, 21, 22, 23, 24, 25, 26
+// };
+extern const uint8_t rgb_sequence[RGBLED_NUM];
+
+// switch_matrices[]
+//
+// The ISSI matrices for switch backlighting
+//
+// Example LFK78 RevC+ - ISSI Device 0, banks 0 and 1:
+// switch_matrices[] = {0, 1};
+extern const uint8_t switch_matrices[];
+
+// rgb_matrices[]
+// The ISSI matrices for RGB Underglow
+//
+// Example LFK78 RevC+ - ISSI Device 3, banks 0 and 1:
+// rgb_matrices[] = {6, 7};
+extern const uint8_t rgb_matrices[];
+
+// switch_leds[MATRIX_ROWS][MATRIX_COLS]
+// Maps switch LEDs from Row/Col to ISSI matrix.
+// Value breakdown:
+// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
+// | | ISSI Col | ISSI Row |
+// | |
+// Device
+extern const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS];
+
+void led_test(void);
+void force_issi_refresh(void);
+void set_backlight(uint8_t level);
+void set_underglow(uint8_t red, uint8_t green, uint8_t blue);
+void set_rgb(uint8_t rgb_led, uint8_t red, uint8_t green, uint8_t blue);
+void set_backlight_by_keymap(uint8_t col, uint8_t row);
+
+#endif \ No newline at end of file