diff options
Diffstat (limited to 'protocol/ps2.c')
| -rw-r--r-- | protocol/ps2.c | 6 |
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(); |
