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 TICALL ticables_library_exit(void)

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_supported_cables

TIEXPORT1 uint32_t TICALL ticables_supported_cables (void)

This function returns the cables built into the current binary.

Return value :
an integer containing a binary OR of (1 << CABLE_*) values, where CABLE_* values are defined in enum CableModel.

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 unsigned int TICALL ticables_options_set_timeout(CableHandle* handle, unsigned 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 unsigned int TICALL ticables_options_set_delay(CableHandle* handle, unsigned 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_get_device

TIEXPORT1 const char * TICALL ticables_get_device(CableHandle* handle)

Retrieve device port.

handle :
the handle
Return value :
a char pointer.

ticables_get_timeout

TIEXPORT1 unsigned int TICALL ticables_get_timeout(CableHandle *handle)

Retrieve timeout.

handle :
the handle
Return value :
an unsigned integer;

ticables_get_delay

TIEXPORT1 unsigned int TICALL ticables_get_delay(CableHandle *handle)

Retrieve timeout.

handle :
the handle
Return value :
an unsigned integer;

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