The TMSetup API function must be called before any other TMEX functions except the Session layer of API calls. No other TMEX API calls will operate correctly until the 1-Wire network has been called with this function. It is intended to be called once at the beginning of an application to initialize the 1-Wire network and verify the physical integrity of the 1-Wire network. Note that execution of this function will reset all the parts on the specified 1-Wire network.
For a description of the above types, see the TMEX Type Descriptions.
Parameters
session_handle
Specifies the session handle returned from the API function TMExtendedStartSession that specifies the desired 1-Wire network port. This parameter is required by most TMEX API functions.
Return Value
0 => Setup failed.
1 => Setup ok.
2 => Setup ok but 1-Wire network shorted.
3 => 1-Wire network does not exist.
4 => TMSetup not supported
< 0 => TMEX Hardware Specific Error Return Codes
See Also