On Sun, 22 Dec 2002 20:47:25 +0100 (MEZ), Ruediger Ihle wrote:

>>HWDeviceID = FindDevice(0x1000, -1, FIND_STRAIGHT, 0) would get the 1st device
>>NextHWDeviceID = FindDevice(0x1000, -1, FIND_STRAIGHT, HWDeviceID) would get the 2nd.
>>What do you think?
>To me, the second approach is also more appealing. What does the 0x1000
>stand for ? DeviceID ?

That would have been the VendorID. The '-1' is the DeviceID, which means in that case 
all devices by 
Vendor 0x1000.

>I use an appoach where I pass in structure containing DeviceID, VendorID, 
>SubDeviceID, SubSystemID, Revision and DeviceClass together with a flag
>field. The flag specifies, which component to search for. This allows to use
>multiple (AND combined) search criteria at the same time in a single call.

Like I already said about danis example: For such complex things, it's advisable to 
use detection area directly.
I wouldn't like to generate a special super-detailed search, because it's not needed 
that way and directly 
accessing the detection area allows anything even searching for a specific PnP 
devicename (ascii) or for a 
device that requests e.g. I/O resource 0x220.
There is also another find-function that works using an array of Vendor and DeviceIDs. 
Also PnP IDs in 
find-APIs are string pointers instead of using their hexadecimal form. I used this 
concept to make it easier to 
use, because most of the PnP documentation that I saw used the ASCII format.

The find-device APIs are type specific, so there is one for PCI devices, one for PnP 
and so forth. But there is 
only one API to handle resources (detect&reconfigure) and there are also type specific 
special functions like 
e.g. PCI_WriteConfigWord (which is not boundary limited, so one may also write a word 
to register 3 w/o 
reading register 0-3 and 4-7 manually).

cu, Kiewitz


-----------
To unsubscribe yourself from this list, send the following message
to [EMAIL PROTECTED]

     unsubscribe acpi-os2
     end

Reply via email to