-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathport.h
More file actions
executable file
·52 lines (45 loc) · 825 Bytes
/
port.h
File metadata and controls
executable file
·52 lines (45 loc) · 825 Bytes
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
45
46
47
48
49
50
51
52
#ifndef PORT_H
#define PORT_H
#include "types.h"
#include "textio.h"
#include "gdt.h"
class Port {
public:
Port();
Port(uint16_t portnumber);
~Port();
uint16_t portnumber;
};
class Port8 : public Port {
public:
Port8();
Port8(uint16_t portnumber);
~Port8();
void write(uint8_t data);
uint8_t read();
};
class Port8Slow : public Port8 {
public:
Port8Slow();
Port8Slow(uint16_t portnumber);
~Port8Slow();
void write(uint8_t data);
uint8_t read();
};
class Port16 : public Port {
public:
Port16();
Port16(uint16_t portnumber);
~Port16();
void write(uint16_t data);
uint16_t read();
};
class Port32 : public Port {
public:
Port32();
Port32(uint16_t portnumber);
~Port32();
void write(uint32_t data);
uint32_t read();
};
#endif