~ruther/qmk_firmware

ref: 3665ae04410c064a7ab8e9f8aa5f58b7105e16b8 qmk_firmware/keyboards/bpiphany/frosty_flake/20130602/20130602.c -rw-r--r-- 533 bytes
3665ae04 — HorrorTroll [Keyboard] HorrorTroll Nyx (#21143) 1 year, 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "quantum.h"

void keyboard_pre_init_kb(void) {
    setPinOutput(B7); // caps lock
    writePinHigh(B7);
    setPinOutput(C5); // num lock
    writePinHigh(C7);
    setPinOutput(C6); // scroll lock
    writePinHigh(C6);

    keyboard_pre_init_user();
}

bool led_update_kb(led_t usb_led) {
    // user requests no further processing
    if (!led_update_user(usb_led))
        return true;

    writePin(C5, !usb_led.num_lock);
    writePin(B7, !usb_led.caps_lock);
    writePin(C6, !usb_led.scroll_lock);

    return true;
}
Do not follow this link