summaryrefslogtreecommitdiff
path: root/keyboards/crkbd/keymaps/soundmonster/keymap.c
diff options
context:
space:
mode:
authorLeo Batyuk <leonid.batyuk@wooga.net>2022-01-07 00:49:55 +0100
committerGitHub <noreply@github.com>2022-01-06 23:49:55 +0000
commit845529782ef13a3d3f86443cf74082832eb71d9d (patch)
treecb8dc2e5f22d4ad1b0f275909defeff82961afb8 /keyboards/crkbd/keymaps/soundmonster/keymap.c
parenta6ed0e10f3b3b8625c54c0b5061b7d3fe4a7dbd2 (diff)
Migrate crkbd/soundmonster to split common, fix OLED and RGB matrix (#15717)
Co-authored-by: Leo B <leo.the.soundmonster@gmail.com>
Diffstat (limited to 'keyboards/crkbd/keymaps/soundmonster/keymap.c')
-rw-r--r--keyboards/crkbd/keymaps/soundmonster/keymap.c45
1 files changed, 5 insertions, 40 deletions
diff --git a/keyboards/crkbd/keymaps/soundmonster/keymap.c b/keyboards/crkbd/keymaps/soundmonster/keymap.c
index c9e2c8bc44..70fe50e967 100644
--- a/keyboards/crkbd/keymaps/soundmonster/keymap.c
+++ b/keyboards/crkbd/keymaps/soundmonster/keymap.c
@@ -1,3 +1,6 @@
+// Copyright 2022 Soundmonster (@soundmonster)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -7,10 +10,6 @@ extern keymap_config_t keymap_config;
extern rgblight_config_t rgblight_config;
#endif
-#ifdef OLED_ENABLE
-static uint32_t oled_timer = 0;
-#endif
-
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
@@ -278,53 +277,19 @@ void render_layer_state(void) {
}
}
-void render_status_main(void) {
- render_logo();
- render_space();
- render_layer_state();
- render_space();
- render_mod_status_gui_alt(get_mods()|get_oneshot_mods());
- render_mod_status_ctrl_shift(get_mods()|get_oneshot_mods());
-}
-
-void render_status_secondary(void) {
+bool oled_task_user(void) {
+ // Renders the current keyboard state (layers and mods)
render_logo();
render_space();
render_layer_state();
render_space();
render_mod_status_gui_alt(get_mods()|get_oneshot_mods());
render_mod_status_ctrl_shift(get_mods()|get_oneshot_mods());
-}
-
-void suspend_power_down_user() {
- oled_off();
-}
-
-bool oled_task_user(void) {
- if (timer_elapsed32(oled_timer) > 30000) {
- oled_off();
- return false;
- }
-#ifndef SPLIT_KEYBOARD
- else { oled_on(); }
-#endif
-
- if (is_keyboard_master()) {
- render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
- } else {
- render_status_secondary();
- }
return false;
}
#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- if (record->event.pressed) {
-#ifdef OLED_ENABLE
- oled_timer = timer_read32();
-#endif
- // set_timelog();
- }
static uint16_t my_colon_timer;
switch (keycode) {