Link cable management layer

ticables_cable_open

TIEXPORT1 int TICALL ticables_cable_open(CableHandle* handle)

Attempt to open a connection on the cable with the parameters given with #ticables_handle_new().

handle :
a previously allocated handle
Return value :
0 if successful, an error code otherwise.

ticables_cable_reset

TIEXPORT1 int TICALL ticables_cable_reset(CableHandle* handle)

Reset link cable status (flush buffers, set ready).

handle :
a previously allocated handle
Return value :
0 if successful, an error code otherwise.

ticables_cable_probe

TIEXPORT1 int TICALL ticables_cable_probe(CableHandle* handle, int* result)

Attempt to probe if a cable is present. Open device if not opened.

handle :
a previously allocated handle
result :
cable found (!0) or not (0)
Return value :
0 if successful, an error code otherwise.

ticables_cable_close

TIEXPORT1 int TICALL ticables_cable_close(CableHandle* handle)

Attempt to close a connection on the cable with the parameters given with #ticables_handle_new().

handle :
a previously allocated handle
Return value :
0 if successful, an error code otherwise.

ticables_cable_send

TIEXPORT1 int TICALL ticables_cable_send(CableHandle* handle, uint8_t *data, uint32_t len)

Send %len bytes of the %data buffer from PC to hand-held.

handle :
a previously allocated handle
data :
buffer with data to send
len :
length of buffer
Return value :
0 if successful, an error code otherwise.

ticables_cable_put

TIEXPORT1 int TICALL ticables_cable_put(CableHandle* handle, uint8_t data)

Send one byte from PC to hand-held. Convenient function implemented for compatibility.

handle :
a previously allocated handle
data :
data to send
Return value :
0 if successful, an error code otherwise.

ticables_cable_recv

TIEXPORT1 int TICALL ticables_cable_recv(CableHandle* handle, uint8_t *data, uint32_t len)

Attempt to receive %len bytes from hand-held to PC.

handle :
a previously allocated handle
data :
buffer where data can be placed
len :
number of bytes requested
Return value :
0 if successful, an error code otherwise.

ticables_cable_get

TIEXPORT1 int TICALL ticables_cable_get(CableHandle* handle, uint8_t *data)

Receive one byte from hand-held to PC. Convenient function implemented for compatibility.

handle :
a previously allocated handle
data :
data to receive
Return value :
0 if successful, an error code otherwise.

ticables_cable_check

TIEXPORT1 int TICALL ticables_cable_check(CableHandle* handle, CableStatus *status)

Check for link cable status

handle :
a previously allocated handle
status :
status is placed here
Return value :
0 if successful, an error code otherwise.

ticables_cable_set_d0

TIEXPORT1 int TICALL ticables_cable_set_d0(CableHandle* handle, int state)

Set the electrical state of the D0 wire (if possible).

handle :
a previously allocated handle
state :
logical state (0 or 1) of D0 wire.
Return value :
0 if successful, an error code otherwise.

ticables_cable_set_d1

TIEXPORT1 int TICALL ticables_cable_set_d1(CableHandle* handle, int state)

Set the electrical state of the D1 wire (if possible).

handle :
a previously allocated handle
state :
logical state (0 or 1) of D1 wire.
Return value :
0 if successful, an error code otherwise.

ticables_cable_get_d0

TIEXPORT1 int TICALL ticables_cable_get_d0(CableHandle* handle)

Get the electrical state of the D0 wire (if possible).

handle :
a previously allocated handle
Return value :
0 or 1.

ticables_cable_get_d1

TIEXPORT1 int TICALL ticables_cable_get_d1(CableHandle* handle)

Get the electrical state of the D1 wire (if possible).

handle :
a previously allocated handle
Return value :
0 or 1.

ticables_cable_progress_reset

TIEXPORT1 int TICALL ticables_progress_reset(CableHandle* handle)

Reset byte counter and timer used for computing data rate.

handle :
a previously allocated handle
Return value :
always 0.

ticables_cable_progress_get

TIEXPORT1 int TICALL ticables_progress_get(CableHandle* handle, int* count, int* msec, float* rate)

Returns informations needed to compute the transfer rate of the link cable.

handle :
a previously allocated handle
count :
number of bytes transfered
msec :
time needed for the operation
rate :
data rate
Return value :
always 0.

Return to the main index