Project

General

Profile

Statistics
| Revision:

root / lab4 / utils.c @ 55

History | View | Annotate | Download (267 Bytes)

1 53 up20180655
#include "errors.h"
2
3
#include <lcom/lcf.h>
4
5
#include <stdint.h>
6
7
int (util_sys_inb)(int port, uint8_t *value) {
8
    if(value == NULL) return NULL_PTR;
9
    uint32_t n = 0;
10
    if(sys_inb(port, &n)) return READ_ERROR;
11
    *value = n;
12
    return SUCCESS;
13
}