Project

General

Profile

Revision 62

utils.h on lab2

View differences:

lab2/utils.c
14 14
    return 0;
15 15
}
16 16

  
17
#ifdef LAB3
18
    uint32_t sys_inb_counter = 0;
19
#endif
20

  
17 21
int (util_sys_inb)(int port, uint8_t *value) {
18 22
    if(value == NULL) return 1;
19 23
    uint32_t n = 0;
20 24
    if(sys_inb(port, &n)) return 1;
21 25
    *value = n;
26
    #ifdef LAB3
27
        ++sys_inb_counter;
28
    #endif
22 29
    return 0;
23 30
}
lab2/utils.h
1
#ifndef UTILS_H_INCLUDED
2
#define UTILS_H_INCLUDED
3

  
4
int(util_get_LSB)(uint16_t val, uint8_t *lsb);
5

  
6
int(util_get_MSB)(uint16_t val, uint8_t *msb);
7

  
8
#ifdef LAB3
9
    uint32_t sys_inb_counter;
10
#endif
11

  
12
int (util_sys_inb)(int port, uint8_t *value);
13

  
14
#endif //UTILS_H_INCLUDED
0 15

  

Also available in: Unified diff