summaryrefslogtreecommitdiff
path: root/keyboards/rart/rartlice/rartlice.c
diff options
context:
space:
mode:
authorAlabahuy <rezzaadio@gmail.com>2020-10-19 03:41:53 +0700
committerGitHub <noreply@github.com>2020-10-18 13:41:53 -0700
commite468380be62f11f8edb93eb4eb440ae7b50cb00f (patch)
treec374eaba9f9d4e8a31b751217fc3f16caa2a1b98 /keyboards/rart/rartlice/rartlice.c
parent84566256552d23fee04c65dd0345fbfbc4df0741 (diff)
[Keyboard] add rartlice (#10495)
* Create bootloader_defs.h * Create chconf.h * Create config.h * Create halconf.h * Create info.json * Create mcuconf.h * Create rartlice.c * Create rartlice.h * Create readme.md * Update readme.md * Create rules.mk * Create keymap.c * Update config.h * Update rules.mk * Update config.h * Update keymap.c * Update rules.mk * Delete bootloader_defs.h * Update rules.mk
Diffstat (limited to 'keyboards/rart/rartlice/rartlice.c')
-rw-r--r--keyboards/rart/rartlice/rartlice.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/keyboards/rart/rartlice/rartlice.c b/keyboards/rart/rartlice/rartlice.c
new file mode 100644
index 0000000000..be805da33e
--- /dev/null
+++ b/keyboards/rart/rartlice/rartlice.c
@@ -0,0 +1,36 @@
+/* Copyright 2020 Alabahuy
+ * 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
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "rartlice.h"
+
+void keyboard_pre_init_kb(void) {
+ led_init_ports();
+ keyboard_pre_init_user();
+}
+
+void led_init_ports(void) {
+ setPinOutput(A8);
+ setPinOutput(B14);
+ setPinOutput(A9);
+}
+
+bool led_update_kb(led_t led_state) {
+ if (led_update_user(led_state)) {
+ writePin(A8, !led_state.num_lock);
+ writePin(B14, !led_state.caps_lock);
+ writePin(A9, !led_state.scroll_lock);
+ }
+ return true;
+}