]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - keyboards/xd75/readme.md
fix backlight key for the light
[qmk_firmware.git] / keyboards / xd75 / readme.md
index d5dbdef25f5589ea4dcaedbb5880d7dc16d10495..e11ce7dca9a4fa2bf7348d76857be90cbcf803e1 100644 (file)
@@ -17,13 +17,53 @@ it using DFU.
 
 ### Default
 
-To build with the default keymap, simply run `make xd75-default` from the root directory (i.e. two levels above this file), and to install via DFU, `make xd75-default-dfu`, also from the root directory.
+To build with the default keymap, simply run `make xd75:default` from the root directory (i.e. two levels above this file), and to install via DFU, `make xd75:default:dfu`, also from the root directory.
 
 Note that DFU is likely to require root permissions, so installing the
 firmware likely requires a command line like:
 
 ```
-$ sudo make xd75-default-dfu
+$ 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
@@ -42,6 +82,6 @@ To build the firmware binary hex file for a specific keymap, and
 install it, using DFU, just do `make` with a keymap like this:
 
 ```
-$ make xd75-[default|<name>]
+$ make xd75:[default|<name>]
 ```