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
@ -8,3 +8,12 @@ uint8_t inb(uint16_t portnumber) {
|
|||||||
asm volatile("inb %1, %0" : "=a" (result) : "Nd" (portnumber));
|
asm volatile("inb %1, %0" : "=a" (result) : "Nd" (portnumber));
|
||||||
return result;
|
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