| Entry Points

### ticables_library_init

TIEXPORT1 int TICALL ticables_library_init(void)

This function must be the first one to call. It inits library internals.

Return value : | the instance count.

### ticables_library_exit

TIEXPORT1 int

This function must be the last one to call. Used to release internal resources.

Return value : | the instance count.

### ticables_version_get

TIEXPORT1 const char *TICALL ticables_version_get(void)

This function returns the library version like "X.Y.Z".

Return value : | a string.

### ticables_handle_new

TIEXPORT1 CableHandle* TICALL ticables_handle_new(CableModel model, CablePort port)

Create a new handle associated with the given cable on the given port. Must be freed with ticables_handle_del when no longer needed. Note: the handle is a pointer on an opaque structure and should not be modified.

model : | a cable model
port : | the generic port on which cable is attached.
Return value : | NULL if error, an handle otherwise.

### ticables_handle_del

TIEXPORT1 int TICALL ticables_handle_del(CableHandle* handle)

Release the cable and free the associated resources.

handle : | the handle
Return value : | always 0.

### ticables_options_set_timeout

TIEXPORT1 int TICALL ticables_options_set_timeout(CableHandle* handle, int timeout)

Set timeout for any cable.

handle : | the handle
timeout : | timeout value in tenth of seconds
Return value : | the previous timeout.

### ticables_options_set_delay

TIEXPORT1 int TICALL ticables_options_set_delay(CableHandle* handle, int delay)

Set inter-bit delay for parallel or BlackLink cable.

handle : | the handle
delay : | delay in micro-seconds
Return value : | the previous delay.

### ticables_get_model

TIEXPORT1 CableModel TICALL ticables_get_model(CableHandle* handle)

Retrieve link cable model.

handle : | the handle
Return value : | the previous #CableModel value.

### ticables_get_port

TIEXPORT1 CablePort TICALL ticables_get_port(CableHandle* handle)

Retrieve link port.

handle : | the handle
Return value : | a #CablePort value.

### ticables_handle_show

TIEXPORT1 int TICALL ticables_handle_show(CableHandle* handle)

Show information stored in the handle.

handle : | the handle
Return value : | always 0.

### Return to the main index