TMBlockIO Overview Group

The TMBlockIO API call is a general purpose block transfer function. A TMTouchReset is done followed by TMTouchByte(s) of all of the 'num_tran' bytes in the 'tran_buffer' data buffer. The values returned from the TMTouchByte(s) are placed back into the 'tran_buffer' data buffer. This call returns a byte length greater than or equal to 0 for success or one of the TRANSPORT error values described for a failure. The maximum number of 'num_tran' is 1023 bytes.


short far pascal TMBlockIO(

long session_handle, // session handle for the desired 1-Wire network
unsigned char far *tran_buffer, // buffer to hold the data write and read
short num_tran // the number of bytes to transfer to the 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.

tran_buffer

Specifies a pointer to a memory location that contains the data to write and then read from the 1-Wire network.

num_tran

Specifies the number of bytes in the tran_buffer to transfer to and from the 1-Wire network.

Return Value

>=0 => length of data sent and received from The 1-Wire network

<0 => TMEX Transport Error Return Code

Code Example

See Also

TMTouchReset, TMTouchByte