summaryrefslogtreecommitdiff
path: root/users/drashna/split
diff options
context:
space:
mode:
Diffstat (limited to 'users/drashna/split')
-rw-r--r--users/drashna/split/split_config.h5
-rw-r--r--users/drashna/split/transport_sync.c45
2 files changed, 6 insertions, 44 deletions
diff --git a/users/drashna/split/split_config.h b/users/drashna/split/split_config.h
index 66c12392d9..21ff3829bb 100644
--- a/users/drashna/split/split_config.h
+++ b/users/drashna/split/split_config.h
@@ -7,6 +7,9 @@
#define SPLIT_LAYER_STATE_ENABLE
#define SPLIT_LED_STATE_ENABLE
#define SPLIT_MODS_ENABLE
+#ifndef POINTING_DEVICE_ENABLE
+# define SPLIT_WATCHDOG_ENABLE
+#endif
#ifdef WPM_ENABLE
# define SPLIT_WPM_ENABLE
#endif
@@ -17,5 +20,5 @@
# 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
+# define SPLIT_TRANSACTION_IDS_USER RPC_ID_USER_STATE_SYNC, RPC_ID_USER_KEYMAP_SYNC, RPC_ID_USER_CONFIG_SYNC, RPC_ID_USER_PLACEHOLDER, RPC_ID_USER_KEYLOG_STR
#endif
diff --git a/users/drashna/split/transport_sync.c b/users/drashna/split/transport_sync.c
index 11c56849eb..0284627ed2 100644
--- a/users/drashna/split/transport_sync.c
+++ b/users/drashna/split/transport_sync.c
@@ -25,11 +25,6 @@ extern bool tap_toggling;
extern bool swap_hands;
#endif
-#if defined(SPLIT_WATCHDOG_TIMEOUT)
-static bool watchdog_ping_done = false;
-static uint32_t watchdog_timer = 0;
-#endif
-
extern userspace_config_t userspace_config;
extern bool host_driver_disabled;
@@ -54,12 +49,6 @@ void user_config_sync(uint8_t initiator2target_buffer_size, const void* initiato
}
}
-#if defined(SPLIT_WATCHDOG_TIMEOUT)
-void watchdog_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
- watchdog_ping_done = true;
-}
-#endif
-
#ifdef CUSTOM_OLED_DRIVER
# include "oled/oled_stuff.h"
void keylogger_string_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) {
@@ -77,14 +66,6 @@ void keyboard_post_init_transport_sync(void) {
#ifdef CUSTOM_OLED_DRIVER
transaction_register_rpc(RPC_ID_USER_KEYLOG_STR, keylogger_string_sync);
#endif
-
-#if defined(SPLIT_WATCHDOG_TIMEOUT)
-# if defined(PROTOCOL_LUFA)
- wdt_disable();
-# endif
- transaction_register_rpc(RPC_ID_USER_WATCHDOG_SYNC, watchdog_handler);
- watchdog_timer = timer_read32();
-#endif
}
void user_transport_update(void) {
@@ -103,7 +84,7 @@ void user_transport_update(void) {
#endif
#ifdef UNICODE_COMMON_ENABLE
user_state.unicode_mode = unicode_config.input_mode;
- user_state.unicode_typing_mode = typing_mode;
+ user_state.unicode_typing_mode = unicode_typing_mode;
#endif
#ifdef SWAP_HANDS_ENABLE
user_state.swap_hands = swap_hands;
@@ -117,7 +98,7 @@ void user_transport_update(void) {
user_state.raw = transport_user_state;
#ifdef UNICODE_COMMON_ENABLE
unicode_config.input_mode = user_state.unicode_mode;
- typing_mode = user_state.unicode_typing_mode;
+ unicode_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;
@@ -219,28 +200,6 @@ void user_transport_sync(void) {
}
#endif
}
-
-#if defined(SPLIT_WATCHDOG_TIMEOUT)
- if (!watchdog_ping_done) {
- if (is_keyboard_master()) {
- if (timer_elapsed32(watchdog_timer) > 100) {
- uint8_t any_data = 1;
- if (transaction_rpc_send(RPC_ID_USER_WATCHDOG_SYNC, sizeof(any_data), &any_data)) {
- watchdog_ping_done = true; // successful ping
- } else {
- dprint("Watchdog ping failed!\n");
- }
- watchdog_timer = timer_read32();
- }
- } else {
- if (timer_elapsed32(watchdog_timer) > 3500) {
- mcu_reset();
- while (1) {
- }
- }
- }
- }
-#endif
}
void housekeeping_task_transport_sync(void) {