The TMReadDefaultPort API call reads the default 1-Wire port number
and type from the system registry. The port number and port type are both
integers that describe on which port the 1-Wire network is connected and through
which port adapter type.
The port numbers can be an integer from 0 to 16. Most valid port numbers on PCs are 1, 2, or 3. The following is a list of port adapter types:
1 Older DS9097E-type serial port adapters
2 Parallel port adapters
5 Standard DS90907U-type serial port adapters
6 USB port adapters
For a description of the above types, see the TMEX Type Descriptions.
Parameters
portnum
Specifies the port number of the specific port (serial, parallel, or usb) where the 1-Wire network is located. Most port numbers on PCs are 1, 2 or 3.
porttype
Specifies the port adapter type. There are a variety of PC-to-1-Wire adapters available. For a short list, see above. For a more in-depth list of adapters and their respective port type numbers, please see the TMEX API Overview. Currently used numbers are: 1, 2, 5, and 6.
Return Value
1 =>
defaults were returned
-2 =>
defaults not found
See Also