Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions common/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ target_sources(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src/ux_dcd_sim_slave_function.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_dcd_sim_slave_initialize.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_dcd_sim_slave_initialize_complete.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_dcd_sim_slave_uninitialize.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_dcd_sim_slave_state_change.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_dcd_sim_slave_transfer_abort.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_dcd_sim_slave_transfer_request.c
Expand Down
68 changes: 35 additions & 33 deletions common/core/inc/ux_dcd_sim_slave.h
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
/***************************************************************************
* Copyright (c) 2024 Microsoft Corporation
*
* Copyright (c) 2024 Microsoft Corporation
*
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
*
*
* SPDX-License-Identifier: MIT
**************************************************************************/


/**************************************************************************/
/**************************************************************************/
/** */
/** USBX Component */
/** */
/** USBX Component */
/** */
/** Slave Simulator Controller Driver */
/** */
/**************************************************************************/
/**************************************************************************/


/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_dcd_sim_slave.h PORTABLE C */
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_dcd_sim_slave.h PORTABLE C */
/* 6.1.10 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* */
/* This file contains all the header and extern functions used by the */
/* USBX slave simulator. It is designed to work ONLY with the USBX */
/* host simulator. */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* USBX slave simulator. It is designed to work ONLY with the USBX */
/* host simulator. */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
/* resulting in version 6.1 */
Expand All @@ -60,15 +60,15 @@
#ifndef UX_DCD_SIM_SLAVE_H
#define UX_DCD_SIM_SLAVE_H

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

#ifdef __cplusplus
#ifdef __cplusplus

/* Yes, C++ compiler is present. Use standard C. */
extern "C" {
/* Yes, C++ compiler is present. Use standard C. */
extern "C" {

#endif
#endif


/* Define USB slave simulator major equivalences. */
Expand Down Expand Up @@ -110,7 +110,7 @@ extern "C" {

/* Define USB slave simulator physical endpoint structure. */

typedef struct UX_DCD_SIM_SLAVE_ED_STRUCT
typedef struct UX_DCD_SIM_SLAVE_ED_STRUCT
{

ULONG ux_sim_slave_ed_status;
Expand All @@ -119,22 +119,22 @@ typedef struct UX_DCD_SIM_SLAVE_ED_STRUCT
ULONG ux_sim_slave_ed_ping_pong;
ULONG ux_sim_slave_ed_status_register;
ULONG ux_sim_slave_ed_configuration_value;
struct UX_SLAVE_ENDPOINT_STRUCT
struct UX_SLAVE_ENDPOINT_STRUCT
*ux_sim_slave_ed_endpoint;
} UX_DCD_SIM_SLAVE_ED;


/* Define USB slave simulator DCD structure definition. */

typedef struct UX_DCD_SIM_SLAVE_STRUCT
{
{

struct UX_SLAVE_DCD_STRUCT
struct UX_SLAVE_DCD_STRUCT
*ux_dcd_sim_slave_dcd_owner;
struct UX_DCD_SIM_SLAVE_ED_STRUCT
struct UX_DCD_SIM_SLAVE_ED_STRUCT
ux_dcd_sim_slave_ed[UX_DCD_SIM_SLAVE_MAX_ED];
#ifdef UX_DEVICE_BIDIRECTIONAL_ENDPOINT_SUPPORT
struct UX_DCD_SIM_SLAVE_ED_STRUCT
struct UX_DCD_SIM_SLAVE_ED_STRUCT
ux_dcd_sim_slave_ed_in[UX_DCD_SIM_SLAVE_MAX_ED];
#endif
UINT (*ux_dcd_sim_slave_dcd_control_request_process_hub)(UX_SLAVE_TRANSFER *transfer_request);
Expand All @@ -154,6 +154,7 @@ UINT _ux_dcd_sim_slave_frame_number_get(UX_DCD_SIM_SLAVE *dcd_sim_slave, ULON
UINT _ux_dcd_sim_slave_function(UX_SLAVE_DCD *dcd, UINT function, VOID *parameter);
UINT _ux_dcd_sim_slave_initialize(VOID);
UINT _ux_dcd_sim_slave_initialize_complete(VOID);
UINT _ux_dcd_sim_slave_uninitialize(VOID);
UINT _ux_dcd_sim_slave_state_change(UX_DCD_SIM_SLAVE *dcd_sim_slave, ULONG state);
UINT _ux_dcd_sim_slave_transfer_request(UX_DCD_SIM_SLAVE *dcd_sim_slave, UX_SLAVE_TRANSFER *transfer_request);
UINT _ux_dcd_sim_slave_transfer_run(UX_DCD_SIM_SLAVE *dcd_sim_slave, UX_SLAVE_TRANSFER *transfer_request);
Expand All @@ -162,11 +163,12 @@ UINT _ux_dcd_sim_slave_transfer_abort(UX_DCD_SIM_SLAVE *dcd_sim_slave, UX_SLA
/* Define Device Simulator Class API prototypes. */

#define ux_dcd_sim_slave_initialize _ux_dcd_sim_slave_initialize
#define ux_dcd_sim_slave_uninitialize _ux_dcd_sim_slave_uninitialize

/* Determine if a C++ compiler is being used. If so, complete the standard
C conditional started above. */
/* Determine if a C++ compiler is being used. If so, complete the standard
C conditional started above. */
#ifdef __cplusplus
}
}
#endif

#endif
Expand Down
Loading