]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Make PS2 init delay configurable. Some devices are not fully powered up
authorPriyadi Iman Nurcahyo <priyadi@priyadi.net>
Sat, 26 Nov 2016 06:24:53 +0000 (13:24 +0700)
committerPriyadi Iman Nurcahyo <priyadi@priyadi.net>
Sat, 26 Nov 2016 06:24:53 +0000 (13:24 +0700)
after 1s.

tmk_core/protocol/ps2_mouse.c

index c3e8b3c1c3354753cc3ce12d902c6978caf8af16..82f6966e8ed7697011dd738c280f2f26c4f6bfc8 100644 (file)
@@ -26,6 +26,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "print.h"
 #include "debug.h"
 
+#ifndef PS2_INIT_DELAY
+#define PS2_INIT_DELAY 1000
+#endif
 
 static report_mouse_t mouse_report = {};
 
@@ -39,7 +42,7 @@ uint8_t ps2_mouse_init(void) {
 
     ps2_host_init();
 
-    _delay_ms(1000);    // wait for powering up
+    _delay_ms(PS2_INIT_DELAY);    // wait for powering up
 
     // send Reset
     rcv = ps2_host_send(0xFF);