Revision 76
fixed issue on packet/async
lab4/lab4.c | ||
---|---|---|
44 | 44 |
uint8_t mouse_irq_bit = 12; |
45 | 45 |
int mouse_id = 0; |
46 | 46 |
int mouse_irq = BIT(mouse_irq_bit); |
47 |
if (mouse_set_data_report(true)) return 1; |
|
48 |
|
|
47 | 49 |
if (subscribe_mouse_interrupt(mouse_irq_bit, &mouse_id)) return 1; |
48 |
if (mouse_set_data_report(true)) return 1; |
|
49 | 50 |
/// cycle |
50 | 51 |
int good = 1; |
51 | 52 |
uint32_t cnt_now = 0; |
... | ... | |
75 | 76 |
/* no standart message expected: do nothing */ |
76 | 77 |
} |
77 | 78 |
} |
78 |
|
|
79 | 79 |
if (unsubscribe_interrupt(&mouse_id)) return 1; |
80 | 80 |
if (mouse_set_data_report(false)) return 1; |
81 | 81 |
|
... | ... | |
142 | 142 |
uint8_t mouse_irq_bit = 12; |
143 | 143 |
int mouse_id = 0; |
144 | 144 |
int mouse_irq = BIT(mouse_irq_bit); |
145 |
if (mouse_set_data_report(true)) return 1; |
|
146 |
|
|
145 | 147 |
if (subscribe_mouse_interrupt(mouse_irq_bit, &mouse_id)) return 1; |
146 |
if (mouse_set_data_report(true)) return 1; |
|
147 | 148 |
/// cycle |
148 | 149 |
int good = 1; |
149 | 150 |
while (good) { |
lab4/mouse.c | ||
---|---|---|
29 | 29 |
got_error_mouse_ih = OTHER_ERROR; |
30 | 30 |
return; |
31 | 31 |
} |
32 |
if (((status & AUX_MOUSE) == 0) || ((status & OUT_BUF_FUL) == 0)) { |
|
33 |
got_error_mouse_ih = OTHER_ERROR; |
|
34 |
return; |
|
35 |
} |
|
32 | 36 |
|
33 | 37 |
uint8_t byte = 0; |
34 | 38 |
|
Also available in: Unified diff