summaryrefslogtreecommitdiff
path: root/users/drashna/drashna.c
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2020-03-31 16:26:43 -0700
committerGitHub <noreply@github.com>2020-03-31 16:26:43 -0700
commitc67e30459390982f4f1b47f46c62322f1fe9ba87 (patch)
treed3504649cb692e58823bc7589d1a032256d9b0c1 /users/drashna/drashna.c
parent8c80475fcc568e04f637ae973086b65a31b5254d (diff)
downloadqmk_firmware-c67e30459390982f4f1b47f46c62322f1fe9ba87.tar.gz
qmk_firmware-c67e30459390982f4f1b47f46c62322f1fe9ba87.zip
[Keymap] Drashna's Cleanup and RGB Divide (#8506)
* Enable External EEPROM on Planck Rev6 * Update KC_MAKE macro to use qmk cli util * Disable additional gradients for rgb matrix * Update analog code for newer methods * Update ergodox layout * Disable Grave Escape * Cleanup OLED code a bit * Remove old unicode code * Seperate RGB Matrix code from RGB Light code in userspace * Massive overhaul an generalization of personal OLED code Now lets hope I NEVER get a keyboard using a 128x32 in a normal orientation. * Super tiny cleanup * Enable Diablo layer on kyria * clang format pass * Additional OLED cleanup
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();
}