summaryrefslogtreecommitdiffstats
path: root/keyboards
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-11-16 20:42:53 +0100
committerGitHub <noreply@github.com>2016-11-16 20:42:53 +0100
commit17e1a4f825fd19b4e25043bb9252fe701335a1f3 (patch)
tree9e2d4985b2ed51ab7079ffb0b3faf1793a9a7a77 /keyboards
parent7541122cade1b49a2e236bef9332ac815fd3177c (diff)
parentc06e2486abda43205a490fc6b233f72f34667857 (diff)
downloadqmk_firmware-17e1a4f825fd19b4e25043bb9252fe701335a1f3.tar.gz
qmk_firmware-17e1a4f825fd19b4e25043bb9252fe701335a1f3.tar.xz
Merge pull request #866 from fredizzimo/infinity60_clockfixes
Increase the infinity60 system tick frequency
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/infinity60/chconf.h2
-rw-r--r--keyboards/infinity60/matrix.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/keyboards/infinity60/chconf.h b/keyboards/infinity60/chconf.h
index 43c845739..d9114ec85 100644
--- a/keyboards/infinity60/chconf.h
+++ b/keyboards/infinity60/chconf.h
@@ -48,7 +48,7 @@
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
-#define CH_CFG_ST_FREQUENCY 1000
+#define CH_CFG_ST_FREQUENCY 100000
/**
* @brief Time delta constant for the tick-less mode.
diff --git a/keyboards/infinity60/matrix.c b/keyboards/infinity60/matrix.c
index 62c165aa5..d2f185288 100644
--- a/keyboards/infinity60/matrix.c
+++ b/keyboards/infinity60/matrix.c
@@ -96,7 +96,12 @@ uint8_t matrix_scan(void)
}
#endif
- wait_us(1); // need wait to settle pin state
+ // need wait to settle pin state
+ // if you wait too short, or have a too high update rate
+ // the keyboard might freeze, or there might not be enough
+ // processing power to update the LCD screen properly.
+ // 20us, or two ticks at 100000Hz seems to be OK
+ wait_us(20);
// read col data
data = (palReadPort(GPIOD)>>1);