From 4a87af0e9af046d5fc00d930476920c0c34a57a7 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 29 Nov 2022 11:43:42 -0800 Subject: [Keymap] Drashna updates for 0.19 (#19175) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix up bastardkb boards since blackpill support is officially added. * Check for blackpill version, not elite c. * Add checks in chibiOS config since multiple ARM controllers supported. * Rework rules.mk for keymaps to better handle arm vs avr support * Start moving away from `matrix_*_*` functions. * `housekeeping_task_*` instead of `matrix_scan_*` * `keyboard_(pre|post)_init_*` instead of `matrix_init_*` * Add ℂℴmⅈℂ unicode input method. * Clean up unicode code to be more compact and flexible. * Remove/move Pro Micro LED commands to userspace and better filter them * Fixup OLED code * Use newer quantum keycode functions/preprocessors rather than manual bit manipulation * Make unicode mode render much more compact/simple. * Make qmk secrets more self contained * Remove custom implementation of split watchdog --- users/drashna/split/transport_sync.c | 45 ++---------------------------------- 1 file changed, 2 insertions(+), 43 deletions(-) (limited to 'users/drashna/split/transport_sync.c') 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) { -- cgit v1.2.3