summaryrefslogtreecommitdiff
path: root/keyboard/nerd/backlight.c
diff options
context:
space:
mode:
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();