summaryrefslogtreecommitdiff
path: root/users/drashna/drashna.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/drashna/drashna.c')
-rw-r--r--users/drashna/drashna.c35
1 files changed, 12 insertions, 23 deletions
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index 1a4ee9b414..ba19d4803f 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -18,12 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "drashna.h"
userspace_config_t userspace_config;
-#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
-# define DRASHNA_UNICODE_MODE UC_WIN
-#else
-// set to 2 for UC_WIN, set to 4 for UC_WINC
-# define DRASHNA_UNICODE_MODE 2
-#endif
bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) {
static uint16_t this_timer;
@@ -93,19 +87,17 @@ void matrix_init_user(void) {
DDRB &= ~(1 << 0);
PORTB &= ~(1 << 0);
#endif
-
-#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
- set_unicode_input_mode(DRASHNA_UNICODE_MODE);
- get_unicode_input_mode();
-#endif // UNICODE_ENABLE
matrix_init_keymap();
}
__attribute__((weak)) void keyboard_post_init_keymap(void) {}
void keyboard_post_init_user(void) {
-#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
- keyboard_post_init_rgb();
+#if defined(RGBLIGHT_ENABLE)
+ keyboard_post_init_rgb_light();
+#endif
+#if defined(RGB_MATRIX_ENABLE)
+ keyboard_post_init_rgb_matrix();
#endif
keyboard_post_init_keymap();
}
@@ -155,9 +147,12 @@ void matrix_scan_user(void) {
run_diablo_macro_check();
#endif // TAP_DANCE_ENABLE
-#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
- matrix_scan_rgb();
+#if defined(RGBLIGHT_ENABLE)
+ matrix_scan_rgb_light();
#endif // RGBLIGHT_ENABLE
+#if defined(RGB_MATRIX_ENABLE)
+ matrix_scan_rgb_matrix();
+#endif
matrix_scan_keymap();
}
@@ -168,8 +163,8 @@ __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state)
// Then runs keymap's layer change check
layer_state_t layer_state_set_user(layer_state_t state) {
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
-#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
- state = layer_state_set_rgb(state);
+#if defined(RGBLIGHT_ENABLE)
+ state = layer_state_set_rgb_light(state);
#endif // RGBLIGHT_ENABLE
return layer_state_set_keymap(state);
}
@@ -200,12 +195,6 @@ void eeconfig_init_user(void) {
userspace_config.raw = 0;
userspace_config.rgb_layer_change = true;
eeconfig_update_user(userspace_config.raw);
-#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
- set_unicode_input_mode(DRASHNA_UNICODE_MODE);
- get_unicode_input_mode();
-#else
- eeprom_update_byte(EECONFIG_UNICODEMODE, DRASHNA_UNICODE_MODE);
-#endif
eeconfig_init_keymap();
keyboard_init();
}