diff options
author | James Young <18669334+noroadsleft@users.noreply.github.com> | 2020-06-15 03:11:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-15 03:11:19 -0700 |
commit | b008a9afe6f216cebe4c664d5ce59cd6bfe755c3 (patch) | |
tree | 51683c642396c5711ca6bb6fa18bc5aadb8d7c3a /keyboards/hid_liber/hid_liber.c | |
parent | d8e3294aeaf6d0b2e9400aefdd5bf2ff63d4d981 (diff) |
HID Liberation Device Refactor and Configurator layout support (#9394)
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; } |