aboutsummaryrefslogtreecommitdiff
path: root/keyboards/kinesis/stapelberg/stapelberg.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/kinesis/stapelberg/stapelberg.c')
-rw-r--r--keyboards/kinesis/stapelberg/stapelberg.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/keyboards/kinesis/stapelberg/stapelberg.c b/keyboards/kinesis/stapelberg/stapelberg.c
index af407ac4f..a69679eef 100644
--- a/keyboards/kinesis/stapelberg/stapelberg.c
+++ b/keyboards/kinesis/stapelberg/stapelberg.c
@@ -1,61 +1 @@
1#include "stapelberg.h" #include "stapelberg.h"
2
3void matrix_init_kb(void) {
4 // put your keyboard start-up code here
5 // runs once when the firmware starts up
6 // * Set our LED pins as output
7 DDRF |= (1<<0); // Keypad LED
8 DDRF |= (1<<1); // ScrLock LED
9 DDRF |= (1<<2); // NumLock LED
10 DDRF |= (1<<3); // CapsLock LED
11
12 matrix_init_user();
13}
14
15void matrix_scan_kb(void) {
16 // put your looping keyboard code here
17 // runs every cycle (a lot)
18
19 matrix_scan_user();
20}
21
22bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
23 // put your per-action keyboard code here
24 // runs for every action, just before processing by the firmware
25
26 return process_record_user(keycode, record);
27}
28
29void led_init_ports() {
30 // * Set our LED pins as output
31 DDRF |= (1<<0); // Keypad LED
32 DDRF |= (1<<1); // ScrLock LED
33 DDRF |= (1<<2); // NumLock LED
34 DDRF |= (1<<3); // CapsLock LED
35}
36
37void led_set_kb(uint8_t usb_led) {
38 if (usb_led & (1<<USB_LED_COMPOSE)) {
39 PORTF &= ~(1<<0);
40 } else {
41 PORTF |= (1<<0);
42 }
43
44 if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
45 PORTF &= ~(1<<1);
46 } else {
47 PORTF |= (1<<1);
48 }
49
50 if (usb_led & (1<<USB_LED_NUM_LOCK)) {
51 PORTF &= ~(1<<2);
52 } else {
53 PORTF |= (1<<2);
54 }
55
56 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
57 PORTF &= ~(1<<3);
58 } else {
59 PORTF |= (1<<3);
60 }
61}