aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-11-02 03:06:51 +0900
committertmk <nobody@nowhere>2013-11-02 03:07:59 +0900
commit1591764cfbc39e73c6f32e9b805d596379866ff0 (patch)
tree4579897cd2b9a862236340b29ab1a1a9f830019a
parenteea3b699a6cf9976fc0179633feee6d079e5db78 (diff)
downloadqmk_firmware-1591764cfbc39e73c6f32e9b805d596379866ff0.tar.gz
qmk_firmware-1591764cfbc39e73c6f32e9b805d596379866ff0.zip
Tweak time values of busywait PS/2
-rw-r--r--protocol/ps2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/protocol/ps2.c b/protocol/ps2.c
index ed4560910..4c6c2fcb2 100644
--- a/protocol/ps2.c
+++ b/protocol/ps2.c
@@ -109,12 +109,12 @@ uint8_t ps2_host_send(uint8_t data)
109#endif 109#endif
110 /* terminate a transmission if we have */ 110 /* terminate a transmission if we have */
111 inhibit(); 111 inhibit();
112 _delay_us(100); 112 _delay_us(200); // at least 100us
113 113
114 /* start bit [1] */ 114 /* start bit [1] */
115 data_lo(); 115 data_lo();
116 clock_hi(); 116 clock_hi();
117 WAIT(clock_lo, 15000, 1); 117 WAIT(clock_lo, 20000, 10); // may take 15ms at most until device starts clocking
118 /* data [2-9] */ 118 /* data [2-9] */
119 for (uint8_t i = 0; i < 8; i++) { 119 for (uint8_t i = 0; i < 8; i++) {
120 _delay_us(15); 120 _delay_us(15);
@@ -167,7 +167,7 @@ uint8_t ps2_host_recv_response(void)
167 idle(); 167 idle();
168 168
169 /* wait start bit */ 169 /* wait start bit */
170 wait_clock_lo(2000); 170 wait_clock_lo(25000); // command response may take 20 ms at most
171 data = recv_data(); 171 data = recv_data();
172 172
173 inhibit(); 173 inhibit();