From c93935f243dc7170dadfc2daf95e055fec56df6d Mon Sep 17 00:00:00 2001 From: Simon Arlott <70171+nomis@users.noreply.github.com> Date: Mon, 27 Dec 2021 03:04:26 +0000 Subject: Durgod: Increase scan rate by using wait_us GPT timer (#14091) Lower the tick rate from 10kHz to 1kHz (otherwise all the extra interrupts reduce the achievable scan rate). Enable the WAIT_US_TIMER using GPT TIM3. Observed scan rate on the K320 is increased from 625Hz to 2090-2120Hz. --- keyboards/durgod/k3x0/config.h | 3 +++ keyboards/durgod/k3x0/halconf.h | 2 ++ 2 files changed, 5 insertions(+) (limited to 'keyboards/durgod/k3x0') diff --git a/keyboards/durgod/k3x0/config.h b/keyboards/durgod/k3x0/config.h index ef73a71016..af543bb970 100644 --- a/keyboards/durgod/k3x0/config.h +++ b/keyboards/durgod/k3x0/config.h @@ -23,6 +23,9 @@ #define VENDOR_ID 0xD60D #define MANUFACTURER Hoksi Technology +#define USB_POLLING_INTERVAL_MS 1 +#define WAIT_US_TIMER GPTD3 + /* key matrix size (rows in specific keyboard variant) */ #define MATRIX_COLS 16 diff --git a/keyboards/durgod/k3x0/halconf.h b/keyboards/durgod/k3x0/halconf.h index fa20fe30a9..d2a9d8c7c0 100644 --- a/keyboards/durgod/k3x0/halconf.h +++ b/keyboards/durgod/k3x0/halconf.h @@ -19,4 +19,6 @@ #define HAL_USE_PAL TRUE #define PAL_USE_CALLBACKS TRUE +#define HAL_USE_GPT TRUE + #include_next -- cgit v1.2.3