TMTouchByte Overview Group

The TMTouchByte API call transmits the least significant byte of the variable 'outbyte' on the 1-Wire network and concurrently receives a byte value from the 1-Wire network. The received byte is the return value of the function. For a write operation, provide the byte to send in 'outbyte'. For a read operation, where the 1-Wire device is sending a byte, provide 0xFF in the 'outbyte'.

short far pascal TMTouchByte(
long session_handle,   // session handle for the desired 1-Wire network
short outbyte          // byte to transfer to the 1-Wire network

For a description of the above types, see the TMEX Type Descriptions.



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.


Specifies the byte to tranfer to the 1-Wire network. Concurrently a byte is received from the 1-Wire network that is the return value of the API call.

Return Value

>=0 => byte returned from 1-Wire network while sending byte
0xFF => 1-wire bus is shorted.
<0 => TMEX Hardware Specific Error Return Code

Code Example

See Also

TMSetup, TMTouchReset