TMTouchBit Code Example

long session_handle;
short result;

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

/* send a 1 bit to the 1-Wire network */
result = TMTouchBit(session_handle, 0x01);

if (result >= 0)
{
   /* bit returned from 1-Wire network is LSB if result */
   ...
}
else
   /* session handle is not valid */

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