TMOneWireCom Overview Group

The TMOneWireCom API call reads (‘Operation’ = 1) or sets (‘Operation’ = 0) the 1-Wire communication state. The following are the values allowed for ‘TimeMode’:

00 hex - Normal timing (15-60 microsecond time slots)
01 hex - Overdrive timing
02 hex - Relaxed timing for long lines

Note that not all of the above modes will be available for all hardware platforms.


short far pascal TMOneWireCom(

long session_handle,   // session handle for the desired 1-Wire network
short Operation,       // Read (1) or Set (0) the communication rate
short TimeMode         // communication rate number
);

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.

operation

Specifies whether reading or setting the 1-Wire network communication rate. (1) indicates reading and (0) indicates setting.

TimeMode

Specifies the 1-Wire network communication rate if the ‘Operation’ parameter is (0) for setting.

Return Value

>=0 => TimeMode that was set or read.

<0 => TMEX Hardware Specific Error Return Code

Code Example

See Also

TMOneWireLevel