From d299d0e72dd96b73b745cad12977a719a0d71cd4 Mon Sep 17 00:00:00 2001 From: "Colin T.A. Gray" Date: Sun, 3 Dec 2017 08:21:10 -0700 Subject: [PATCH] adds led control functions to XD75 layout --- keyboards/xd75/readme.md | 40 ++++++++++++++++++++++++++ keyboards/xd75/xd75.c | 62 ++++++++++++++++++++++++++++++++++++++++ keyboards/xd75/xd75.h | 16 +++++++++++ 3 files changed, 118 insertions(+) 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<