11/***************************************************************************
2- * Copyright (c) 2024 Microsoft Corporation
3- *
2+ * Copyright (c) 2024 Microsoft Corporation
3+ *
44 * This program and the accompanying materials are made available under the
55 * terms of the MIT License which is available at
66 * https://opensource.org/licenses/MIT.
7- *
7+ *
88 * SPDX-License-Identifier: MIT
99 **************************************************************************/
1010
1111
1212/**************************************************************************/
1313/**************************************************************************/
14- /** */
15- /** USBX Component */
14+ /** */
15+ /** USBX Component */
1616/** */
1717/** Slave Simulator Controller Driver */
1818/** */
1919/**************************************************************************/
2020/**************************************************************************/
2121
2222
23- /**************************************************************************/
24- /* */
25- /* COMPONENT DEFINITION RELEASE */
26- /* */
27- /* ux_dcd_sim_slave.h PORTABLE C */
23+ /**************************************************************************/
24+ /* */
25+ /* COMPONENT DEFINITION RELEASE */
26+ /* */
27+ /* ux_dcd_sim_slave.h PORTABLE C */
2828/* 6.1.10 */
2929/* AUTHOR */
3030/* */
3131/* Chaoqiong Xiao, Microsoft Corporation */
3232/* */
3333/* DESCRIPTION */
34- /* */
34+ /* */
3535/* This file contains all the header and extern functions used by the */
36- /* USBX slave simulator. It is designed to work ONLY with the USBX */
37- /* host simulator. */
38- /* */
39- /* RELEASE HISTORY */
40- /* */
41- /* DATE NAME DESCRIPTION */
42- /* */
36+ /* USBX slave simulator. It is designed to work ONLY with the USBX */
37+ /* host simulator. */
38+ /* */
39+ /* RELEASE HISTORY */
40+ /* */
41+ /* DATE NAME DESCRIPTION */
42+ /* */
4343/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
4444/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
4545/* resulting in version 6.1 */
6060#ifndef UX_DCD_SIM_SLAVE_H
6161#define UX_DCD_SIM_SLAVE_H
6262
63- /* Determine if a C++ compiler is being used. If so, ensure that standard
64- C is used to process the API information. */
63+ /* Determine if a C++ compiler is being used. If so, ensure that standard
64+ C is used to process the API information. */
6565
66- #ifdef __cplusplus
66+ #ifdef __cplusplus
6767
68- /* Yes, C++ compiler is present. Use standard C. */
69- extern "C" {
68+ /* Yes, C++ compiler is present. Use standard C. */
69+ extern "C" {
7070
71- #endif
71+ #endif
7272
7373
7474/* Define USB slave simulator major equivalences. */
@@ -110,7 +110,7 @@ extern "C" {
110110
111111/* Define USB slave simulator physical endpoint structure. */
112112
113- typedef struct UX_DCD_SIM_SLAVE_ED_STRUCT
113+ typedef struct UX_DCD_SIM_SLAVE_ED_STRUCT
114114{
115115
116116 ULONG ux_sim_slave_ed_status ;
@@ -119,22 +119,22 @@ typedef struct UX_DCD_SIM_SLAVE_ED_STRUCT
119119 ULONG ux_sim_slave_ed_ping_pong ;
120120 ULONG ux_sim_slave_ed_status_register ;
121121 ULONG ux_sim_slave_ed_configuration_value ;
122- struct UX_SLAVE_ENDPOINT_STRUCT
122+ struct UX_SLAVE_ENDPOINT_STRUCT
123123 * ux_sim_slave_ed_endpoint ;
124124} UX_DCD_SIM_SLAVE_ED ;
125125
126126
127127/* Define USB slave simulator DCD structure definition. */
128128
129129typedef struct UX_DCD_SIM_SLAVE_STRUCT
130- {
130+ {
131131
132- struct UX_SLAVE_DCD_STRUCT
132+ struct UX_SLAVE_DCD_STRUCT
133133 * ux_dcd_sim_slave_dcd_owner ;
134- struct UX_DCD_SIM_SLAVE_ED_STRUCT
134+ struct UX_DCD_SIM_SLAVE_ED_STRUCT
135135 ux_dcd_sim_slave_ed [UX_DCD_SIM_SLAVE_MAX_ED ];
136136#ifdef UX_DEVICE_BIDIRECTIONAL_ENDPOINT_SUPPORT
137- struct UX_DCD_SIM_SLAVE_ED_STRUCT
137+ struct UX_DCD_SIM_SLAVE_ED_STRUCT
138138 ux_dcd_sim_slave_ed_in [UX_DCD_SIM_SLAVE_MAX_ED ];
139139#endif
140140 UINT (* ux_dcd_sim_slave_dcd_control_request_process_hub )(UX_SLAVE_TRANSFER * transfer_request );
@@ -154,6 +154,7 @@ UINT _ux_dcd_sim_slave_frame_number_get(UX_DCD_SIM_SLAVE *dcd_sim_slave, ULON
154154UINT _ux_dcd_sim_slave_function (UX_SLAVE_DCD * dcd , UINT function , VOID * parameter );
155155UINT _ux_dcd_sim_slave_initialize (VOID );
156156UINT _ux_dcd_sim_slave_initialize_complete (VOID );
157+ UINT _ux_dcd_sim_slave_uninitialize (VOID );
157158UINT _ux_dcd_sim_slave_state_change (UX_DCD_SIM_SLAVE * dcd_sim_slave , ULONG state );
158159UINT _ux_dcd_sim_slave_transfer_request (UX_DCD_SIM_SLAVE * dcd_sim_slave , UX_SLAVE_TRANSFER * transfer_request );
159160UINT _ux_dcd_sim_slave_transfer_run (UX_DCD_SIM_SLAVE * dcd_sim_slave , UX_SLAVE_TRANSFER * transfer_request );
@@ -162,11 +163,12 @@ UINT _ux_dcd_sim_slave_transfer_abort(UX_DCD_SIM_SLAVE *dcd_sim_slave, UX_SLA
162163/* Define Device Simulator Class API prototypes. */
163164
164165#define ux_dcd_sim_slave_initialize _ux_dcd_sim_slave_initialize
166+ #define ux_dcd_sim_slave_uninitialize _ux_dcd_sim_slave_uninitialize
165167
166- /* Determine if a C++ compiler is being used. If so, complete the standard
167- C conditional started above. */
168+ /* Determine if a C++ compiler is being used. If so, complete the standard
169+ C conditional started above. */
168170#ifdef __cplusplus
169- }
171+ }
170172#endif
171173
172174#endif
0 commit comments