USB
git-svn-id: https://spexeah.com:8443/svn/Asuro@280 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
parent
5266986ce4
commit
db618bd802
60
src/driver/USB.pas
Normal file
60
src/driver/USB.pas
Normal file
@ -0,0 +1,60 @@
|
||||
unit USB;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Console,
|
||||
PCI,
|
||||
drivertypes;
|
||||
|
||||
procedure init;
|
||||
|
||||
implementation
|
||||
|
||||
procedure init;
|
||||
var
|
||||
devices : TDeviceArray;
|
||||
count : uint32;
|
||||
i : uint32;
|
||||
|
||||
begin
|
||||
console.writestringln('USB: INIT BEGIN.');
|
||||
|
||||
devices:= PCI.getDeviceInfo($0C, $03, $00, count);
|
||||
console.writestring('USB-UHCI: Found ');
|
||||
console.writeint(count);
|
||||
console.writestringln(' USB Controller(s).');
|
||||
if count > 0 then begin
|
||||
for i:=0 to count-1 do begin
|
||||
console.writestring('USB: Controller[');
|
||||
console.writeint(i);
|
||||
console.writestring(']: ');
|
||||
console.writehex(devices[i].device_id);
|
||||
console.writestring(' ');
|
||||
console.writehex(devices[i].vendor_id);
|
||||
console.writestring(' ');
|
||||
console.writehexln(devices[i].prog_if);
|
||||
end;
|
||||
end;
|
||||
|
||||
devices:= PCI.getDeviceInfo($0C, $03, $10, count);
|
||||
console.writestring('USB-OHCI: Found ');
|
||||
console.writeint(count);
|
||||
console.writestringln(' USB Controller(s).');
|
||||
if count > 0 then begin
|
||||
for i:=0 to count-1 do begin
|
||||
console.writestring('USB: Controller[');
|
||||
console.writeint(i);
|
||||
console.writestring(']: ');
|
||||
console.writehex(devices[i].device_id);
|
||||
console.writestring(' ');
|
||||
console.writehex(devices[i].vendor_id);
|
||||
console.writestring(' ');
|
||||
console.writehexln(devices[i].prog_if);
|
||||
end;
|
||||
end;
|
||||
|
||||
console.writestringln('USB: INIT END.');
|
||||
end;
|
||||
|
||||
end.
|
Loading…
x
Reference in New Issue
Block a user