Revision 40
fixed something
kbc.c | ||
---|---|---|
68 | 68 |
uint8_t c; |
69 | 69 |
if(kbc_read_byte(&c)) return 1; |
70 | 70 |
if(c == TWO_BYTE_CODE){ |
71 |
if(kbc_read_byte(&bytes[0])) return 1;
|
|
72 |
bytes[1] = c;
|
|
71 |
if(kbc_read_byte(&bytes[1])) return 1;
|
|
72 |
bytes[0] = c;
|
|
73 | 73 |
*size = 2; |
74 | 74 |
}else{ |
75 | 75 |
bytes[1] = 0; |
... | ... | |
93 | 93 |
|
94 | 94 |
int (kbc_issue_cmd)(uint8_t cmd){ |
95 | 95 |
uint8_t stat; |
96 |
while(1){
|
|
96 |
for(int i = 0; i < KBC_NUM_TRIES; ++i){
|
|
97 | 97 |
if(util_sys_inb(STATUS_REG, &stat)) return 1; |
98 | 98 |
if((stat&IN_BUF_FULL) == 0){ |
99 | 99 |
if(sys_outb(KBC_CMD, cmd)) return 1; |
Also available in: Unified diff