Project

General

Profile

Revision 198

minor change

View differences:

lab2/include/utils.h
17 17
 */
18 18
int(util_get_MSB)(uint16_t val, uint8_t *msb);
19 19

  
20
#ifdef LAB3
21
    uint32_t sys_inb_counter;
22
#endif
23

  
20 24
/**
21 25
 * @brief sys_inb wrapper
22 26
 * @param port Port to read from
lab2/src/utils.c
17 17
    return SUCCESS;
18 18
}
19 19

  
20
#ifdef LAB3
21
    uint32_t sys_inb_counter = 0;
22
#endif
23

  
20 24
int (util_sys_inb)(int port, uint8_t *value) {
21 25
    if(value == NULL) return NULL_PTR;
22 26
    uint32_t n = 0;
23 27
    if(sys_inb(port, &n)) return READ_ERROR;
24 28
    *value = n;
29
    #ifdef LAB3
30
        ++sys_inb_counter;
31
    #endif
25 32
    return SUCCESS;
26 33
}
27 34

  

Also available in: Unified diff