diff options
Diffstat (limited to 'keyboards/hid_liber/hid_liber.c')
-rwxr-xr-x | keyboards/hid_liber/hid_liber.c | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/keyboards/hid_liber/hid_liber.c b/keyboards/hid_liber/hid_liber.c index 6517c92062..2d2130743f 100755 --- a/keyboards/hid_liber/hid_liber.c +++ b/keyboards/hid_liber/hid_liber.c @@ -24,34 +24,16 @@ void matrix_init_kb(void) { matrix_init_user(); } -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - void led_init_ports(void) { - DDRB |= (1<<5) | (1<<6); // OUT + setPinOutput(B5); + setPinOutput(B6); } -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<<USB_LED_CAPS_LOCK)) - PORTB &= ~(1<<5); - else - PORTB |= (1<<5); - - if (usb_led & (1<<USB_LED_SCROLL_LOCK)) - PORTB &= ~(1<<6); - else - PORTB |= (1<<6); - - led_set_user(usb_led); +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(B5, !led_state.caps_lock); + writePin(B6, !led_state.scroll_lock); + } + return res; } |