* Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * revert changespull/12199/head
@ -1,34 +1 @@ | |||
#include "wonderland.h" | |||
__attribute__ ((weak)) | |||
void matrix_init_kb(void) { | |||
// put your keyboard start-up code here | |||
// runs once when the firmware starts up | |||
matrix_init_user(); | |||
led_init_ports(); | |||
}; | |||
__attribute__ ((weak)) | |||
void matrix_scan_kb(void) { | |||
// put your looping keyboard code here | |||
// runs every cycle (a lot) | |||
matrix_scan_user(); | |||
}; | |||
__attribute__ ((weak)) | |||
void led_init_ports(void) { | |||
// * Set our LED pins as output | |||
setPinOutput(B1); | |||
setPinOutput(B2); | |||
setPinOutput(B3); | |||
} | |||
bool led_update_kb(led_t led_state) { | |||
bool runDefault = led_update_user(led_state); | |||
if (runDefault) { | |||
writePin(B1, !led_state.num_lock); | |||
writePin(B2, !led_state.caps_lock); | |||
writePin(B3, !led_state.scroll_lock); | |||
} | |||
return runDefault; | |||
} |
@ -1,29 +1 @@ | |||
#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); | |||
} | |||
} |
@ -1,26 +1 @@ | |||
#include "kint2pp.h" | |||
void matrix_init_kb(void) { | |||
led_init_ports(); | |||
matrix_init_user(); | |||
} | |||
void led_init_ports() { | |||
// * Set our LED pins as output | |||
setPinOutput(C3); // Keypad LED | |||
setPinOutput(C4); // ScrLock LED | |||
setPinOutput(C5); // NumLock LED | |||
setPinOutput(C1); // CapsLock LED | |||
} | |||
bool led_update_kb(led_t led_state) { | |||
bool res = led_update_user(led_state); | |||
if(res) { | |||
writePin(C3, !led_state.compose); | |||
writePin(C4, !led_state.scroll_lock); | |||
writePin(C5, !led_state.num_lock); | |||
writePin(C1, !led_state.caps_lock); | |||
} | |||
return res; | |||
} |
@ -1,31 +1 @@ | |||
#include "nguyenvietyen.h" | |||
void matrix_init_kb(void) { | |||
led_init_ports(); | |||
matrix_init_user(); | |||
} | |||
void led_init_ports() { | |||
// * Set our LED pins as output | |||
setPinOutput(D7); // Keypad LED | |||
setPinOutput(C6); // ScrLock LED | |||
setPinOutput(D4); // NumLock LED | |||
setPinOutput(E6); // CapsLock LED | |||
// turn all LEDs off by default | |||
writePinHigh(D7); | |||
writePinHigh(C6); | |||
writePinHigh(D4); | |||
writePinHigh(E6); | |||
} | |||
bool led_update_kb(led_t led_state) { | |||
bool res = led_update_user(led_state); | |||
if (res) { | |||
writePin(D7, !led_state.compose); | |||
writePin(C6, !led_state.scroll_lock); | |||
writePin(D4, !led_state.num_lock); | |||
writePin(E6, !led_state.caps_lock); | |||
} | |||
return res; | |||
} |