1 /***************************************************************************
2  * Copyright (c) 2024 Microsoft Corporation
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the MIT License which is available at
6  * https://opensource.org/licenses/MIT.
7  *
8  * SPDX-License-Identifier: MIT
9  **************************************************************************/
10 
11 
12 /**************************************************************************/
13 /**************************************************************************/
14 /**                                                                       */
15 /** USBX Component                                                        */
16 /**                                                                       */
17 /**   CDC ACM Class                                                       */
18 /**                                                                       */
19 /**************************************************************************/
20 /**************************************************************************/
21 
22 
23 /**************************************************************************/
24 /*                                                                        */
25 /*  COMPONENT DEFINITION                                   RELEASE        */
26 /*                                                                        */
27 /*    ux_host_class_cdc_acm.h                             PORTABLE C      */
28 /*                                                           6.1.10       */
29 /*  AUTHOR                                                                */
30 /*                                                                        */
31 /*    Chaoqiong Xiao, Microsoft Corporation                               */
32 /*                                                                        */
33 /*  DESCRIPTION                                                           */
34 /*                                                                        */
35 /*    This file contains all the header and extern functions used by the  */
36 /*    USBX CDC ACM class.                                                 */
37 /*                                                                        */
38 /*  RELEASE HISTORY                                                       */
39 /*                                                                        */
40 /*    DATE              NAME                      DESCRIPTION             */
41 /*                                                                        */
42 /*  05-19-2020     Chaoqiong Xiao           Initial Version 6.0           */
43 /*  09-30-2020     Chaoqiong Xiao           Modified comment(s),          */
44 /*                                            used UX prefix to refer to  */
45 /*                                            TX symbols instead of using */
46 /*                                            them directly,              */
47 /*                                            resulting in version 6.1    */
48 /*  08-02-2021     Wen Wang                 Modified comment(s),          */
49 /*                                            added extern "C" keyword    */
50 /*                                            for compatibility with C++, */
51 /*                                            resulting in version 6.1.8  */
52 /*  01-31-2022     Chaoqiong Xiao           Modified comment(s),          */
53 /*                                            added standalone support,   */
54 /*                                            used defined line coding    */
55 /*                                            instead of magic number,    */
56 /*                                            resulting in version 6.1.10 */
57 /*                                                                        */
58 /**************************************************************************/
59 
60 #ifndef UX_HOST_CLASS_CDC_ACM_H
61 #define UX_HOST_CLASS_CDC_ACM_H
62 
63 /* Determine if a C++ compiler is being used.  If so, ensure that standard
64    C is used to process the API information.  */
65 
66 #ifdef   __cplusplus
67 
68 /* Yes, C++ compiler is present.  Use standard C.  */
69 extern   "C" {
70 
71 #endif
72 
73 
74 /* Internal option: enable the basic USBX error checking. This define is typically used
75    while debugging application.  */
76 #if defined(UX_ENABLE_ERROR_CHECKING) && !defined(UX_HOST_CLASS_CDC_ACM_ENABLE_ERROR_CHECKING)
77 #define UX_HOST_CLASS_CDC_ACM_ENABLE_ERROR_CHECKING
78 #endif
79 
80 
81 /* Define CDC ACM Class constants.  */
82 
83 #define UX_HOST_CLASS_CDC_ACM_DEVICE_INIT_DELAY                 1000
84 #define UX_HOST_CLASS_CDC_ACM_CLASS_TRANSFER_TIMEOUT            300000
85 #define UX_HOST_CLASS_CDC_DATA_CLASS                            0x0A
86 #define UX_HOST_CLASS_CDC_CONTROL_CLASS                         0x02
87 #define UX_HOST_CLASS_CDC_ACM_SUBCLASS                          0X02
88 #define UX_HOST_CLASS_CDC_DLC_SUBCLASS                          0X01
89 #define UX_HOST_CLASS_CDC_ACM_CS_INTERFACE                      0x24
90 
91 /* Define CDC ACM Class descriptor subtypes in functional descriptors.  */
92 #define UX_HOST_CLASS_CDC_ACM_HEADER_DESCRIPTOR                 0X00
93 #define UX_HOST_CLASS_CDC_ACM_CALL_MANAGEMENT_DESCRIPTOR        0X01
94 #define UX_HOST_CLASS_CDC_ACM_ABSTRACT_CONTROL_MGT_DESCRIPTOR   0X02
95 #define UX_HOST_CLASS_CDC_ACM_DIRECT_LINE_MGT_DESCRIPTOR        0X03
96 #define UX_HOST_CLASS_CDC_ACM_TELEPHONE_RINGER_DESCRIPTOR       0X04
97 #define UX_HOST_CLASS_CDC_ACM_REPORT_CAPABILITY_DESCRIPTOR      0X05
98 #define UX_HOST_CLASS_CDC_ACM_UNION_DESCRIPTOR                  0X06
99 #define UX_HOST_CLASS_CDC_ACM_COUNTRY_SELECTION_DESCRIPTOR      0X07
100 #define UX_HOST_CLASS_CDC_ACM_TELEPHONE_OPERATIONAL_DESCRIPTOR  0X08
101 #define UX_HOST_CLASS_CDC_ACM_USB_TERMINAL_DESCRIPTOR           0X09
102 
103 /* Define CDC ACM Class call management descriptors.  */
104 #define UX_HOST_CLASS_CDC_ACM_CALL_MANAGEMENT_CAPABILITIES      0x03
105 #define UX_HOST_CLASS_CDC_ACM_CALL_MANAGEMENT_DCM               0x01
106 #define UX_HOST_CLASS_CDC_ACM_CALL_MANAGEMENT_DCI               0x02
107 
108 /* Define CDC ACM Class union interface functional descriptors.  */
109 #define UX_HOST_CLASS_CDC_ACM_UNION_FUNCTIONAL_MASTER           0x03
110 
111 /* Define CDC ACM command request values.  */
112 
113 #define UX_HOST_CLASS_CDC_ACM_REQ_SEND_ENCAPSULATED_COMMAND     0x00
114 #define UX_HOST_CLASS_CDC_ACM_REQ_GET_ENCAPSULATED_COMMAND      0x01
115 #define UX_HOST_CLASS_CDC_ACM_REQ_SET_COMM_FEATURE              0x02
116 #define UX_HOST_CLASS_CDC_ACM_REQ_GET_COMM_FEATURE              0x03
117 #define UX_HOST_CLASS_CDC_ACM_REQ_CLEAR_COMM_FEATURE            0x04
118 #define UX_HOST_CLASS_CDC_ACM_REQ_SET_AUX_LINE_STATE            0x10
119 #define UX_HOST_CLASS_CDC_ACM_REQ_SET_HOOK_STATE                0x11
120 #define UX_HOST_CLASS_CDC_ACM_REQ_PULSE_SETUP                   0x12
121 #define UX_HOST_CLASS_CDC_ACM_REQ_SEND_PULSE                    0x13
122 #define UX_HOST_CLASS_CDC_ACM_REQ_SET_PUSLE_TIME                0x14
123 #define UX_HOST_CLASS_CDC_ACM_REQ_RING_AUX_JACK                 0x15
124 #define UX_HOST_CLASS_CDC_ACM_REQ_SET_LINE_CODING               0x20
125 #define UX_HOST_CLASS_CDC_ACM_REQ_GET_LINE_CODING               0x21
126 #define UX_HOST_CLASS_CDC_ACM_REQ_SET_LINE_STATE                0x22
127 #define UX_HOST_CLASS_CDC_ACM_REQ_SEND_BREAK                    0x23
128 #define UX_HOST_CLASS_CDC_ACM_REQ_SET_RINGER_PARMS              0x30
129 #define UX_HOST_CLASS_CDC_ACM_REQ_GET_RINGER_PARMS              0x31
130 #define UX_HOST_CLASS_CDC_ACM_REQ_SET_OPERATION_PARMS           0x32
131 #define UX_HOST_CLASS_CDC_ACM_REQ_GET_OPERATION_PARMS           0x33
132 #define UX_HOST_CLASS_CDC_ACM_REQ_SET_LINE_PARMS                0x34
133 #define UX_HOST_CLASS_CDC_ACM_REQ_GET_LINE_PARMS                0x35
134 
135 /* Define CDC ACM line output control values.  */
136 
137 #define UX_HOST_CLASS_CDC_ACM_CTRL_DTR                          0x01
138 #define UX_HOST_CLASS_CDC_ACM_CTRL_RTS                          0x02
139 
140 /* Define CDC ACM line input control values.  */
141 
142 #define UX_HOST_CLASS_CDC_ACM_CTRL_DCD                          0x01
143 #define UX_HOST_CLASS_CDC_ACM_CTRL_DSR                          0x02
144 #define UX_HOST_CLASS_CDC_ACM_CTRL_BRK                          0x04
145 #define UX_HOST_CLASS_CDC_ACM_CTRL_RI                           0x08
146 
147 #define UX_HOST_CLASS_CDC_ACM_CTRL_FRAMING                      0x10
148 #define UX_HOST_CLASS_CDC_ACM_CTRL_PARITY                       0x20
149 #define UX_HOST_CLASS_CDC_ACM_CTRL_OVERRUN                      0x40
150 
151 /* Define CDC ACM Class packet equivalences.  */
152 
153 #define UX_HOST_CLASS_CDC_ACM_PACKET_SIZE                       128
154 
155 /* Define CDC ACM default values.  */
156 
157 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_DEFAULT_RATE          9600
158 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_DEFAULT_STOP_BIT      0
159 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_DEFAULT_PARITY        0
160 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_DEFAULT_DATA_BIT      8
161 
162 /* Define CDC ACM line coding definitions.  */
163 
164 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_STOP_BIT_0            0
165 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_STOP_BIT_15           1
166 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_STOP_BIT_2            2
167 
168 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_PARITY_NONE           0
169 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_PARITY_ODD            1
170 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_PARITY_EVEN           2
171 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_PARITY_MARK           3
172 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_PARITY_SPACE          4
173 
174 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_LENGTH                7
175 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_RATE                  0
176 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_STOP_BIT              4
177 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_PARITY                5
178 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_DATA_BIT              6
179 
180 /* Define CDC ACM line state definitions.  */
181 
182 #define UX_HOST_CLASS_CDC_ACM_LINE_STATE_STOP_BIT_0             0
183 #define UX_HOST_CLASS_CDC_ACM_LINE_CODING_STOP_BIT_15           1
184 
185 /* Define CDC ACM IOCTL Functions. */
186 
187 #define UX_HOST_CLASS_CDC_ACM_IOCTL_SET_LINE_CODING             0
188 #define UX_HOST_CLASS_CDC_ACM_IOCTL_GET_LINE_CODING             1
189 #define UX_HOST_CLASS_CDC_ACM_IOCTL_SET_LINE_STATE              2
190 #define UX_HOST_CLASS_CDC_ACM_IOCTL_SEND_BREAK                  3
191 #define UX_HOST_CLASS_CDC_ACM_IOCTL_ABORT_IN_PIPE               5
192 #define UX_HOST_CLASS_CDC_ACM_IOCTL_ABORT_OUT_PIPE              6
193 #define UX_HOST_CLASS_CDC_ACM_IOCTL_NOTIFICATION_CALLBACK       7
194 #define UX_HOST_CLASS_CDC_ACM_IOCTL_GET_DEVICE_STATUS           8
195 #define UX_HOST_CLASS_CDC_ACM_IOCTL_WRITE_CALLBACK              9
196 #define UX_HOST_CLASS_CDC_ACM_IOCTL_GET_WRITE_STATUS            10
197 
198 /* Define CDC ACM Reception States. */
199 
200 #define UX_HOST_CLASS_CDC_ACM_RECEPTION_STATE_STOPPED           0
201 #define UX_HOST_CLASS_CDC_ACM_RECEPTION_STATE_STARTED           1
202 #define UX_HOST_CLASS_CDC_ACM_RECEPTION_STATE_IN_TRANSFER       2
203 
204 /* Define supported notification types.  */
205 
206 #define UX_HOST_CLASS_CDC_ACM_NOTIFICATION_NETWORK_CONNECTION   0x00
207 #define UX_HOST_CLASS_CDC_ACM_NOTIFICATION_RESPONSE_AVAILABLE   0x01
208 #define UX_HOST_CLASS_CDC_ACM_NOTIFICATION_SERIAL_STATE         0x20
209 #define UX_HOST_CLASS_CDC_ACM_NOTIFICATION_CALL_STATE_CHANGE    0x28
210 #define UX_HOST_CLASS_CDC_ACM_NOTIFICATION_LINE_STATE_CHANGE    0x29
211 #define UX_HOST_CLASS_CDC_ACM_NOTIFICATION_SPEED_CHANGE         0x2A
212 
213 /* Define notification packet format.  */
214 
215 #define UX_HOST_CLASS_CDC_ACM_NPF_REQUEST_TYPE                  0x00
216 #define UX_HOST_CLASS_CDC_ACM_NPF_NOTIFICATION_TYPE             0x01
217 #define UX_HOST_CLASS_CDC_ACM_NPF_VALUE                         0x02
218 #define UX_HOST_CLASS_CDC_ACM_NPF_INDEX                         0x04
219 #define UX_HOST_CLASS_CDC_ACM_NPF_LENGTH                        0x06
220 
221 /* Define CDC ACM Class instance structure.  */
222 
223 typedef struct UX_HOST_CLASS_CDC_ACM_STRUCT
224 {
225     struct UX_HOST_CLASS_CDC_ACM_STRUCT
226                    *ux_host_class_cdc_acm_next_instance;
227     UX_HOST_CLASS  *ux_host_class_cdc_acm_class;
228     UX_DEVICE      *ux_host_class_cdc_acm_device;
229     UX_ENDPOINT    *ux_host_class_cdc_acm_bulk_in_endpoint;
230     UX_ENDPOINT    *ux_host_class_cdc_acm_bulk_out_endpoint;
231     UX_ENDPOINT    *ux_host_class_cdc_acm_interrupt_endpoint;
232     UX_INTERFACE   *ux_host_class_cdc_acm_interface;
233     UINT           ux_host_class_cdc_acm_instance_status;
234     UINT           ux_host_class_cdc_acm_state;
235     ULONG          ux_host_class_cdc_acm_notification_count;
236     ULONG          ux_host_class_cdc_acm_capabilities;
237     ULONG          ux_host_class_cdc_acm_device_state;
238     struct UX_HOST_CLASS_CDC_ACM_RECEPTION_STRUCT
239                    *ux_host_class_cdc_acm_reception;
240 
241     VOID           (*ux_host_class_cdc_acm_device_status_change_callback)(struct UX_HOST_CLASS_CDC_ACM_STRUCT *cdc_acm,
242                                                                 ULONG  notification_type, ULONG notification_value);
243 #if !defined(UX_HOST_STANDALONE)
244     UX_SEMAPHORE   ux_host_class_cdc_acm_semaphore;
245 #else
246     UINT           ux_host_class_cdc_acm_status;
247     VOID           *ux_host_class_cdc_acm_allocated;
248     ULONG          ux_host_class_cdc_acm_interfaces_bitmap;
249     ULONG          ux_host_class_cdc_acm_tick;
250     struct UX_HOST_CLASS_CDC_ACM_STRUCT
251                    *ux_host_class_cdc_acm_control;
252     ULONG          ux_host_class_cdc_acm_write_length;
253     ULONG          ux_host_class_cdc_acm_write_count;
254     VOID           (*ux_host_class_cdc_acm_write_callback)(
255                                 struct UX_HOST_CLASS_CDC_ACM_STRUCT *cdc_acm,
256                                 UINT status, ULONG length);
257     UCHAR          ux_host_class_cdc_acm_cmd_state;
258     UCHAR          ux_host_class_cdc_acm_read_state;
259     UCHAR          ux_host_class_cdc_acm_write_state;
260     UCHAR          ux_host_class_cdc_acm_next_state;
261 #endif
262 } UX_HOST_CLASS_CDC_ACM;
263 
264 /* Define CDC DLC Class instance structure.  */
265 
266 
267 typedef struct UX_HOST_CLASS_CDC_DLC_STRUCT
268 {
269     struct UX_HOST_CLASS_CDC_DLC_STRUCT
270                    *ux_host_class_cdc_dlc_next_instance;
271     UX_HOST_CLASS  *ux_host_class_cdc_dlc_class;
272     UX_DEVICE      *ux_host_class_cdc_dlc_device;
273     UX_ENDPOINT    *ux_host_class_cdc_dlc_bulk_in_endpoint;
274     UX_ENDPOINT    *ux_host_class_cdc_dlc_bulk_out_endpoint;
275     UX_ENDPOINT    *ux_host_class_cdc_dlc_interrupt_endpoint;
276     UX_INTERFACE   *ux_host_class_cdc_dlc_interface;
277     UINT           ux_host_class_cdc_dlc_instance_status;
278     UINT           ux_host_class_cdc_dlc_state;
279     ULONG          ux_host_class_cdc_dlc_notification_count;
280     ULONG          ux_host_class_cdc_dlc_capabilities;
281     struct UX_HOST_CLASS_CDC_DLC_RECEPTION_STRUCT
282                    *ux_host_class_cdc_dlc_reception;
283 #if !defined(UX_HOST_STANDALONE)
284     UX_SEMAPHORE   ux_host_class_cdc_dlc_semaphore;
285 #else
286     ULONG          ux_host_class_cdc_dlc_interfaces_bitmap;
287     struct UX_HOST_CLASS_CDC_ACM_STRUCT
288                    *ux_host_class_cdc_dlc_control;
289     ULONG          ux_host_class_cdc_dlc_write_length;
290     ULONG          ux_host_class_cdc_dlc_write_count;
291     VOID           (*ux_host_class_cdc_dlc_write_callback)(
292                                 struct UX_HOST_CLASS_CDC_ACM_STRUCT *cdc_acm,
293                                 UINT status, ULONG length);
294     UCHAR          ux_host_class_cdc_dlc_cmd_state;
295     UCHAR          ux_host_class_cdc_dlc_read_state;
296     UCHAR          ux_host_class_cdc_dlc_write_state;
297     UCHAR          ux_host_class_cdc_dlc_next_state;
298 #endif
299 } UX_HOST_CLASS_CDC_DLC;
300 
301 /* Define CDC ACM reception structure. */
302 
303 typedef struct UX_HOST_CLASS_CDC_ACM_RECEPTION_STRUCT
304 {
305 
306     ULONG          ux_host_class_cdc_acm_reception_state;
307     ULONG          ux_host_class_cdc_acm_reception_block_size;
308     UCHAR          *ux_host_class_cdc_acm_reception_data_buffer;
309     ULONG          ux_host_class_cdc_acm_reception_data_buffer_size;
310     UCHAR          *ux_host_class_cdc_acm_reception_data_head;
311     UCHAR          *ux_host_class_cdc_acm_reception_data_tail;
312     VOID           (*ux_host_class_cdc_acm_reception_callback)(struct UX_HOST_CLASS_CDC_ACM_STRUCT *cdc_acm,
313                                                                 UINT  status,
314                                                                 UCHAR *reception_buffer,
315                                                                 ULONG reception_size);
316 
317 } UX_HOST_CLASS_CDC_ACM_RECEPTION;
318 
319 /* Define CDC ACM Line Coding IOCTL structure.  */
320 
321 typedef struct UX_HOST_CLASS_CDC_ACM_LINE_CODING_STRUCT
322 {
323 
324     ULONG          ux_host_class_cdc_acm_line_coding_dter;
325     ULONG          ux_host_class_cdc_acm_line_coding_stop_bit;
326     ULONG          ux_host_class_cdc_acm_line_coding_parity;
327     ULONG          ux_host_class_cdc_acm_line_coding_data_bits;
328 
329 } UX_HOST_CLASS_CDC_ACM_LINE_CODING;
330 
331 /* Define CDC ACM Line State IOCTL structure.  */
332 
333 typedef struct UX_HOST_CLASS_CDC_ACM_LINE_STATE_STRUCT
334 {
335 
336     ULONG          ux_host_class_cdc_acm_line_state_rts;
337     ULONG          ux_host_class_cdc_acm_line_state_dtr;
338 
339 } UX_HOST_CLASS_CDC_ACM_LINE_STATE;
340 
341 /* Define CDC ACM Line break IOCTL structure.  */
342 
343 typedef struct UX_HOST_CLASS_CDC_ACM_LINE_BREAK_STRUCT
344 {
345 
346     ULONG           ux_host_class_cdc_acm_line_break;
347 
348 } UX_HOST_CLASS_CDC_ACM_LINE_BREAK;
349 
350 /* Define CDC ACM Class function prototypes.  */
351 
352 UINT  _ux_host_class_cdc_acm_activate(UX_HOST_CLASS_COMMAND *command);
353 UINT  _ux_host_class_cdc_acm_configure(UX_HOST_CLASS_CDC_ACM *cdc_acm);
354 UINT  _ux_host_class_cdc_acm_deactivate(UX_HOST_CLASS_COMMAND *command);
355 UINT  _ux_host_class_cdc_acm_endpoints_get(UX_HOST_CLASS_CDC_ACM *cdc_acm);
356 UINT  _ux_host_class_cdc_acm_entry(UX_HOST_CLASS_COMMAND *command);
357 UINT  _ux_host_class_cdc_acm_read (UX_HOST_CLASS_CDC_ACM *cdc_acm, UCHAR *data_pointer,
358                                   ULONG requested_length, ULONG *actual_length);
359 UINT  _ux_host_class_cdc_acm_write(UX_HOST_CLASS_CDC_ACM *cdc_acm, UCHAR *data_pointer,
360                                   ULONG requested_length, ULONG *actual_length);
361 UINT  _ux_host_class_cdc_acm_ioctl(UX_HOST_CLASS_CDC_ACM *cdc_acm, ULONG request,
362                                   VOID *parameter);
363 UINT  _ux_host_class_cdc_acm_command(UX_HOST_CLASS_CDC_ACM *cdc_acm, ULONG command,
364                                     ULONG value, UCHAR *data_buffer, ULONG data_length);
365 VOID  _ux_host_class_cdc_acm_transfer_request_completed(UX_TRANSFER *transfer_request);
366 UINT  _ux_host_class_cdc_acm_capabilities_get(UX_HOST_CLASS_CDC_ACM *cdc_acm);
367 UINT  _ux_host_class_cdc_acm_reception_stop (UX_HOST_CLASS_CDC_ACM *cdc_acm,
368                                     UX_HOST_CLASS_CDC_ACM_RECEPTION *cdc_acm_reception);
369 UINT  _ux_host_class_cdc_acm_reception_start (UX_HOST_CLASS_CDC_ACM *cdc_acm,
370                                     UX_HOST_CLASS_CDC_ACM_RECEPTION *cdc_acm_reception);
371 
372 VOID  _ux_host_class_cdc_acm_reception_callback (UX_TRANSFER *transfer_request);
373 
374 UINT  _ux_host_class_cdc_acm_write_with_callback(UX_HOST_CLASS_CDC_ACM *cdc_acm, UCHAR *data_pointer,
375                                   ULONG requested_length);
376 VOID  _ux_host_class_cdc_acm_transmission_callback(UX_TRANSFER *transfer_request);
377 
378 
379 UINT  _uxe_host_class_cdc_acm_command(UX_HOST_CLASS_CDC_ACM *cdc_acm, ULONG command,
380                                     ULONG value, UCHAR *data_buffer, ULONG data_length);
381 UINT  _uxe_host_class_cdc_acm_read (UX_HOST_CLASS_CDC_ACM *cdc_acm, UCHAR *data_pointer,
382                                   ULONG requested_length, ULONG *actual_length);
383 UINT  _uxe_host_class_cdc_acm_write(UX_HOST_CLASS_CDC_ACM *cdc_acm, UCHAR *data_pointer,
384                                   ULONG requested_length, ULONG *actual_length);
385 UINT  _uxe_host_class_cdc_acm_ioctl(UX_HOST_CLASS_CDC_ACM *cdc_acm, ULONG request,
386                                   VOID *parameter);
387 UINT  _uxe_host_class_cdc_acm_reception_stop (UX_HOST_CLASS_CDC_ACM *cdc_acm,
388                                     UX_HOST_CLASS_CDC_ACM_RECEPTION *cdc_acm_reception);
389 UINT  _uxe_host_class_cdc_acm_reception_start (UX_HOST_CLASS_CDC_ACM *cdc_acm,
390                                     UX_HOST_CLASS_CDC_ACM_RECEPTION *cdc_acm_reception);
391 UINT  _uxe_host_class_cdc_acm_write_with_callback(UX_HOST_CLASS_CDC_ACM *cdc_acm, UCHAR *data_pointer,
392                                   ULONG requested_length);
393 
394 
395 /* Define CDC ACM Class API prototypes.  */
396 
397 #define ux_host_class_cdc_acm_entry                     _ux_host_class_cdc_acm_entry
398 
399 #if defined(UX_HOST_CLASS_CDC_ACM_ENABLE_ERROR_CHECKING)
400 
401 #define ux_host_class_cdc_acm_read                      _uxe_host_class_cdc_acm_read
402 #define ux_host_class_cdc_acm_write                     _uxe_host_class_cdc_acm_write
403 #define ux_host_class_cdc_acm_ioctl                     _uxe_host_class_cdc_acm_ioctl
404 #define ux_host_class_cdc_acm_reception_start           _uxe_host_class_cdc_acm_reception_start
405 #define ux_host_class_cdc_acm_reception_stop            _uxe_host_class_cdc_acm_reception_stop
406 
407 #define ux_host_class_cdc_acm_write_with_callback       _uxe_host_class_cdc_acm_write_with_callback
408 
409 #else
410 
411 #define ux_host_class_cdc_acm_read                      _ux_host_class_cdc_acm_read
412 #define ux_host_class_cdc_acm_write                     _ux_host_class_cdc_acm_write
413 #define ux_host_class_cdc_acm_ioctl                     _ux_host_class_cdc_acm_ioctl
414 #define ux_host_class_cdc_acm_reception_start           _ux_host_class_cdc_acm_reception_start
415 #define ux_host_class_cdc_acm_reception_stop            _ux_host_class_cdc_acm_reception_stop
416 
417 #define ux_host_class_cdc_acm_write_with_callback       _ux_host_class_cdc_acm_write_with_callback
418 
419 #endif
420 
421 /* Determine if a C++ compiler is being used.  If so, complete the standard
422    C conditional started above.  */
423 #ifdef __cplusplus
424 }
425 #endif
426 
427 #endif
428