The TMGetAdapterSpec API call, copies information about the current port adapter on the 1-Wire network specified by 'session_handle' into the provided structure, “Specification” (see below). This is the same structure used in TMGetFamilySpec.
This structure returns information on the feature set of the 1-Wire adapter. See the TMEX API Overview for a list of adapters. The structure returns information on whether or not the adapter in question is capable of overdrive speeds, power delivery (strong pullup), EPROM programming, flexible speed timing, and performing a 1-Wire break (short to ground).
typedef struct {
unsigned short features[32];
char description[255];
} Specification;
(This is a packed structure on 1 byte boundaries)
Currently, only the first five unsigned short integers of the “features” array are defined as follows:
features[0] = overdrivedescription: An array of characters that contains 3 fields; part number, alternative part number and brief functional description. The fields are delimited by commas and the string is null terminated.
Note: Requires a successful call to TMSetup before the adapter specification can be ascertained.
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.
state_buffer
Specifies a pointer to a memory location that TMEX keeps all of the state information for the 1-Wire networks. This parameter is required by most TMEX API functions.
AdapterSpec
Specifies a Specification struct that returns information on whether or not the adapter in question is capable of overdrive speeds, power delivery (strong pullup), EPROM programming, flexible speed timing, and performing a 1-Wire break (short to ground).
Return Value
1 => adapter information is in struct 'AdapterSpec'
<0 => a FILE_OPERATIONS error has occurred