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