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;
|
function read8(bus : uint8; slot : uint8; func : uint8; offset : uint8; part : uint8) : uint8;
|
||||||
begin
|
begin
|
||||||
loadConfig(bus, slot, func, offset + part);
|
loadConfig(bus, slot, func, offset);
|
||||||
read8 := inb($CFC);
|
read8 := (inb($CFC) shr (part * 8)) and $FF;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function read16(bus : uint8; slot : uint8; func : uint8; offset : uint8; part : uint8) : uint16;
|
function read16(bus : uint8; slot : uint8; func : uint8; offset : uint8; part : uint8) : uint16;
|
||||||
begin
|
begin
|
||||||
loadConfig(bus, slot, func, offset + part);
|
loadConfig(bus, slot, func, offset);
|
||||||
read16 := inw($CFC);
|
read16 := (inw($CFC) shr (part * 16)) and $FFFF;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function read32(bus : uint8; slot : uint8; func : uint8; offset : uint8) : uint32;
|
function read32(bus : uint8; slot : uint8; func : uint8; offset : uint8) : uint32;
|
||||||
@ -306,11 +306,11 @@ begin
|
|||||||
// end;
|
// end;
|
||||||
|
|
||||||
off:= offset;
|
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);
|
tmp.vendor_id := read16(bus, slot, func, off, 0);
|
||||||
|
|
||||||
off:= off+4;
|
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);
|
tmp.command := read16(bus, slot, func, off, 0);
|
||||||
|
|
||||||
off:= off+4;
|
off:= off+4;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user