~ruther/qmk_firmware

ref: 67d512e639806b24e68cb35170789f614e779638 qmk_firmware/keyboards/clueboard/66/rev3/rev3.c -rw-r--r-- 788 bytes
67d512e6 — Lex Brugman Fix enter for two ANSI layouts on the TKD Cycle7 (#24070) 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
25
26
27
28
29
#include "quantum.h"
#include "print.h"

void backlight_init_ports(void) {
    print("init_backlight_pin()\n");
    // Set our LED pins as output
    gpio_set_pin_output(D6); // Esc
    gpio_set_pin_output(B7); // Page Up
    gpio_set_pin_output(D4); // Arrows

    // Set our LED pins low
    gpio_write_pin_low(D6); // Esc
    gpio_write_pin_low(B7); // Page Up
    gpio_write_pin_low(D4); // Arrows
}

void backlight_set(uint8_t level) {
    if ( level == 0 ) {
        // Turn off light
        gpio_write_pin_high(D6); // Esc
        gpio_write_pin_high(B7); // Page Up
        gpio_write_pin_high(D4); // Arrows
    } else {
        // Turn on light
        gpio_write_pin_low(D6); // Esc
        gpio_write_pin_low(B7); // Page Up
        gpio_write_pin_low(D4); // Arrows
    }
}
Do not follow this link