Skip to content

Commit 2806b1b

Browse files
committed
HOST SIM: Add missing uninitialize macro in simulator host header
1 parent 515c9a4 commit 2806b1b

1 file changed

Lines changed: 62 additions & 61 deletions

File tree

common/core/inc/ux_hcd_sim_host.h

Lines changed: 62 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
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
/** Host Simulator Controller Driver */
1818
/** */
1919
/**************************************************************************/
2020
/**************************************************************************/
2121

2222

23-
/**************************************************************************/
24-
/* */
25-
/* COMPONENT DEFINITION RELEASE */
26-
/* */
27-
/* ux_hcd_sim_host.h PORTABLE C */
23+
/**************************************************************************/
24+
/* */
25+
/* COMPONENT DEFINITION RELEASE */
26+
/* */
27+
/* ux_hcd_sim_host.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 host simulator. It is designed to work ONLY with the USBX */
37-
/* device (slave) simulator. */
38-
/* */
39-
/* RELEASE HISTORY */
40-
/* */
41-
/* DATE NAME DESCRIPTION */
42-
/* */
36+
/* USBX host simulator. It is designed to work ONLY with the USBX */
37+
/* device (slave) 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
/* added controller disable, */
@@ -66,23 +66,23 @@
6666
#ifndef UX_HCD_SIM_HOST_H
6767
#define UX_HCD_SIM_HOST_H
6868

69-
/* Determine if a C++ compiler is being used. If so, ensure that standard
70-
C is used to process the API information. */
69+
/* Determine if a C++ compiler is being used. If so, ensure that standard
70+
C is used to process the API information. */
7171

72-
#ifdef __cplusplus
72+
#ifdef __cplusplus
7373

