summaryrefslogtreecommitdiff
path: root/users/drashna/split/transport_sync.c
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-11-29 19:44:26 +0000
committerQMK Bot <hello@qmk.fm>2022-11-29 19:44:26 +0000
commitd648eb42caa633ab411da93d2bbe9c3eacaa8172 (patch)
treed534ed33cdfac430a19818c514dff90b337b1c8a /users/drashna/split/transport_sync.c
parentc146563f4b12d8ef1446318a65c61dac1b197b23 (diff)
parent4a87af0e9af046d5fc00d930476920c0c34a57a7 (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'users/drashna/split/transport_sync.c')
-rw-r--r--users/drashna/split/transport_sync.c45
1 files changed, 2 insertions, 43 deletions
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) {