aboutsummaryrefslogtreecommitdiff
path: root/users/drashna
diff options
context:
space:
mode:
Diffstat (limited to 'users/drashna')
-rw-r--r--users/drashna/config.h2
-rw-r--r--users/drashna/drashna.c5
-rw-r--r--users/drashna/drashna.h2
-rw-r--r--users/drashna/oled_stuff.c2
-rw-r--r--users/drashna/process_records.c2
-rw-r--r--users/drashna/rules.mk2
-rw-r--r--users/drashna/transport_sync.c11
7 files changed, 19 insertions, 7 deletions
diff --git a/users/drashna/config.h b/users/drashna/config.h
index c8007a61b..75e1c11c6 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -140,7 +140,7 @@
140# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_REST_MODE 140# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_REST_MODE
141#endif // RGB_MATRIX_ENABLE 141#endif // RGB_MATRIX_ENABLE
142 142
143#ifdef OLED_DRIVER_ENABLE 143#ifdef OLED_ENABLE
144# ifdef SPLIT_KEYBOARD 144# ifdef SPLIT_KEYBOARD
145# define OLED_UPDATE_INTERVAL 60 145# define OLED_UPDATE_INTERVAL 60
146# else 146# else
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index 27b9b5bc9..13421f39d 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -114,8 +114,9 @@ void shutdown_user(void) {
114} 114}
115 115
116__attribute__((weak)) void suspend_power_down_keymap(void) {} 116__attribute__((weak)) void suspend_power_down_keymap(void) {}
117void suspend_power_down_user(void) { 117
118#ifdef OLED_DRIVER_ENABLE 118void suspend_power_down_user(void) {
119#ifdef OLED_ENABLE
119 oled_off(); 120 oled_off();
120#endif 121#endif
121 suspend_power_down_keymap(); 122 suspend_power_down_keymap();
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index 0ae5f779a..a1fa3ffa9 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -29,7 +29,7 @@
29#if defined(RGB_MATRIX_ENABLE) 29#if defined(RGB_MATRIX_ENABLE)
30# include "rgb_matrix_stuff.h" 30# include "rgb_matrix_stuff.h"
31#endif 31#endif
32#if defined(OLED_DRIVER_ENABLE) 32#if defined(OLED_ENABLE)
33# include "oled_stuff.h" 33# include "oled_stuff.h"
34#endif 34#endif
35#if defined(PIMORONI_TRACKBALL_ENABLE) 35#if defined(PIMORONI_TRACKBALL_ENABLE)
diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c
index 0d63c38fa..debcdcfbe 100644
--- a/users/drashna/oled_stuff.c
+++ b/users/drashna/oled_stuff.c
@@ -70,7 +70,7 @@ void add_keylog(uint16_t keycode) {
70 70
71bool process_record_user_oled(uint16_t keycode, keyrecord_t *record) { 71bool process_record_user_oled(uint16_t keycode, keyrecord_t *record) {
72 if (record->event.pressed) { 72 if (record->event.pressed) {
73#ifdef OLED_DRIVER_ENABLE 73#ifdef OLED_ENABLE
74 oled_timer = timer_read32(); 74 oled_timer = timer_read32();
75 add_keylog(keycode); 75 add_keylog(keycode);
76#endif 76#endif
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c
index f5e6a867a..900b6da15 100644
--- a/users/drashna/process_records.c
+++ b/users/drashna/process_records.c
@@ -29,7 +29,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *re
29#ifdef KEYLOGGER_ENABLE 29#ifdef KEYLOGGER_ENABLE
30 uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %b, time: %5u, int: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count); 30 uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %b, time: %5u, int: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count);
31#endif // KEYLOGGER_ENABLE 31#endif // KEYLOGGER_ENABLE
32#ifdef OLED_DRIVER_ENABLE 32#ifdef OLED_ENABLE
33 process_record_user_oled(keycode, record); 33 process_record_user_oled(keycode, record);
34#endif // OLED 34#endif // OLED
35 35
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk
index 02a75a7b7..dbacae1d5 100644
--- a/users/drashna/rules.mk
+++ b/users/drashna/rules.mk
@@ -64,7 +64,7 @@ ifeq ($(strip $(PROTOCOL)), VUSB)
64endif 64endif
65 65
66CUSTOM_OLED_DRIVER ?= yes 66CUSTOM_OLED_DRIVER ?= yes
67ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) 67ifeq ($(strip $(OLED_ENABLE)), yes)
68 ifeq ($(strip $(CUSTOM_OLED_DRIVER)), yes) 68 ifeq ($(strip $(CUSTOM_OLED_DRIVER)), yes)
69 SRC += oled_stuff.c 69 SRC += oled_stuff.c
70 OPT_DEFS += -DCUSTOM_OLED_DRIVER_CODE 70 OPT_DEFS += -DCUSTOM_OLED_DRIVER_CODE
diff --git a/users/drashna/transport_sync.c b/users/drashna/transport_sync.c
index fdd596c04..38434751e 100644
--- a/users/drashna/transport_sync.c
+++ b/users/drashna/transport_sync.c
@@ -71,6 +71,10 @@ void keyboard_post_init_transport_sync(void) {
71 71
72void user_transport_update(void) { 72void user_transport_update(void) {
73 if (is_keyboard_master()) { 73 if (is_keyboard_master()) {
74# ifdef OLED_ENABLE
75 user_state.oled_on = is_oled_on();
76# endif
77
74 transport_keymap_config = keymap_config.raw; 78 transport_keymap_config = keymap_config.raw;
75 transport_userspace_config = userspace_config.raw; 79 transport_userspace_config = userspace_config.raw;
76#ifdef AUDIO_ENABLE 80#ifdef AUDIO_ENABLE
@@ -85,6 +89,13 @@ void user_transport_update(void) {
85#endif 89#endif
86 90
87 } else { 91 } else {
92# ifdef OLED_ENABLE
93 if (user_state.oled_on) {
94 oled_on();
95 } else {
96 oled_off();
97 }
98# endif
88 keymap_config.raw = transport_keymap_config; 99 keymap_config.raw = transport_keymap_config;
89 userspace_config.raw = transport_userspace_config; 100 userspace_config.raw = transport_userspace_config;
90#ifdef UNICODE_ENABLE 101#ifdef UNICODE_ENABLE