~ruther/qmk_firmware

ref: 7bacb1c173e548d9cd949923e468dffdca159384 qmk_firmware/keyboards/clueboard/66/rev4/rev4.c -rw-r--r-- 677 bytes
7bacb1c1 — Rutherther feat: only dedicated accent/caret symbols produce accented/careted output 9 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 led_init_ports(void) {
    // Set our LED pins as output
    gpio_set_pin_output(B13); // LED1
    gpio_write_pin_low(B13);
    gpio_set_pin_output(B14); // LED2
    gpio_write_pin_low(B14);
    gpio_set_pin_output(A8); // LED3
    gpio_write_pin_low(A8);
    gpio_set_pin_output(A0); // Capslock LED
    gpio_write_pin_low(A0);
}

bool led_update_kb(led_t led_state) {
    bool res = led_update_user(led_state);
    if(res) {
        gpio_write_pin(B13, led_state.num_lock);
        gpio_write_pin(A0, led_state.caps_lock);
        gpio_write_pin(B14, led_state.caps_lock);
        gpio_write_pin(A8, led_state.scroll_lock);
    }
    return res;
}
Do not follow this link