1
10
13
14
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
124
125
126
127
128
129
130
131
135
136
137
138
139
140
141
142
143
144
146
147
148
149
150
151
152
154
155
156
157
158
159
160
161
162
163
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
...
...
...
#define UX_SOURCE_CODE
#include "ux_api.h"
#include "ux_host_stack.h"
...
...
UINT _ux_host_stack_configuration_interface_scan(UX_CONFIGURATION *configuration)
{
UX_INTERFACE *interface;
UINT nb_class_owners;
UX_HOST_CLASS *class;
UX_HOST_CLASS_COMMAND class_command;
UINT status;
nb_class_owners = 0;
interface = configuration -> ux_configuration_first_interface;
while (interface != UX_NULL)
{
if(interface -> ux_interface_descriptor.bAlternateSetting == 0)
{
/* ... */
class_command.ux_host_class_command_request = UX_HOST_CLASS_COMMAND_QUERY;
class_command.ux_host_class_command_container = (VOID *)interface;
class_command.ux_host_class_command_usage = UX_HOST_CLASS_COMMAND_USAGE_CSP;
class_command.ux_host_class_command_class = interface -> ux_interface_descriptor.bInterfaceClass;
class_command.ux_host_class_command_subclass = interface -> ux_interface_descriptor.bInterfaceSubClass;
class_command.ux_host_class_command_protocol = interface -> ux_interface_descriptor.bInterfaceProtocol;
class_command.ux_host_class_command_iad_class = interface -> ux_interface_iad_class ;
class_command.ux_host_class_command_iad_subclass = interface -> ux_interface_iad_subclass;
class_command.ux_host_class_command_iad_protocol = interface -> ux_interface_iad_protocol;
class = _ux_host_stack_class_call(&class_command);
if (class != UX_NULL)
{
nb_class_owners++;
interface -> ux_interface_class = class;
}if (class != UX_NULL) { ... }
}if (interface -> ux_interface_descriptor.bAlternateSetting == 0) { ... }
interface = interface -> ux_interface_next_interface;
}while (interface != UX_NULL) { ... }
#if defined(UX_HOST_STANDALONE)
status = (nb_class_owners > 0) ? UX_SUCCESS : UX_NO_CLASS_MATCH;
return(status);/* ... */
#else
status = UX_NO_CLASS_MATCH;
if (nb_class_owners != 0)
{
/* ... */
status = _ux_host_stack_device_configuration_select(configuration);
if (status == UX_SUCCESS)
{
/* ... */
interface = configuration -> ux_configuration_first_interface;
while (interface != UX_NULL)
{
if (interface -> ux_interface_descriptor.bAlternateSetting == 0)
{
/* ... */
class_command.ux_host_class_command_request = UX_HOST_CLASS_COMMAND_ACTIVATE;
class_command.ux_host_class_command_container = (VOID *) interface;
if (interface -> ux_interface_class != UX_NULL)
{
class_command.ux_host_class_command_class_ptr = interface -> ux_interface_class;
status = interface -> ux_interface_class -> ux_host_class_entry_function(&class_command);
}if (interface -> ux_interface_class != UX_NULL) { ... }
}if (interface -> ux_interface_descriptor.bAlternateSetting == 0) { ... }
interface = interface -> ux_interface_next_interface;
}while (interface != UX_NULL) { ... }
}if (status == UX_SUCCESS) { ... }
}if (nb_class_owners != 0) { ... }
return(status);/* ... */
#endif
}{ ... }