]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Increase the infinity60 system tick frequency
authorFred Sundvik <fsundvik@gmail.com>
Sat, 5 Nov 2016 20:45:21 +0000 (22:45 +0200)
committerFred Sundvik <fsundvik@gmail.com>
Sat, 5 Nov 2016 20:45:21 +0000 (22:45 +0200)
keyboards/infinity60/chconf.h
keyboards/infinity60/matrix.c

index 43c845739a6a406b166340c5c39a5deec1f544ae..d9114ec858bc64011903be91318060531d7ba431 100644 (file)
@@ -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.
index 62c165aa5339747179f83b5be3c74f0ab0d82291..d2f1852885dfc0b92b40c1a79288743974f3abde 100644 (file)
@@ -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);