浏览代码

Merge pull request #903 from priyadi/ps2_init_delay

Make PS2 init delay configurable.
Jack Humbert 8 年之前
父节点
当前提交
7a1eca784f
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      tmk_core/protocol/ps2_mouse.c

+ 4 - 1
tmk_core/protocol/ps2_mouse.c

@@ -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);