Skip to content

Commit

Permalink
Disable power LED for liatris and disable magic functions for minimal…
Browse files Browse the repository at this point in the history
… to reduce firmware size
  • Loading branch information
harvey-splitkb committed Oct 1, 2024
1 parent 0af58a7 commit ae5e437
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
18 changes: 18 additions & 0 deletions users/vial-minimal/disable-magic-keycodes.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* Copyright 2024 splitkb.com <support@splitkb.com> */

#include QMK_KEYBOARD_H

// Disable magic keycodes to save space for AVR as they are not available to set in vial anyways as we disable `QMK_SETTINGS`.

#ifndef MAGIC_ENABLE
uint16_t keycode_config(uint16_t keycode) {
return keycode;
}
#endif

#ifndef MAGIC_ENABLE
uint8_t mod_config(uint8_t mod) {
return mod;
}
#endif
1 change: 1 addition & 0 deletions users/vial-minimal/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SRC += disable-magic-keycodes.c
9 changes: 9 additions & 0 deletions users/vial/power_led.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include QMK_KEYBOARD_H

void keyboard_pre_init_user(void) {
// Set our LED pin as output
gpio_set_pin_output(24);
// Turn the LED off
// (Due to technical reasons, high is off and low is on)
gpio_write_pin_high(24);
}
1 change: 1 addition & 0 deletions users/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SRC += power_led.c

0 comments on commit ae5e437

Please sign in to comment.