summaryrefslogtreecommitdiff
path: root/keyboard/nerd/backlight.c
diff options
context:
space:
mode:
authorRalf Schmitt <ralf@bunkertor.net>2014-11-23 13:29:07 +0100
committerRalf Schmitt <ralf@bunkertor.net>2015-01-18 11:45:24 +0100
commit2d740203318e2b0164e584a853bd0172dd9127cb (patch)
treee121f8e3ee75fbe4698eca805dd9826c316805d8 /keyboard/nerd/backlight.c
parentd9b5f5110ebf3e7da6a11e8640fb4367114aed67 (diff)
Added NerD 80% (TKL) support
Diffstat (limited to 'keyboard/nerd/backlight.c')
-rw-r--r--keyboard/nerd/backlight.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/keyboard/nerd/backlight.c b/keyboard/nerd/backlight.c
index 804b4848a6..2dc85c7532 100644
--- a/keyboard/nerd/backlight.c
+++ b/keyboard/nerd/backlight.c
@@ -17,12 +17,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <avr/io.h>
#include "backlight.h"
+#include "led.h"
void backlight_init_ports()
{
DDRB |= 0b11100000; // PB7 (switch), PB6 (pcb), PB5 (caps)
}
+void led_set(uint8_t usb_led)
+{
+ (usb_led & (1<<USB_LED_CAPS_LOCK)) ? backlight_caps_enable() : backlight_caps_disable();
+}
+
void backlight_set(uint8_t level)
{
(level & BACKLIGHT_SWITCH) ? backlight_switch_enable() : backlight_switch_disable();