~ruther/qmk_firmware

ref: c27d96b4c1ed8aa5bf9cad20380b8f723b149a83 qmk_firmware/keyboards/toad/toad.c -rw-r--r-- 352 bytes
c27d96b4 — Drashna Jaelre Fix ATSAM's USB HID descriptor to support higher heycodes 7 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "toad.h"

void led_set_user(uint8_t usb_led) {

	//LED1
	if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
		DDRB |= (1 << 6); PORTB &= ~(1 << 6);
	} else {
		DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
	}

	//LED2
	if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
		DDRB |= (1 << 5); PORTB &= ~(1 << 5);
	} else {
		DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
	}
}