Project

General

Profile

Revision 61

changes

View differences:

kbc.c
43 43
    return 1;
44 44
}
45 45

  
46
int (kbc_issue_arg)(uint8_t arg){
47
    uint8_t stat;
48
    for(int i = 0; i < KBC_NUM_TRIES; ++i){
49
        if(util_sys_inb(STATUS_REG, &stat)) return 1;
50
        if((stat&IN_BUF_FULL) == 0){
51
            if(sys_outb(KBC_CMD_ARG, arg)) return 1;
52
            return 0;
53
        }
54
        tickdelay(micros_to_ticks(DELAY));
55
    }
56
    return 1;
57
}
58

  
46 59
int (kbc_read_byte)(uint8_t *byte){
47 60
    uint8_t stat;
48 61
    while(true){

Also available in: Unified diff