]> git.ipfire.org Git - ipfire-2.x.git/blob - src/hwinfo/src/isdn/libihw.txt
Kleiner netter neuer Versuch.
[ipfire-2.x.git] / src / hwinfo / src / isdn / libihw.txt
1 1.
2 ihw_card_info *ihw_get_card(int handle);
3
4 "ihw_card_info" is a struct, which hold all info about the card (see ihw.h)
5 The parameter is a internal used index for the database (range 0 ... max)
6 To get all records use the following code as example:
7
8 ihw_card_info *icp;
9 handle = 0;
10 while ((icp =ihw_get_card(handle++))) {
11 ...
12 }
13
14 If here are no entries left, you get NULL as return value.
15
16 2.
17 ihw_card_info *ihw_get_device_from_type(int typ, int subtyp);
18
19 Get card informations for the card with TYPE and SUBTYPE .
20 Returns NULL if no card match.
21 This function is useful to get the card informations, if you have type and
22 subtype from a rc.config, or from hardware probe.
23
24 3.
25 extern ihw_card_info *ihw_get_card_from_id(int vendor, int device,
26 int subvendor, int subdevice);
27
28 Get card informations for the card with VENDOR,DEVICE,SUBVENDOR and
29 SUBDEVICE for PCI and ISAPNP cards (set SUBVENDOR and SUBDEVICE
30 to 0xffff for ISAPNP cards). Returns NULL if no card found.
31
32 This function will be useful for hardware probe.
33
34
35 4.
36 ihw_para_info *ihw_get_parameter(int card_handle, int pnr);
37
38 This function provides parameter info for a card (which was given by one of
39 the first 3 functions). "card_handle" is the "ihw_card_info->handle" of
40 the given card, pnr is the number of the requested parameter (1,2, ...).
41 For the first parameter, set pnr to 1, for next increment pnr, until
42 NULL is returned.
43
44 For examples see at demo/demo.c
45
46 Specials:
47
48 To make it easy to decide, if an parameter has to be set in a rc.config
49 a flag P_DEFINE is set in ihw_para_info->flags, which is set for all
50 parameter which have to go into rc.config (for yast1 this parameter has to be
51 setable).
52
53 Other flags (may be useful for autodetection):
54
55 P_HARDSET - parameter depends on a jumper or switch.
56 P_SOFTSET - parameter is written into a config register (not for PnP/PCI)
57 P_READABLE - parameter can be read from a config register (not for PnP/PCI)
58 P_ISAPNP - parameter is set via ISA PnP setup
59 P_PCI - parameter is a PCI one
60
61 Karsten