summaryrefslogtreecommitdiff
path: root/protocol
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 /protocol
parenteea3b699a6cf9976fc0179633feee6d079e5db78 (diff)
Tweak time values of busywait PS/2
Diffstat (limited to 'protocol')
-rw-r--r--protocol/ps2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/protocol/ps2.c b/protocol/ps2.c
index ed45609104..4c6c2fcb27 100644
--- a/protocol/ps2.c
+++ b/protocol/ps2.c
@@ -109,12 +109,12 @@ uint8_t ps2_host_send(uint8_t data)
#endif
/* terminate a transmission if we have */
inhibit();
- _delay_us(100);
+ _delay_us(200); // at least 100us
/* start bit [1] */
data_lo();
clock_hi();
- WAIT(clock_lo, 15000, 1);
+ WAIT(clock_lo, 20000, 10); // may take 15ms at most until device starts clocking
/* data [2-9] */
for (uint8_t i = 0; i < 8; i++) {
_delay_us(15);
@@ -167,7 +167,7 @@ uint8_t ps2_host_recv_response(void)
idle();
/* wait start bit */
- wait_clock_lo(2000);
+ wait_clock_lo(25000); // command response may take 20 ms at most
data = recv_data();
inhibit();