Revision 68
working decently
mouse.c | ||
---|---|---|
23 | 23 |
got_error_mouse_ih = 0; |
24 | 24 |
if(counter >= 3) counter = 0; |
25 | 25 |
|
26 |
if (util_sys_inb(STATUS_REG, &status)) { |
|
27 |
got_error_mouse_ih = 1; |
|
28 |
return; |
|
29 |
} |
|
26 |
if ((got_error_mouse_ih = util_sys_inb(STATUS_REG, &status))) return; |
|
30 | 27 |
|
31 | 28 |
if (status & (TIME_OUT_REC | PARITY_ERROR)) { |
32 |
got_error_mouse_ih = 1;
|
|
29 |
got_error_mouse_ih = OTHER_ERROR;
|
|
33 | 30 |
return; |
34 | 31 |
} |
35 | 32 |
|
36 | 33 |
uint8_t byte = 0; |
37 | 34 |
|
38 |
if (util_sys_inb(OUTPUT_BUF, &byte)) { |
|
39 |
got_error_mouse_ih = 1; |
|
40 |
return; |
|
41 |
} |
|
35 |
if ((got_error_mouse_ih = util_sys_inb(OUTPUT_BUF, &byte))) return; |
|
42 | 36 |
|
43 | 37 |
/// This does not run if: I was expecting the first one but what I get is definitely not the first byte |
44 | 38 |
if((byte & FIRST_BYTE_ID) || counter){ |
... | ... | |
65 | 59 |
int (mouse_set_data_report)(int on){ |
66 | 60 |
int ret = 0; |
67 | 61 |
if((ret = kbc_issue_cmd(MOUSE_WRITE_B))) return ret; |
68 |
if(sys_outb(KBC_CMD_ARG, DIS_DATA_REP)) return WRITE_ERROR;
|
|
62 |
if((ret = kbc_issue_arg(DIS_DATA_REP))) return ret;
|
|
69 | 63 |
return SUCCESS; |
70 | 64 |
} |
Also available in: Unified diff