From a0bcb39c62108228d98cc9da080bfb7266d509c9 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 4 Mar 2023 23:54:31 +1100 Subject: [PATCH 1/4] Swap activity timers to sync equivalent APIs. --- quantum/keyboard.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/quantum/keyboard.c b/quantum/keyboard.c index ec2f2e4496ff..b1f160b3f530 100644 --- a/quantum/keyboard.c +++ b/quantum/keyboard.c @@ -114,7 +114,7 @@ uint32_t last_input_activity_time(void) { return last_input_modification_time; } uint32_t last_input_activity_elapsed(void) { - return timer_elapsed32(last_input_modification_time); + return sync_timer_elapsed32(last_input_modification_time); } static uint32_t last_matrix_modification_time = 0; @@ -122,10 +122,10 @@ uint32_t last_matrix_activity_time(void) { return last_matrix_modification_time; } uint32_t last_matrix_activity_elapsed(void) { - return timer_elapsed32(last_matrix_modification_time); + return sync_timer_elapsed32(last_matrix_modification_time); } void last_matrix_activity_trigger(void) { - last_matrix_modification_time = last_input_modification_time = timer_read32(); + last_matrix_modification_time = last_input_modification_time = sync_timer_read32(); } static uint32_t last_encoder_modification_time = 0; @@ -133,10 +133,10 @@ uint32_t last_encoder_activity_time(void) { return last_encoder_modification_time; } uint32_t last_encoder_activity_elapsed(void) { - return timer_elapsed32(last_encoder_modification_time); + return sync_timer_elapsed32(last_encoder_modification_time); } void last_encoder_activity_trigger(void) { - last_encoder_modification_time = last_input_modification_time = timer_read32(); + last_encoder_modification_time = last_input_modification_time = sync_timer_read32(); } // Only enable this if console is enabled to print to From 312536e9308a777ab0984af260bbb6bd48f65532 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 20 Mar 2023 15:00:34 +1100 Subject: [PATCH 2/4] Sync activity timestamps. --- docs/feature_split_keyboard.md | 6 ++++ keyboards/tzarc/djinn/config.h | 3 +- keyboards/tzarc/djinn/djinn.c | 21 +++++-------- keyboards/tzarc/djinn/djinn.h | 3 +- keyboards/tzarc/djinn/djinn_portscan_matrix.c | 4 +-- keyboards/tzarc/djinn/djinn_split_sync.c | 5 +-- keyboards/tzarc/djinn/djinn_usbpd.c | 4 +-- .../tzarc/djinn/keymaps/default/config.h | 6 ++-- keyboards/tzarc/djinn/keymaps/via/config.h | 6 ++-- keyboards/tzarc/ghoul/config.h | 7 ++--- keyboards/tzarc/ghoul/rev1/rp2040/config.h | 3 +- keyboards/tzarc/ghoul/rev1/stm32/config.h | 3 +- quantum/keyboard.c | 6 ++++ quantum/keyboard.h | 2 ++ quantum/split_common/transaction_id_define.h | 4 +++ quantum/split_common/transactions.c | 31 +++++++++++++++++++ quantum/split_common/transport.h | 12 +++++++ 17 files changed, 88 insertions(+), 38 deletions(-) diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md index c095c8712fb6..1705ea922217 100644 --- a/docs/feature_split_keyboard.md +++ b/docs/feature_split_keyboard.md @@ -300,6 +300,12 @@ This enables transmitting the pointing device status to the master side of the s This enables triggering of haptic feedback on the slave side of the split keyboard. For DRV2605L this will send the mode, but for solenoids it is expected that the desired mode is already set up on the slave. +```c +#define SPLIT_ACTIVITY_ENABLE +``` + +This synchronizes the activity timestamps between sides of the split keyboard, allowing for activity timeouts to occur. + ### Custom data sync between sides :id=custom-data-sync QMK's split transport allows for arbitrary data transactions at both the keyboard and user levels. This is modelled on a remote procedure call, with the master invoking a function on the slave side, with the ability to send data from master to slave, process it slave side, and send data back from slave to master. diff --git a/keyboards/tzarc/djinn/config.h b/keyboards/tzarc/djinn/config.h index e8b2abc1f63f..c1c2f6832a37 100644 --- a/keyboards/tzarc/djinn/config.h +++ b/keyboards/tzarc/djinn/config.h @@ -1,4 +1,4 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) +// Copyright 2018-2023 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -16,6 +16,7 @@ #define SPLIT_LED_STATE_ENABLE #define SPLIT_MODS_ENABLE #define SPLIT_WPM_ENABLE +#define SPLIT_ACTIVITY_ENABLE // SPI Configuration #define SPI_DRIVER SPID3 diff --git a/keyboards/tzarc/djinn/djinn.c b/keyboards/tzarc/djinn/djinn.c index 93b1ee775e1f..17e5833ee9ef 100644 --- a/keyboards/tzarc/djinn/djinn.c +++ b/keyboards/tzarc/djinn/djinn.c @@ -1,4 +1,4 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) +// Copyright 2018-2023 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #include #include "quantum.h" @@ -74,7 +74,6 @@ void keyboard_post_init_kb(void) { qp_init(lcd, QP_ROTATION_0); // Turn on the LCD and clear the display - kb_state.lcd_power = 1; qp_power(lcd, true); qp_rect(lcd, 0, 0, 239, 319, HSV_BLACK, true); @@ -187,18 +186,14 @@ void housekeeping_task_kb(void) { } // Turn on/off the LCD - static bool lcd_on = false; - if (lcd_on != (bool)kb_state.lcd_power) { - lcd_on = (bool)kb_state.lcd_power; - qp_power(lcd, lcd_on); - } + bool peripherals_on = last_input_activity_elapsed() < LCD_ACTIVITY_TIMEOUT; // Enable/disable RGB - if (lcd_on) { + if (peripherals_on) { // Turn on RGB writePinHigh(RGB_POWER_ENABLE_PIN); // Modify the RGB state if different to the LCD state - if (rgb_matrix_is_enabled() != lcd_on) { + if (rgb_matrix_is_enabled() != peripherals_on) { // Wait for a small amount of time to allow the RGB capacitors to charge, before enabling RGB output wait_ms(10); // Enable RGB @@ -208,21 +203,21 @@ void housekeeping_task_kb(void) { // Turn off RGB writePinLow(RGB_POWER_ENABLE_PIN); // Disable the PWM output for the RGB - if (rgb_matrix_is_enabled() != lcd_on) { + if (rgb_matrix_is_enabled() != peripherals_on) { rgb_matrix_disable_noeeprom(); } } // Match the backlight to the LCD state - if (is_keyboard_master() && is_backlight_enabled() != lcd_on) { - if (lcd_on) + if (is_keyboard_master() && is_backlight_enabled() != peripherals_on) { + if (peripherals_on) backlight_enable(); else backlight_disable(); } // Draw the UI - if (kb_state.lcd_power) { + if (peripherals_on) { draw_ui_user(false); } diff --git a/keyboards/tzarc/djinn/djinn.h b/keyboards/tzarc/djinn/djinn.h index ff6b555e8e52..70aa34ff08fb 100644 --- a/keyboards/tzarc/djinn/djinn.h +++ b/keyboards/tzarc/djinn/djinn.h @@ -1,4 +1,4 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) +// Copyright 2018-2023 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include "quantum.h" @@ -20,7 +20,6 @@ const char* usbpd_str(usbpd_allowance_t allowance); #pragma pack(push) #pragma pack(1) typedef struct kb_runtime_config { - unsigned lcd_power : 1; usbpd_allowance_t current_setting : 2; } kb_runtime_config; #pragma pack(pop) diff --git a/keyboards/tzarc/djinn/djinn_portscan_matrix.c b/keyboards/tzarc/djinn/djinn_portscan_matrix.c index 6fcfd48bbaf7..ca3c797f5e14 100644 --- a/keyboards/tzarc/djinn/djinn_portscan_matrix.c +++ b/keyboards/tzarc/djinn/djinn_portscan_matrix.c @@ -1,4 +1,4 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) +// Copyright 2018-2023 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #include "quantum.h" #include @@ -114,4 +114,4 @@ void matrix_wait_for_interrupt(void) { writePinHigh(col_pins[i]); setPinInputHigh(col_pins[i]); } -} \ No newline at end of file +} diff --git a/keyboards/tzarc/djinn/djinn_split_sync.c b/keyboards/tzarc/djinn/djinn_split_sync.c index 3c7a58d155d1..8b10e88b4b24 100644 --- a/keyboards/tzarc/djinn/djinn_split_sync.c +++ b/keyboards/tzarc/djinn/djinn_split_sync.c @@ -1,4 +1,4 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) +// Copyright 2018-2023 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #include #include "quantum.h" @@ -13,9 +13,6 @@ void kb_state_update(void) { if (is_keyboard_master()) { // Modify allowed current limits usbpd_update(); - - // Turn off the LCD if there's been no matrix activity - kb_state.lcd_power = (last_input_activity_elapsed() < LCD_ACTIVITY_TIMEOUT) ? 1 : 0; } } diff --git a/keyboards/tzarc/djinn/djinn_usbpd.c b/keyboards/tzarc/djinn/djinn_usbpd.c index b0bf166b7c01..fd90f1a3058d 100644 --- a/keyboards/tzarc/djinn/djinn_usbpd.c +++ b/keyboards/tzarc/djinn/djinn_usbpd.c @@ -1,4 +1,4 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) +// Copyright 2018-2023 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #include #include "quantum.h" @@ -25,4 +25,4 @@ void usbpd_update(void) { kb_state.current_setting = allowance; } } -} \ No newline at end of file +} diff --git a/keyboards/tzarc/djinn/keymaps/default/config.h b/keyboards/tzarc/djinn/keymaps/default/config.h index b40936ff9343..fb2a3306b04b 100644 --- a/keyboards/tzarc/djinn/keymaps/default/config.h +++ b/keyboards/tzarc/djinn/keymaps/default/config.h @@ -1,9 +1,9 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) +// Copyright 2018-2023 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once // Uncomment the following if your board uses 1.5A and 3.0A hold current fuses. -//#define DJINN_SUPPORTS_3A_FUSE +// #define DJINN_SUPPORTS_3A_FUSE // Encoder settings #define ENCODER_RESOLUTION 2 @@ -60,4 +60,4 @@ #define ENABLE_RGB_MATRIX_SPLASH #define ENABLE_RGB_MATRIX_MULTISPLASH #define ENABLE_RGB_MATRIX_SOLID_SPLASH -#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH \ No newline at end of file +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/tzarc/djinn/keymaps/via/config.h b/keyboards/tzarc/djinn/keymaps/via/config.h index b40936ff9343..fb2a3306b04b 100644 --- a/keyboards/tzarc/djinn/keymaps/via/config.h +++ b/keyboards/tzarc/djinn/keymaps/via/config.h @@ -1,9 +1,9 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) +// Copyright 2018-2023 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once // Uncomment the following if your board uses 1.5A and 3.0A hold current fuses. -//#define DJINN_SUPPORTS_3A_FUSE +// #define DJINN_SUPPORTS_3A_FUSE // Encoder settings #define ENCODER_RESOLUTION 2 @@ -60,4 +60,4 @@ #define ENABLE_RGB_MATRIX_SPLASH #define ENABLE_RGB_MATRIX_MULTISPLASH #define ENABLE_RGB_MATRIX_SOLID_SPLASH -#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH \ No newline at end of file +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/tzarc/ghoul/config.h b/keyboards/tzarc/ghoul/config.h index e08b8beee30a..94dec03095e7 100644 --- a/keyboards/tzarc/ghoul/config.h +++ b/keyboards/tzarc/ghoul/config.h @@ -1,12 +1,11 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) +// Copyright 2018-2023 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-3.0-or-later #pragma once - // Matrix #define MATRIX_SHIFT_REGISTER_COUNT 5 -//#define MATRIX_ROWS 6 // actually defined in info.json: 5 shift registers, plus one row for extras (i.e. encoder pushbutton read) -//#define MATRIX_COLS 8 // actually defined in info.json: 8 bits per register +// #define MATRIX_ROWS 6 // actually defined in info.json: 5 shift registers, plus one row for extras (i.e. encoder pushbutton read) +// #define MATRIX_COLS 8 // actually defined in info.json: 8 bits per register // EEPROM configuration #define EXTERNAL_EEPROM_BYTE_COUNT 8192 diff --git a/keyboards/tzarc/ghoul/rev1/rp2040/config.h b/keyboards/tzarc/ghoul/rev1/rp2040/config.h index 1a101d5dc4c2..5cfb54db4b53 100644 --- a/keyboards/tzarc/ghoul/rev1/rp2040/config.h +++ b/keyboards/tzarc/ghoul/rev1/rp2040/config.h @@ -1,8 +1,7 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) +// Copyright 2018-2023 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-3.0-or-later #pragma once - // Matrix configuration #define SPI_MATRIX_CHIP_SELECT_PIN GP21 #define SPI_MATRIX_DIVISOR 16 diff --git a/keyboards/tzarc/ghoul/rev1/stm32/config.h b/keyboards/tzarc/ghoul/rev1/stm32/config.h index 53a370437d08..6d2d51d76a86 100644 --- a/keyboards/tzarc/ghoul/rev1/stm32/config.h +++ b/keyboards/tzarc/ghoul/rev1/stm32/config.h @@ -1,8 +1,7 @@ -// Copyright 2018-2022 Nick Brassel (@tzarc) +// Copyright 2018-2023 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-3.0-or-later #pragma once - // Matrix configuration #define SPI_MATRIX_CHIP_SELECT_PIN C4 #define SPI_MATRIX_DIVISOR 32 diff --git a/quantum/keyboard.c b/quantum/keyboard.c index b1f160b3f530..6e7d40ddc745 100644 --- a/quantum/keyboard.c +++ b/quantum/keyboard.c @@ -139,6 +139,12 @@ void last_encoder_activity_trigger(void) { last_encoder_modification_time = last_input_modification_time = sync_timer_read32(); } +void set_activity_timestamps(uint32_t matrix_timestamp, uint32_t encoder_timestamp) { + last_matrix_modification_time = matrix_timestamp; + last_encoder_modification_time = encoder_timestamp; + last_input_modification_time = MAX(matrix_timestamp, encoder_timestamp); +} + // Only enable this if console is enabled to print to #if defined(DEBUG_MATRIX_SCAN_RATE) static uint32_t matrix_timer = 0; diff --git a/quantum/keyboard.h b/quantum/keyboard.h index d0b52dd13a0d..caf0fbd4661f 100644 --- a/quantum/keyboard.h +++ b/quantum/keyboard.h @@ -120,6 +120,8 @@ uint32_t last_matrix_activity_elapsed(void); // Number of milliseconds since the uint32_t last_encoder_activity_time(void); // Timestamp of the last encoder activity uint32_t last_encoder_activity_elapsed(void); // Number of milliseconds since the last encoder activity +void set_activity_timestamps(uint32_t matrix_timestamp, uint32_t encoder_timestamp); // Set the timestamps of the last matrix and encoder activity + uint32_t get_matrix_scan_rate(void); #ifdef __cplusplus diff --git a/quantum/split_common/transaction_id_define.h b/quantum/split_common/transaction_id_define.h index 18d3826b838c..4932530aa39b 100644 --- a/quantum/split_common/transaction_id_define.h +++ b/quantum/split_common/transaction_id_define.h @@ -92,6 +92,10 @@ enum serial_transaction_id { PUT_HAPTIC, #endif // defined(HAPTIC_ENABLE) && defined(SPLIT_HAPTIC_ENABLE) +#if defined(SPLIT_ACTIVITY_ENABLE) + PUT_ACTIVITY, +#endif // SPLIT_ACTIVITY_ENABLE + #if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) PUT_RPC_INFO, PUT_RPC_REQ_DATA, diff --git a/quantum/split_common/transactions.c b/quantum/split_common/transactions.c index 8e1961b58623..1745eb6821c2 100644 --- a/quantum/split_common/transactions.c +++ b/quantum/split_common/transactions.c @@ -790,6 +790,34 @@ static void haptic_handlers_slave(matrix_row_t master_matrix[], matrix_row_t sla #endif // defined(HAPTIC_ENABLE) && defined(SPLIT_HAPTIC_ENABLE) +#if defined(SPLIT_ACTIVITY_ENABLE) + +static bool activity_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_update = 0; + split_slave_activity_sync_t activity_sync; + activity_sync.matrix_timestamp = last_matrix_activity_time(); + activity_sync.encoder_timestamp = last_encoder_activity_time(); + return send_if_data_mismatch(PUT_ACTIVITY, &last_update, &activity_sync, &split_shmem->activity_sync, sizeof(activity_sync)); +} + +static void activity_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + set_activity_timestamps(split_shmem->activity_sync.matrix_timestamp, split_shmem->activity_sync.encoder_timestamp); +} + +// clang-format off +# define TRANSACTIONS_ACTIVITY_MASTER() TRANSACTION_HANDLER_MASTER(activity) +# define TRANSACTIONS_ACTIVITY_SLAVE() TRANSACTION_HANDLER_SLAVE(activity) +# define TRANSACTIONS_ACTIVITY_REGISTRATIONS [PUT_ACTIVITY] = trans_initiator2target_initializer(activity_sync), +// clang-format on + +#else // defined(SPLIT_ACTIVITY_ENABLE) + +# define TRANSACTIONS_ACTIVITY_MASTER() +# define TRANSACTIONS_ACTIVITY_SLAVE() +# define TRANSACTIONS_ACTIVITY_REGISTRATIONS + +#endif // defined(SPLIT_ACTIVITY_ENABLE) + //////////////////////////////////////////////////// split_transaction_desc_t split_transaction_table[NUM_TOTAL_TRANSACTIONS] = { @@ -818,6 +846,7 @@ split_transaction_desc_t split_transaction_table[NUM_TOTAL_TRANSACTIONS] = { TRANSACTIONS_POINTING_REGISTRATIONS TRANSACTIONS_WATCHDOG_REGISTRATIONS TRANSACTIONS_HAPTIC_REGISTRATIONS + TRANSACTIONS_ACTIVITY_REGISTRATIONS // clang-format on #if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) @@ -846,6 +875,7 @@ bool transactions_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix TRANSACTIONS_POINTING_MASTER(); TRANSACTIONS_WATCHDOG_MASTER(); TRANSACTIONS_HAPTIC_MASTER(); + TRANSACTIONS_ACTIVITY_MASTER(); return true; } @@ -867,6 +897,7 @@ void transactions_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[ TRANSACTIONS_POINTING_SLAVE(); TRANSACTIONS_WATCHDOG_SLAVE(); TRANSACTIONS_HAPTIC_SLAVE(); + TRANSACTIONS_ACTIVITY_SLAVE(); } #if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) diff --git a/quantum/split_common/transport.h b/quantum/split_common/transport.h index adee4470d22b..8f8c38461e25 100644 --- a/quantum/split_common/transport.h +++ b/quantum/split_common/transport.h @@ -122,6 +122,14 @@ typedef struct _split_slave_haptic_sync_t { } split_slave_haptic_sync_t; #endif // defined(HAPTIC_ENABLE) && defined(SPLIT_HAPTIC_ENABLE) +#if defined(SPLIT_ACTIVITY_ENABLE) +# include "keyboard.h" +typedef struct _split_slave_activity_sync_t { + uint32_t matrix_timestamp; + uint32_t encoder_timestamp; +} split_slave_activity_sync_t; +#endif // defined(SPLIT_ACTIVITY_ENABLE) + #if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) typedef struct _rpc_sync_info_t { uint8_t checksum; @@ -204,6 +212,10 @@ typedef struct _split_shared_memory_t { split_slave_haptic_sync_t haptic_sync; #endif // defined(HAPTIC_ENABLE) +#if defined(SPLIT_ACTIVITY_ENABLE) + split_slave_activity_sync_t activity_sync; +#endif // defined(SPLIT_ACTIVITY_ENABLE) + #if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) rpc_sync_info_t rpc_info; uint8_t rpc_m2s_buffer[RPC_M2S_BUFFER_SIZE]; From 9bfd21d8b75890cb3e4a030d5440fdfb91e3074e Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 20 Mar 2023 17:21:27 +1100 Subject: [PATCH 3/4] Revert purely formatting changes. --- keyboards/tzarc/djinn/djinn_portscan_matrix.c | 4 ++-- keyboards/tzarc/djinn/djinn_usbpd.c | 4 ++-- keyboards/tzarc/djinn/keymaps/default/config.h | 6 +++--- keyboards/tzarc/djinn/keymaps/via/config.h | 6 +++--- keyboards/tzarc/ghoul/config.h | 7 ++++--- keyboards/tzarc/ghoul/rev1/rp2040/config.h | 3 ++- keyboards/tzarc/ghoul/rev1/stm32/config.h | 3 ++- 7 files changed, 18 insertions(+), 15 deletions(-) diff --git a/keyboards/tzarc/djinn/djinn_portscan_matrix.c b/keyboards/tzarc/djinn/djinn_portscan_matrix.c index ca3c797f5e14..6fcfd48bbaf7 100644 --- a/keyboards/tzarc/djinn/djinn_portscan_matrix.c +++ b/keyboards/tzarc/djinn/djinn_portscan_matrix.c @@ -1,4 +1,4 @@ -// Copyright 2018-2023 Nick Brassel (@tzarc) +// Copyright 2018-2022 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #include "quantum.h" #include @@ -114,4 +114,4 @@ void matrix_wait_for_interrupt(void) { writePinHigh(col_pins[i]); setPinInputHigh(col_pins[i]); } -} +} \ No newline at end of file diff --git a/keyboards/tzarc/djinn/djinn_usbpd.c b/keyboards/tzarc/djinn/djinn_usbpd.c index fd90f1a3058d..b0bf166b7c01 100644 --- a/keyboards/tzarc/djinn/djinn_usbpd.c +++ b/keyboards/tzarc/djinn/djinn_usbpd.c @@ -1,4 +1,4 @@ -// Copyright 2018-2023 Nick Brassel (@tzarc) +// Copyright 2018-2022 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #include #include "quantum.h" @@ -25,4 +25,4 @@ void usbpd_update(void) { kb_state.current_setting = allowance; } } -} +} \ No newline at end of file diff --git a/keyboards/tzarc/djinn/keymaps/default/config.h b/keyboards/tzarc/djinn/keymaps/default/config.h index fb2a3306b04b..b40936ff9343 100644 --- a/keyboards/tzarc/djinn/keymaps/default/config.h +++ b/keyboards/tzarc/djinn/keymaps/default/config.h @@ -1,9 +1,9 @@ -// Copyright 2018-2023 Nick Brassel (@tzarc) +// Copyright 2018-2022 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once // Uncomment the following if your board uses 1.5A and 3.0A hold current fuses. -// #define DJINN_SUPPORTS_3A_FUSE +//#define DJINN_SUPPORTS_3A_FUSE // Encoder settings #define ENCODER_RESOLUTION 2 @@ -60,4 +60,4 @@ #define ENABLE_RGB_MATRIX_SPLASH #define ENABLE_RGB_MATRIX_MULTISPLASH #define ENABLE_RGB_MATRIX_SOLID_SPLASH -#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH \ No newline at end of file diff --git a/keyboards/tzarc/djinn/keymaps/via/config.h b/keyboards/tzarc/djinn/keymaps/via/config.h index fb2a3306b04b..b40936ff9343 100644 --- a/keyboards/tzarc/djinn/keymaps/via/config.h +++ b/keyboards/tzarc/djinn/keymaps/via/config.h @@ -1,9 +1,9 @@ -// Copyright 2018-2023 Nick Brassel (@tzarc) +// Copyright 2018-2022 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once // Uncomment the following if your board uses 1.5A and 3.0A hold current fuses. -// #define DJINN_SUPPORTS_3A_FUSE +//#define DJINN_SUPPORTS_3A_FUSE // Encoder settings #define ENCODER_RESOLUTION 2 @@ -60,4 +60,4 @@ #define ENABLE_RGB_MATRIX_SPLASH #define ENABLE_RGB_MATRIX_MULTISPLASH #define ENABLE_RGB_MATRIX_SOLID_SPLASH -#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH \ No newline at end of file diff --git a/keyboards/tzarc/ghoul/config.h b/keyboards/tzarc/ghoul/config.h index 94dec03095e7..e08b8beee30a 100644 --- a/keyboards/tzarc/ghoul/config.h +++ b/keyboards/tzarc/ghoul/config.h @@ -1,11 +1,12 @@ -// Copyright 2018-2023 Nick Brassel (@tzarc) +// Copyright 2018-2022 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-3.0-or-later #pragma once + // Matrix #define MATRIX_SHIFT_REGISTER_COUNT 5 -// #define MATRIX_ROWS 6 // actually defined in info.json: 5 shift registers, plus one row for extras (i.e. encoder pushbutton read) -// #define MATRIX_COLS 8 // actually defined in info.json: 8 bits per register +//#define MATRIX_ROWS 6 // actually defined in info.json: 5 shift registers, plus one row for extras (i.e. encoder pushbutton read) +//#define MATRIX_COLS 8 // actually defined in info.json: 8 bits per register // EEPROM configuration #define EXTERNAL_EEPROM_BYTE_COUNT 8192 diff --git a/keyboards/tzarc/ghoul/rev1/rp2040/config.h b/keyboards/tzarc/ghoul/rev1/rp2040/config.h index 5cfb54db4b53..1a101d5dc4c2 100644 --- a/keyboards/tzarc/ghoul/rev1/rp2040/config.h +++ b/keyboards/tzarc/ghoul/rev1/rp2040/config.h @@ -1,7 +1,8 @@ -// Copyright 2018-2023 Nick Brassel (@tzarc) +// Copyright 2018-2022 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-3.0-or-later #pragma once + // Matrix configuration #define SPI_MATRIX_CHIP_SELECT_PIN GP21 #define SPI_MATRIX_DIVISOR 16 diff --git a/keyboards/tzarc/ghoul/rev1/stm32/config.h b/keyboards/tzarc/ghoul/rev1/stm32/config.h index 6d2d51d76a86..53a370437d08 100644 --- a/keyboards/tzarc/ghoul/rev1/stm32/config.h +++ b/keyboards/tzarc/ghoul/rev1/stm32/config.h @@ -1,7 +1,8 @@ -// Copyright 2018-2023 Nick Brassel (@tzarc) +// Copyright 2018-2022 Nick Brassel (@tzarc) // SPDX-License-Identifier: GPL-3.0-or-later #pragma once + // Matrix configuration #define SPI_MATRIX_CHIP_SELECT_PIN C4 #define SPI_MATRIX_DIVISOR 32 From d98e14760a3a2446075b975e904bad3828576869 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 21 Mar 2023 11:16:55 +1100 Subject: [PATCH 4/4] Update quantum/split_common/transactions.c Co-authored-by: Stefan Kerkmann --- quantum/split_common/transactions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/split_common/transactions.c b/quantum/split_common/transactions.c index 1745eb6821c2..ec34bbba60c3 100644 --- a/quantum/split_common/transactions.c +++ b/quantum/split_common/transactions.c @@ -806,7 +806,7 @@ static void activity_handlers_slave(matrix_row_t master_matrix[], matrix_row_t s // clang-format off # define TRANSACTIONS_ACTIVITY_MASTER() TRANSACTION_HANDLER_MASTER(activity) -# define TRANSACTIONS_ACTIVITY_SLAVE() TRANSACTION_HANDLER_SLAVE(activity) +# define TRANSACTIONS_ACTIVITY_SLAVE() TRANSACTION_HANDLER_SLAVE_AUTOLOCK(activity) # define TRANSACTIONS_ACTIVITY_REGISTRATIONS [PUT_ACTIVITY] = trans_initiator2target_initializer(activity_sync), // clang-format on