git-svn-id: https://spexeah.com:8443/svn/Asuro@188 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
parent
83e8c9b32e
commit
0cefdb608e
@ -275,14 +275,14 @@ end;
|
||||
|
||||
function read8(bus : uint8; slot : uint8; func : uint8; offset : uint8; part : uint8) : uint8;
|
||||
begin
|
||||
loadConfig(bus, slot, func, offset + part);
|
||||
read8 := inb($CFC);
|
||||
loadConfig(bus, slot, func, offset);
|
||||
read8 := (inb($CFC) shr (part * 8)) and $FF;
|
||||
end;
|
||||
|
||||
function read16(bus : uint8; slot : uint8; func : uint8; offset : uint8; part : uint8) : uint16;
|
||||
begin
|
||||
loadConfig(bus, slot, func, offset + part);
|
||||
read16 := inw($CFC);
|
||||
loadConfig(bus, slot, func, offset);
|
||||
read16 := (inw($CFC) shr (part * 16)) and $FFFF;
|
||||
end;
|
||||
|
||||
function read32(bus : uint8; slot : uint8; func : uint8; offset : uint8) : uint32;
|
||||
@ -306,11 +306,11 @@ begin
|
||||
// end;
|
||||
|
||||
off:= offset;
|
||||
tmp.device_id := read16(bus, slot, func, off, 2);
|
||||
tmp.device_id := read16(bus, slot, func, off, 1);
|
||||
tmp.vendor_id := read16(bus, slot, func, off, 0);
|
||||
|
||||
off:= off+4;
|
||||
tmp.status := read16(bus, slot, func, off, 2);
|
||||
tmp.status := read16(bus, slot, func, off, 1);
|
||||
tmp.command := read16(bus, slot, func, off, 0);
|
||||
|
||||
off:= off+4;
|
||||
|
Loading…
x
Reference in New Issue
Block a user