summaryrefslogtreecommitdiff
path: root/keyboards/handwired/tritium_numpad/tritium_numpad.c
blob: 7193a934d609cb2d2cafa49d83da3f65f26c1b66 (plain)
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 "tritium_numpad.h"
#include "led.h"

void keyboard_pre_init_kb(void) {
	// put your keyboard start-up code here
	// runs once when the firmware starts up
	keyboard_pre_init_user();
	led_init_ports();
};

void matrix_scan_kb(void) {
	// put your looping keyboard code here
	// runs every cycle (a lot)
	matrix_scan_user();
};

void led_init_ports(void) {
    // * Set our LED pins as output
    // Numlock LED
    setPinOutput(D5);
}

void led_set_kb(uint8_t usb_led) {
    if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
        writePinLow(D5);
    } else {
        writePinHigh(D5);
    }
}