aboutsummaryrefslogtreecommitdiff
path: root/users/drashna/transport_sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/drashna/transport_sync.c')
-rw-r--r--users/drashna/transport_sync.c33
1 files changed, 5 insertions, 28 deletions
diff --git a/users/drashna/transport_sync.c b/users/drashna/transport_sync.c
index fdd596c04..39db64135 100644
--- a/users/drashna/transport_sync.c
+++ b/users/drashna/transport_sync.c
@@ -23,7 +23,8 @@ extern unicode_config_t unicode_config;
23#endif 23#endif
24#ifdef AUDIO_ENABLE 24#ifdef AUDIO_ENABLE
25# include "audio.h" 25# include "audio.h"
26extern bool delayed_tasks_run; 26extern audio_config_t audio_config;
27extern bool delayed_tasks_run;
27#endif 28#endif
28#if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform) 29#if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform)
29extern bool tap_toggling; 30extern bool tap_toggling;
@@ -33,14 +34,6 @@ extern bool swap_hands;
33#endif 34#endif
34extern userspace_config_t userspace_config; 35extern userspace_config_t userspace_config;
35 36
36__attribute__((aligned(8))) typedef struct {
37 bool audio_enable;
38 bool audio_clicky_enable;
39 bool tap_toggling;
40 bool unicode_mode;
41 bool swap_hands;
42} user_runtime_config_t;
43
44uint16_t transport_keymap_config = 0; 37uint16_t transport_keymap_config = 0;
45uint32_t transport_userspace_config = 0; 38uint32_t transport_userspace_config = 0;
46 39
@@ -80,34 +73,18 @@ void user_transport_update(void) {
80#if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform) 73#if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform)
81 user_state.tap_toggling = tap_toggling; 74 user_state.tap_toggling = tap_toggling;
82#endif 75#endif
76#ifdef UNICODE_ENABLE
77 user_state.unicode_mode = unicode_config.input_mode;
78#endif
83#ifdef SWAP_HANDS_ENABLE 79#ifdef SWAP_HANDS_ENABLE
84 user_state.swap_hands = swap_hands; 80 user_state.swap_hands = swap_hands;
85#endif 81#endif
86
87 } else { 82 } else {
88 keymap_config.raw = transport_keymap_config; 83 keymap_config.raw = transport_keymap_config;
89 userspace_config.raw = transport_userspace_config; 84 userspace_config.raw = transport_userspace_config;
90#ifdef UNICODE_ENABLE 85#ifdef UNICODE_ENABLE
91 unicode_config.input_mode = user_state.unicode_mode; 86 unicode_config.input_mode = user_state.unicode_mode;
92#endif 87#endif
93#ifdef AUDIO_ENABLE
94 if (delayed_tasks_run) {
95 if (user_state.audio_enable != is_audio_on()) {
96 if (user_state.audio_enable) {
97 audio_on();
98 } else {
99 audio_off();
100 }
101 }
102 if (user_state.audio_clicky_enable != is_clicky_on()) {
103 if (user_state.audio_clicky_enable) {
104 clicky_on();
105 } else {
106 clicky_off();
107 }
108 }
109 }
110#endif
111#if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform) 88#if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform)
112 tap_toggling = user_state.tap_toggling; 89 tap_toggling = user_state.tap_toggling;
113#endif 90#endif