TMClose Code Example

long session_handle;
short result;

/* session_handle set from a call to TMExtendedStartSession */
...

/* close the 1-Wire network */
result = TMClose(session_handle);

if (result == 1)
{    
   /* 1-Wire network closed */
   ...
}
else
   /* session handle is not valid */

/* close the session with a call to TMEndSession */
...