Project

General

Profile

Statistics
| Revision:

root / lab2 / utils.c @ 5

History | View | Annotate | Download (550 Bytes)

1 4 up20180655
#include <lcom/lcf.h>
2
3
#include <stdint.h>
4
5
int(util_get_LSB)(uint16_t val, uint8_t *lsb) {
6 5 up20180642
    /* To be implemented by the students */
7
    printf("%s is not yet implemented!\n", __func__);
8 4 up20180655
9 5 up20180642
    return 1;
10 4 up20180655
}
11
12
int(util_get_MSB)(uint16_t val, uint8_t *msb) {
13 5 up20180642
    /* To be implemented by the students */
14
    printf("%s is not yet implemented!\n", __func__);
15 4 up20180655
16 5 up20180642
    return 1;
17 4 up20180655
}
18
19
int (util_sys_inb)(int port, uint8_t *value) {
20 5 up20180642
    /* To be implemented by the students */
21
    uint32_t n = 0;
22
    int ret = sys_inb(port, &n);
23
    *value = n;
24
    return ret;
25 4 up20180655
}