diff options
author | Rozakiin <6567067+Rozakiin@users.noreply.github.com> | 2020-06-23 07:08:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-22 23:08:36 -0700 |
commit | d353fcb99cfe345cde29cb7dc94cceaab82c610b (patch) | |
tree | bcf8ec344e497239d1ff93325b4a6197460baf34 /keyboards/noxary/x268/x268.c | |
parent | f0bde7906d35c1955a39251659e80d41caccbc54 (diff) | |
download | qmk_firmware-d353fcb99cfe345cde29cb7dc94cceaab82c610b.tar.gz qmk_firmware-d353fcb99cfe345cde29cb7dc94cceaab82c610b.zip |
Add VIA support to Noxary x268 (#9450)
* Update USB descriptors
* Update default keymap for readability
* Update readme description
* Update rules.mk build options, enable bootmagic and mousekey
* Add commented modern led code
* Add VIA keymap
* Update default keymap readme.md layout image
* Update keyboards/noxary/x268/rules.mk
remove incorrect comment
* Update keyboards/noxary/x268/x268.c
remove commented setPinOutput(B1)
* Update keyboards/noxary/x268/keymaps/default/readme.md
Flip order of layout image and title
* Update keyboards/noxary/x268/keymaps/via/readme.md
Flip order of layout image and title
* Update LED function to led_update_kb()
Diffstat (limited to 'keyboards/noxary/x268/x268.c')
-rw-r--r-- | keyboards/noxary/x268/x268.c | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/keyboards/noxary/x268/x268.c b/keyboards/noxary/x268/x268.c index 3921270acc..589d59deff 100644 --- a/keyboards/noxary/x268/x268.c +++ b/keyboards/noxary/x268/x268.c @@ -1,4 +1,4 @@ -/* Copyright 2018 Rozakiin +/* Copyright 2020 Rozakiin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,39 +15,20 @@ */ #include "x268.h" +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up - + setPinOutput(B0); 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_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -} - -void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 0); PORTB |= (1 << 0); - } - else { - DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B0, led_state.caps_lock); } + return true; } |