File: probe.c.html

package info (click to toggle)
libticables 1.3.5%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 1,720 kB
  • sloc: ansic: 12,246; makefile: 1,446; sh: 131; xml: 23; sed: 16
file content (231 lines) | stat: -rw-r--r-- 6,384 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<html>
<head>
<title>Header File Index</title>
<link rel="STYLESHEET" type="TEXT/CSS" href="style.css">
</head>
<body bgcolor="#fffff8">
<table class="INVTABLE" width="100%">
<tbody>
<tr>
<td class="NOBORDER" width="40"><img src="info.gif" border="0"
height="32" width="32"> </td>
<td class="TITLE">Automatic probing of cables<br>
</td>
</tr>
</tbody>
</table>
<hr>
<h3><a name="ticables_probing_do"></a>ticables_probing_do</h3>
<table style="width: 100%; text-align: left;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">TIEXPORT1 int TICALL ticables_probing_do(int ***result, unsigned int timeout, ProbingMethod method)
</td>
</tr>
</tbody>
</table>
<br>
Returns cables which have been detected. All cables should be closed before !
The array is like a matrix which contains 5 columns (PORT_0 to PORT_4) and 
7 lines (CABLE_GRY to CABLE_USB).
The array must be freed by #ticables_probing_finish when no longer used.
<br>
<br>
<table style="width: 100%; text-align: left;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">result :<br></td>
<td style="vertical-align: top;">address of an array of integers to put the result.
<br></td>
</tr>
<tr>
<td style="vertical-align: top;">timeout :<br></td>
<td style="vertical-align: top;">timeout to set during probing
<br></td>
</tr>
<tr>
<td style="vertical-align: top;">method :<br></td>
<td style="vertical-align: top;">defines which link cables you want to search for.
<br></td>
</tr>
<tr>
<td style="vertical-align: top;">Return value :<br></td>
<td style="vertical-align: top;">0 if successful, ERR_NO_CABLE if no cables found.
<br></td>
</tr>
</tbody>
</table>
<br>
<h3><a name="ticables_probing_finish"></a>ticables_probing_finish</h3>
<table style="width: 100%; text-align: left;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">TIEXPORT1 int TICALL ticables_probing_finish(int ***result)
</td>
</tr>
</tbody>
</table>
<br>
Free the array created by #ticables_probing_do.
<br>
<br>
<table style="width: 100%; text-align: left;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">result :<br></td>
<td style="vertical-align: top;">address of an array of integers. 
<br></td>
</tr>
<tr>
<td style="vertical-align: top;">Return value :<br></td>
<td style="vertical-align: top;">always 0.
<br></td>
</tr>
</tbody>
</table>
<br>
<h3><a name="ticables_is_usb_enabled"></a>ticables_is_usb_enabled</h3>
<table style="width: 100%; text-align: left;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">TIEXPORT1 int TICALL ticables_is_usb_enabled(void)
</td>
</tr>
</tbody>
</table>
<br>
Checks whether USB support is available. Can be called at any time.
<br>
<br>
<table style="width: 100%; text-align: left;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">Return value :<br></td>
<td style="vertical-align: top;">!0 if available, 0 otherwise.
<br></td>
</tr>
</tbody>
</table>
<br>
<h3><a name="ticables_get_usb_devices"></a>ticables_get_usb_devices</h3>
<table style="width: 100%; text-align: left;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">TIEXPORT1 int TICALL ticables_get_usb_devices(int **list, int *len)
</td>
</tr>
</tbody>
</table>
<br>
Returns the list of detected USB PIDs. Note that list is in the 
same order as PORT#x.
The array must be freed when no longer used.
<br>
<br>
<table style="width: 100%; text-align: left;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">list :<br></td>
<td style="vertical-align: top;">out address of a NULL-terminated allocated array of integers (PIDs).
<br></td>
</tr>
<tr>
<td style="vertical-align: top;">len :<br></td>
<td style="vertical-align: top;">out pointer to number of detected USB devices.
<br></td>
</tr>
<tr>
<td style="vertical-align: top;">Return value :<br></td>
<td style="vertical-align: top;">0 if successful, an error code otherwise.
<br></td>
</tr>
</tbody>
</table>
<br>
<h3><a name="\brief Frees an array of USB devices
"></a>\brief Frees an array of USB devices
</h3>
<table style="width: 100%; text-align: left;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">	free(array);
</td>
</tr>
</tbody>
</table>
<br>
\return Always 0

<br>
<br>
<table style="width: 100%; text-align: left;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">Return value :<br></td>
<td style="vertical-align: top;"><br></td>
</tr>
</tbody>
</table>
<br>
<h3><a name="ticables_get_usb_device_info"></a>ticables_get_usb_device_info</h3>
<table style="width: 100%; text-align: left;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">TIEXPORT1 int TICALL ticables_get_usb_device_info(CableDeviceInfo **list, int *len)
</td>
</tr>
</tbody>
</table>
<br>
Returns the list of detected USB devices. Note that list is in the
same order as PORT#x.
The array must be freed when no longer used.
<br>
<br>
<table style="width: 100%; text-align: left;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">array :<br></td>
<td style="vertical-align: top;">address of a newly allocated array of CableDeviceInfo structures
<br></td>
</tr>
<tr>
<td style="vertical-align: top;">length :<br></td>
<td style="vertical-align: top;">number of detected USB devices.
<br></td>
</tr>
<tr>
<td style="vertical-align: top;">Return value :<br></td>
<td style="vertical-align: top;">0 if successful, an error code otherwise.
<br></td>
</tr>
</tbody>
</table>
<br>
<h3><a name="\brief Frees an array of USB device information
"></a>\brief Frees an array of USB device information
</h3>
<table style="width: 100%; text-align: left;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">	free(list);
</td>
</tr>
</tbody>
</table>
<br>
\return Always 0

<br>
<br>
<table style="width: 100%; text-align: left;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">Return value :<br></td>
<td style="vertical-align: top;"><br></td>
</tr>
</tbody>
</table>
<br>
<h3><a href="file:index.html">Return to the main index</a> </h3><br><br><br></body>
</html>