1 #include "stapelberg.h"
3 void 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
15 void matrix_scan_kb(void) {
16 // put your looping keyboard code here
17 // runs every cycle (a lot)
22 bool 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
26 return process_record_user(keycode, record);
29 void 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
37 void led_set_kb(uint8_t usb_led) {
38 if (usb_led & (1<<USB_LED_COMPOSE)) {
44 if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
50 if (usb_led & (1<<USB_LED_NUM_LOCK)) {
56 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {