diff options
Diffstat (limited to 'users/drashna/split')
-rw-r--r-- | users/drashna/split/split_config.h | 21 | ||||
-rw-r--r-- | users/drashna/split/transport_sync.c | 14 | ||||
-rw-r--r-- | users/drashna/split/transport_sync.h | 1 |
3 files changed, 32 insertions, 4 deletions
diff --git a/users/drashna/split/split_config.h b/users/drashna/split/split_config.h new file mode 100644 index 0000000000..66c12392d9 --- /dev/null +++ b/users/drashna/split/split_config.h @@ -0,0 +1,21 @@ +// Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// # define SPLIT_TRANSPORT_MIRROR +#define SPLIT_LAYER_STATE_ENABLE +#define SPLIT_LED_STATE_ENABLE +#define SPLIT_MODS_ENABLE +#ifdef WPM_ENABLE +# define SPLIT_WPM_ENABLE +#endif +#ifdef OLED_ENABLE +# undef SPLIT_OLED_ENABLE +#endif +#if defined(__AVR__) && !defined(SELECT_SOFT_SERIAL_SPEED) +# define SELECT_SOFT_SERIAL_SPEED 1 +#endif +#ifdef CUSTOM_SPLIT_TRANSPORT_SYNC +# define SPLIT_TRANSACTION_IDS_USER RPC_ID_USER_STATE_SYNC, RPC_ID_USER_KEYMAP_SYNC, RPC_ID_USER_CONFIG_SYNC, RPC_ID_USER_WATCHDOG_SYNC, RPC_ID_USER_KEYLOG_STR +#endif diff --git a/users/drashna/split/transport_sync.c b/users/drashna/split/transport_sync.c index 2050d687ae..6b5c384480 100644 --- a/users/drashna/split/transport_sync.c +++ b/users/drashna/split/transport_sync.c @@ -4,9 +4,6 @@ #include "transport_sync.h" #include "transactions.h" #include <string.h> -#ifdef __AVR__ -# include <avr/wdt.h> -#endif #ifdef UNICODE_COMMON_ENABLE # include "process_unicode_common.h" @@ -18,6 +15,9 @@ extern unicode_config_t unicode_config; extern audio_config_t audio_config; extern bool delayed_tasks_run; #endif +#if defined(OLED_ENABLE) && !defined(SPLIT_OLED_ENABLE) && defined(CUSTOM_OLED_DRIVER) +extern bool is_oled_enabled; +#endif #if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform) extern bool tap_toggling; #endif @@ -95,6 +95,9 @@ void user_transport_update(void) { user_state.audio_enable = is_audio_on(); user_state.audio_clicky_enable = is_clicky_on(); #endif +#if defined(OLED_ENABLE) && !defined(SPLIT_OLED_ENABLE) && defined(CUSTOM_OLED_DRIVER) + user_state.is_oled_enabled = is_oled_enabled; +#endif #if defined(CUSTOM_POINTING_DEVICE) user_state.tap_toggling = tap_toggling; #endif @@ -116,6 +119,9 @@ void user_transport_update(void) { unicode_config.input_mode = user_state.unicode_mode; typing_mode = user_state.unicode_typing_mode; #endif +#if defined(OLED_ENABLE) && !defined(SPLIT_OLED_ENABLE) && defined(CUSTOM_OLED_DRIVER) + is_oled_enabled = user_state.is_oled_enabled; +#endif #if defined(CUSTOM_POINTING_DEVICE) tap_toggling = user_state.tap_toggling; #endif @@ -226,7 +232,7 @@ void user_transport_sync(void) { } } else { if (timer_elapsed32(watchdog_timer) > 3500) { - software_reset(); + mcu_reset(); while (1) { } } diff --git a/users/drashna/split/transport_sync.h b/users/drashna/split/transport_sync.h index ceb8f81875..8bfb49bf63 100644 --- a/users/drashna/split/transport_sync.h +++ b/users/drashna/split/transport_sync.h @@ -19,6 +19,7 @@ typedef union { bool swap_hands :1; bool host_driver_disabled :1; uint8_t unicode_typing_mode :3; + bool is_oled_enabled :1; }; } user_runtime_config_t; |