Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add user api for _ux_device_stack_microsoft_extension_register #184

Merged
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
9 changes: 6 additions & 3 deletions common/core/inc/ux_api.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/***************************************************************************
* 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
**************************************************************************/

Expand Down Expand Up @@ -2838,6 +2838,7 @@ typedef struct UX_HOST_CLASS_DPUMP_STRUCT
#define ux_device_stack_interface_start _ux_device_stack_interface_start
#define ux_device_stack_transfer_request _ux_device_stack_transfer_request
#define ux_device_stack_transfer_abort _ux_device_stack_transfer_abort
#define ux_device_stack_microsoft_extension_register _ux_device_stack_microsoft_extension_register

#define ux_device_stack_tasks_run _ux_device_stack_tasks_run
#define ux_device_stack_transfer_run _ux_device_stack_transfer_run
Expand Down Expand Up @@ -2938,6 +2939,8 @@ UINT ux_device_stack_interface_set(UCHAR * device_framework, ULONG device_fra
UINT ux_device_stack_interface_start(UX_SLAVE_INTERFACE *ux_interface);
UINT ux_device_stack_transfer_request(UX_SLAVE_TRANSFER *transfer_request, ULONG slave_length, ULONG host_length);
UINT ux_device_stack_transfer_request_abort(UX_SLAVE_TRANSFER *transfer_request, ULONG completion_code);
UINT ux_device_stack_microsoft_extension_register(ULONG vendor_request,
UINT (*vendor_request_function)(ULONG, ULONG, ULONG, ULONG, UCHAR *, ULONG *));

UINT ux_device_stack_tasks_run(VOID);
UINT ux_device_stack_transfer_run(UX_SLAVE_TRANSFER *transfer_request, ULONG slave_length, ULONG host_length);
Expand Down
42 changes: 21 additions & 21 deletions common/core/src/ux_device_stack_microsoft_extension_register.c
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/***************************************************************************
* 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 */
/** */
/** Device Stack */
/** */
Expand Down Expand Up @@ -45,31 +45,31 @@
/* */
/* INPUT */
/* */
/* vendor_command Vendor Command. */
/* application_callback Application Callback */
/* vendor_command Vendor Command. */
/* application_callback Application Callback */
/* */
/* OUTPUT */
/* */
/* Completion Status */
/* Completion Status */
/* */
/* CALLS */
/* */
/* CALLS */
/* */
/* None */
/* */
/* CALLED BY */
/* */
/* Application */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* */
/* CALLED BY */
/* */
/* Application */
/* */
/* 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 */
/* */
/**************************************************************************/
UINT _ux_device_stack_microsoft_extension_register(ULONG vendor_request,
UINT _ux_device_stack_microsoft_extension_register(ULONG vendor_request,
UINT (*vendor_request_function)(ULONG, ULONG, ULONG, ULONG, UCHAR *, ULONG *))
{

Expand All @@ -79,7 +79,7 @@ UINT _ux_device_stack_microsoft_extension_register(ULONG vendor_request,

/* Store the vendor command. */
_ux_system_slave -> ux_system_slave_device_vendor_request = vendor_request;
_ux_system_slave -> ux_system_slave_device_vendor_request_function = vendor_request_function;
_ux_system_slave -> ux_system_slave_device_vendor_request_function = vendor_request_function;

/* Return successful completion. */
return(UX_SUCCESS);
Expand Down
2 changes: 1 addition & 1 deletion test/regression/usbx_msrc_66679_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ CHAR * memory_pointer;
}

/* MS extensions. */
status = _ux_device_stack_microsoft_extension_register(UX_DEMO_VENDOR_REQUEST, test_ms_vendor_request);
status = ux_device_stack_microsoft_extension_register(UX_DEMO_VENDOR_REQUEST, test_ms_vendor_request);

if(status!=UX_SUCCESS)
{
Expand Down
2 changes: 1 addition & 1 deletion test/regression/usbx_msrc_72227_host_pima_read_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ ULONG test_n;
}

/* MTP requires MTP extensions. */
status = _ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
status = ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
if (status != UX_SUCCESS)
{
printf("ERROR #%d\n", __LINE__);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ ULONG test_n;
}

/* MTP requires MTP extensions. */
status = _ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
status = ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
if (status != UX_SUCCESS)
{
printf("ERROR #%d\n", __LINE__);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ ULONG test_n;
}

/* MTP requires MTP extensions. */
status = _ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
status = ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
if (status != UX_SUCCESS)
{
printf("ERROR #%d\n", __LINE__);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ ULONG test_n;
}

/* MTP requires MTP extensions. */
status = _ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
status = ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
if (status != UX_SUCCESS)
{
printf("ERROR #%d\n", __LINE__);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ ULONG test_n;
}

/* MTP requires MTP extensions. */
status = _ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
status = ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
if (status != UX_SUCCESS)
{
printf("ERROR #%d\n", __LINE__);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ ULONG test_n;
}

/* MTP requires MTP extensions. */
status = _ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
status = ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
if (status != UX_SUCCESS)
{
printf("ERROR #%d\n", __LINE__);
Expand Down
2 changes: 1 addition & 1 deletion test/regression/usbx_pima_basic_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ ULONG test_n;
}

/* MTP requires MTP extensions. */
status = _ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
status = ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
if (status != UX_SUCCESS)
{
printf("ERROR #%d\n", __LINE__);
Expand Down