Add inw and outw commands in preparation for ATA-PIO support
This commit is contained in:
parent
c803f4a38e
commit
b2e2cdb19b
9
io.c
9
io.c
@ -7,4 +7,13 @@ uint8_t inb(uint16_t portnumber) {
|
||||
uint8_t result;
|
||||
asm volatile("inb %1, %0" : "=a" (result) : "Nd" (portnumber));
|
||||
return result;
|
||||
}
|
||||
|
||||
void outw(uint16_t portnumber, uint16_t data) {
|
||||
asm volatile("outw %0, %1" : : "a" (data), "Nd" (portnumber));
|
||||
}
|
||||
uint16_t inw(uint16_t portnumber) {
|
||||
uint16_t result;
|
||||
asm volatile("inw %1, %0" : "=a" (result) : "Nd" (portnumber));
|
||||
return result;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user