74-
/* Yes, C++ compiler is present. Use standard C. */
75-
extern "C" {
74+
/* Yes, C++ compiler is present. Use standard C. */
75+
extern "C" {
7676

77-
#endif
77+
#endif
7878

7979

8080
/* Define simulator host generic definitions. */
8181

8282
#define UX_HCD_SIM_HOST_CONTROLLER 99
8383
#define UX_HCD_SIM_HOST_MAX_PAYLOAD 4096
84-
#define UX_HCD_SIM_HOST_FRAME_DELAY 4
85-
#define UX_HCD_SIM_HOST_PERIODIC_ENTRY_NB 32
84+
#define UX_HCD_SIM_HOST_FRAME_DELAY 4
85+
#define UX_HCD_SIM_HOST_PERIODIC_ENTRY_NB 32
8686
#define UX_HCD_SIM_HOST_PERIODIC_ENTRY_MASK 0x1f
8787
#define UX_HCD_SIM_HOST_AVAILABLE_BANDWIDTH 6000
8888

@@ -116,19 +116,19 @@ typedef struct UX_HCD_SIM_HOST_STRUCT
116116
ULONG ux_hcd_sim_host_hcor;
117117
UINT ux_hcd_sim_host_nb_root_hubs;
118118
ULONG ux_hcd_sim_host_port_status[1];
119-
struct UX_HCD_SIM_HOST_ED_STRUCT
119+
struct UX_HCD_SIM_HOST_ED_STRUCT
120120
*ux_hcd_sim_host_ed_list;
121-
struct UX_HCD_SIM_HOST_TD_STRUCT
121+
struct UX_HCD_SIM_HOST_TD_STRUCT
122122
*ux_hcd_sim_host_td_list;
123-
struct UX_HCD_SIM_HOST_ISO_TD_STRUCT
123+
struct UX_HCD_SIM_HOST_ISO_TD_STRUCT
124124
*ux_hcd_sim_host_iso_td_list;
125-
struct UX_HCD_SIM_HOST_ED_STRUCT
125+
struct UX_HCD_SIM_HOST_ED_STRUCT
126126
*ux_hcd_sim_host_asynch_head_ed;
127-
struct UX_HCD_SIM_HOST_ED_STRUCT
127+
struct UX_HCD_SIM_HOST_ED_STRUCT
128128
*ux_hcd_sim_host_asynch_current_ed;
129-
struct UX_HCD_SIM_HOST_ED_STRUCT
129+
struct UX_HCD_SIM_HOST_ED_STRUCT
130130
*ux_hcd_sim_host_iso_head_ed;
131-
struct UX_HCD_SIM_HOST_ED_STRUCT
131+
struct UX_HCD_SIM_HOST_ED_STRUCT
132132
*ux_hcd_sim_host_interrupt_ed_list[32];
133133
UINT ux_hcd_sim_host_queue_empty;
134134
UINT ux_hcd_sim_host_periodic_scheduler_active;
@@ -145,19 +145,19 @@ typedef struct UX_HCD_SIM_HOST_STRUCT
145145
typedef struct UX_HCD_SIM_HOST_ED_STRUCT
146146
{
147147

148-
struct UX_HCD_SIM_HOST_TD_STRUCT
148+
struct UX_HCD_SIM_HOST_TD_STRUCT
149149
*ux_sim_host_ed_tail_td;
150-
struct UX_HCD_SIM_HOST_TD_STRUCT
150+
struct UX_HCD_SIM_HOST_TD_STRUCT
151151
*ux_sim_host_ed_head_td;
152-
struct UX_HCD_SIM_HOST_ED_STRUCT
152+
struct UX_HCD_SIM_HOST_ED_STRUCT
153153
*ux_sim_host_ed_next_ed;
154-
struct UX_HCD_SIM_HOST_ED_STRUCT
154+
struct UX_HCD_SIM_HOST_ED_STRUCT
155155
*ux_sim_host_ed_previous_ed;
156156
ULONG ux_sim_host_ed_status;
157-
struct UX_ENDPOINT_STRUCT
157+
struct UX_ENDPOINT_STRUCT
158158
*ux_sim_host_ed_endpoint;
159-
ULONG ux_sim_host_ed_toggle;
160-
ULONG ux_sim_host_ed_frame;
159+
ULONG ux_sim_host_ed_toggle;
160+
ULONG ux_sim_host_ed_frame;
161161
} UX_HCD_SIM_HOST_ED;
162162

163163

@@ -171,17 +171,17 @@ typedef struct UX_HCD_SIM_HOST_ED_STRUCT
171171
/* Define simulator host TD structure. */
172172

173173
typedef struct UX_HCD_SIM_HOST_TD_STRUCT
174-
{
174+
{
175175

176176
UCHAR * ux_sim_host_td_buffer;
177177
ULONG ux_sim_host_td_length;
178-
struct UX_HCD_SIM_HOST_TD_STRUCT
178+
struct UX_HCD_SIM_HOST_TD_STRUCT
179179
*ux_sim_host_td_next_td;
180-
struct UX_TRANSFER_STRUCT
180+
struct UX_TRANSFER_STRUCT
181181
*ux_sim_host_td_transfer_request;
182-
struct UX_HCD_SIM_HOST_TD_STRUCT
182+
struct UX_HCD_SIM_HOST_TD_STRUCT
183183
*ux_sim_host_td_next_td_transfer_request;
184-
struct UX_HCD_SIM_HOST_ED_STRUCT
184+
struct UX_HCD_SIM_HOST_ED_STRUCT
185185
*ux_sim_host_td_ed;
186186
ULONG ux_sim_host_td_actual_length;
187187
ULONG ux_sim_host_td_status;
@@ -192,12 +192,12 @@ typedef struct UX_HCD_SIM_HOST_TD_STRUCT
192192

193193
/* Define simulator host TD bitmap. */
194194

195-
#define UX_HCD_SIM_HOST_TD_SETUP_PHASE 0x00010000
196-
#define UX_HCD_SIM_HOST_TD_DATA_PHASE 0x00020000
197-
#define UX_HCD_SIM_HOST_TD_STATUS_PHASE 0x00040000
195+
#define UX_HCD_SIM_HOST_TD_SETUP_PHASE 0x00010000
196+
#define UX_HCD_SIM_HOST_TD_DATA_PHASE 0x00020000
197+
#define UX_HCD_SIM_HOST_TD_STATUS_PHASE 0x00040000
198198
#define UX_HCD_SIM_HOST_TD_OUT 0x00000800
199199
#define UX_HCD_SIM_HOST_TD_IN 0x00001000
200-
#define UX_HCD_SIM_HOST_TD_ACK_PENDING 0x00002000
200+
#define UX_HCD_SIM_HOST_TD_ACK_PENDING 0x00002000
201201
#define UX_HCD_SIM_HOST_TD_TOGGLE_FROM_ED 0x80000000
202202

203203

@@ -208,13 +208,13 @@ typedef struct UX_HCD_SIM_HOST_ISO_TD_STRUCT
208208

209209
UCHAR * ux_sim_host_iso_td_buffer;
210210
ULONG ux_sim_host_iso_td_length;
211-
struct UX_HCD_SIM_HOST_ISO_TD_STRUCT
211+
struct UX_HCD_SIM_HOST_ISO_TD_STRUCT
212212
*ux_sim_host_iso_td_next_td;
213-
struct UX_TRANSFER_STRUCT
213+
struct UX_TRANSFER_STRUCT
214214
*ux_sim_host_iso_td_transfer_request;
215-
struct UX_HCD_SIM_HOST_ISO_TD_STRUCT
215+
struct UX_HCD_SIM_HOST_ISO_TD_STRUCT
216216
*ux_sim_host_iso_td_next_td_transfer_request;
217-
struct UX_HCD_SIM_HOST_ED_STRUCT
217+
struct UX_HCD_SIM_HOST_ED_STRUCT
218218
*ux_sim_host_iso_td_ed;
219219
ULONG ux_sim_host_iso_td_actual_length;
220220
ULONG ux_sim_host_iso_td_status;
@@ -228,7 +228,7 @@ VOID _ux_hcd_sim_host_asynch_queue_process(UX_HCD_SIM_HOST *hcd_sim_host);
228228
VOID _ux_hcd_sim_host_asynch_schedule(UX_HCD_SIM_HOST *hcd_sim_host);
229229
UINT _ux_hcd_sim_host_asynchronous_endpoint_create(UX_HCD_SIM_HOST *hcd_sim_host, UX_ENDPOINT *endpoint);
230230
UINT _ux_hcd_sim_host_asynchronous_endpoint_destroy(UX_HCD_SIM_HOST *hcd_sim_host, UX_ENDPOINT *endpoint);
231-
UX_HCD_SIM_HOST_ED
231+
UX_HCD_SIM_HOST_ED
232232
*_ux_hcd_sim_host_ed_obtain(UX_HCD_SIM_HOST *hcd_sim_host);
233233
VOID _ux_hcd_sim_host_ed_td_clean(UX_HCD_SIM_HOST_ED *ed);
234234
UINT _ux_hcd_sim_host_endpoint_reset(UX_HCD_SIM_HOST *hcd_sim_host, UX_ENDPOINT *endpoint);
@@ -242,15 +242,15 @@ UINT _ux_hcd_sim_host_interrupt_endpoint_create(UX_HCD_SIM_HOST *hcd_sim_host
242242
VOID _ux_hcd_sim_host_iso_queue_process(UX_HCD_SIM_HOST *hcd_sim_host);
243243
VOID _ux_hcd_sim_host_iso_schedule(UX_HCD_SIM_HOST *hcd_sim_host);
244244
UINT _ux_hcd_sim_host_isochronous_endpoint_create(UX_HCD_SIM_HOST *hcd_sim_host, UX_ENDPOINT *endpoint);
245-
UX_HCD_SIM_HOST_ISO_TD
245+
UX_HCD_SIM_HOST_ISO_TD
246246
*_ux_hcd_sim_host_isochronous_td_obtain(UX_HCD_SIM_HOST *hcd_sim_host);
247-
UX_HCD_SIM_HOST_ED
247+
UX_HCD_SIM_HOST_ED
248248
*_ux_hcd_sim_host_least_traffic_list_get(UX_HCD_SIM_HOST *hcd_sim_host);
249249
UINT _ux_hcd_sim_host_periodic_endpoint_destroy(UX_HCD_SIM_HOST *hcd_sim_host, UX_ENDPOINT *endpoint);
250250
VOID _ux_hcd_sim_host_periodic_schedule(UX_HCD_SIM_HOST *hcd_sim_host);
251251
UINT _ux_hcd_sim_host_periodic_tree_create(UX_HCD_SIM_HOST *hcd_sim_host);
252252
ULONG _ux_hcd_sim_host_port_status_get(UX_HCD_SIM_HOST *hcd_sim_host, ULONG port_index);
253-
UX_HCD_SIM_HOST_TD
253+
UX_HCD_SIM_HOST_TD
254254
*_ux_hcd_sim_host_regular_td_obtain(UX_HCD_SIM_HOST *hcd_sim_host);
255255
UINT _ux_hcd_sim_host_request_bulk_transfer(UX_HCD_SIM_HOST *hcd_sim_host, UX_TRANSFER *transfer_request);
256256
UINT _ux_hcd_sim_host_request_control_transfer(UX_HCD_SIM_HOST *hcd_sim_host, UX_TRANSFER *transfer_request);
@@ -267,11 +267,12 @@ UINT _ux_hcd_sim_host_transfer_run(UX_HCD_SIM_HOST *hcd_sim_host, UX_TRANSFER
267267
/* Define Device Simulator Class API prototypes. */
268268

269269
#define ux_hcd_sim_host_initialize _ux_hcd_sim_host_initialize
270-
/* Determine if a C++ compiler is being used. If so, complete the standard
271-
C conditional started above. */
270+
#define ux_hcd_sim_host_uninitialize _ux_hcd_sim_host_uninitialize
271+
272+
/* Determine if a C++ compiler is being used. If so, complete the standard
273+
C conditional started above. */
272274
#ifdef __cplusplus
273-
}
275+
}
274276
#endif
275277

276278
#endif
277-

0 commit comments

Comments
 (0)