summaryrefslogtreecommitdiffstats
path: root/keyboards/xd75/readme.md
diff options
context:
space:
mode:
authorColin T.A. Gray <colinta@gmail.com>2017-12-03 16:21:10 +0100
committerJack Humbert <jack.humb@gmail.com>2017-12-05 00:16:07 +0100
commitd299d0e72dd96b73b745cad12977a719a0d71cd4 (patch)
treea3114c78a70d01315380d3f7c0b7fd91e639e1ca /keyboards/xd75/readme.md
parent6fddb31c4c7dd96203e76ec9ba204c02bb86f060 (diff)
downloadqmk_firmware-d299d0e72dd96b73b745cad12977a719a0d71cd4.tar.gz
qmk_firmware-d299d0e72dd96b73b745cad12977a719a0d71cd4.tar.xz
adds led control functions to XD75 layout
Diffstat (limited to 'keyboards/xd75/readme.md')
-rw-r--r--keyboards/xd75/readme.md40
1 files changed, 40 insertions, 0 deletions
diff --git a/keyboards/xd75/readme.md b/keyboards/xd75/readme.md
index 5f4d2e85f..e11ce7dca 100644
--- a/keyboards/xd75/readme.md
+++ b/keyboards/xd75/readme.md
@@ -26,6 +26,46 @@ firmware likely requires a command line like:
$ sudo make xd75:default:dfu
```
+### LED control
+
+There are 3 individual LEDs that can be turned on and off, plus the keycap LEDs (which are all wired into the same pin). The functions are named according to how they're labeled on the PCB.
+
+TODO: it would be nice to have PWM support on these LEDs for fade-in/fade-out effects.
+
+```c
+capslock_led_on();
+gp100_led_on();
+gp103_led_on();
+keycaps_led_on();
+
+
+// led_set_user example - you could also turn these on/off in response
+// to events in process_record_user or matrix_scan_user
+void led_set_user(uint8_t usb_led) {
+ if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ capslock_led_on();
+ } else {
+ capslock_led_off();
+ }
+
+ if (some_custom_state) {
+ gp100_led_on();
+ }
+ else {
+ gp100_led_off();
+ }
+}
+```
+
+For the curious:
+
+```
+CAPSLOCK_LED B2
+GP103_LED F4
+KEYCAPS_LED F5
+GP100_LED F7
+```
+
### Other Keymaps
The "default" keymap included is basically the OLKB Atomic keymap with