~ruther/qmk_firmware

ref: 6eb6e3048a730c39190914663d5aabceecc9b52e qmk_firmware/keyboards/clueboard/66/rev2/rev2.c -rw-r--r-- 788 bytes
6eb6e304 — Ryan `pearlboards/zeuspad`: add additional layouts (#24066) 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