Project

General

Profile

Revision 83

added delay between reads

View differences:

lab4/errors.h
12 12
    TIMEOUT_ERROR,      /* @brief Timeout error */
13 13
    INVALID_COMMAND,    /* @brief Invalid Command issued */
14 14
    INVALID_STATE,      /* @brief State machine reached an invalid state */
15
    OTHER_ERROR,        /* @brief Unspecified error */
15
    INVALID_ARGUMENT,   /* @brief Invalid argument received */
16
    OTHER_ERROR         /* @brief Unspecified error */
16 17
};
17 18

  
18 19
#endif //ERRORS_H_INCLUDED
lab4/mouse.c
68 68
    for(unsigned i = 0; i < 3; ++i){
69 69
        if((ret = mouse_poll_byte(&byte, period))) return ret;
70 70
        packet[i] = byte;
71
        tickdelay(micros_to_ticks(period*1000));
71 72
    }
72 73
    *pp = mouse_parse_packet(packet);
73 74
    return SUCCESS;

Also available in: Unified diff