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()
This commit is contained in:
Rozakiin
2020-06-23 07:08:36 +01:00
committed by GitHub
parent f0bde7906d
commit d353fcb99c
9 changed files with 226 additions and 97 deletions

View File

@@ -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;
}