-
Notifications
You must be signed in to change notification settings - Fork 0
/
io.h
44 lines (30 loc) · 886 Bytes
/
io.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef IO_H
#define IO_H
#include "stdint.h"
void outb(uint16_t port, uint8_t value);
uint8_t inb(uint16_t port);
uint16_t inw(uint16_t port);
#endif /* IO_H */
/*
#ifndef INCLUDE_IO_H
#define INCLUDE_IO_H
#include "stdint.h"
outb:
* Sends the given data to the given I/O port. Defined in io.s
*
* @param port The I/O port to send the data to
* @param data The data to send to the I/O port
// void outb(unsigned short port, unsigned char data);
// #endif INCLUDE_IO_H
in file io.h
inb:
* Read a byte from an I/O port.
*
* @param port The address of the I/O port
* @return The read byte
unsigned char inb(unsigned short port);
// int write(char *buf, unsigned int len);
void outb(unsigned short port, unsigned char data);
uint16_t inw(uint16_t port);
#endif //io.h end
*/