aboutsummaryrefslogtreecommitdiff
path: root/drivers/ps2/ps2_busywait.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ps2/ps2_busywait.c')
-rw-r--r--drivers/ps2/ps2_busywait.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ps2/ps2_busywait.c b/drivers/ps2/ps2_busywait.c
index 983194eea..a42609015 100644
--- a/drivers/ps2/ps2_busywait.c
+++ b/drivers/ps2/ps2_busywait.c
@@ -125,11 +125,10 @@ uint8_t ps2_host_recv_response(void) {
125 // Command may take 25ms/20ms at most([5]p.46, [3]p.21) 125 // Command may take 25ms/20ms at most([5]p.46, [3]p.21)
126 // 250 * 100us(wait for start bit in ps2_host_recv) 126 // 250 * 100us(wait for start bit in ps2_host_recv)
127 uint8_t data = 0; 127 uint8_t data = 0;
128 uint8_t try 128 uint8_t try = 250;
129 = 250;
130 do { 129 do {
131 data = ps2_host_recv(); 130 data = ps2_host_recv();
132 } while (try --&&ps2_error); 131 } while (try-- && ps2_error);
133 return data; 132 return data;
134} 133}
135 134