Skip to content

Commit 424ce27

Browse files
authored
Merge pull request #184 from ayedm1/add-user-api-for-ux_device_stack_microsoft_extension_register
add user api for _ux_device_stack_microsoft_extension_register
2 parents 93d7dcc + 5e27107 commit 424ce27

10 files changed

+35
-32
lines changed

common/core/inc/ux_api.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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

@@ -2842,6 +2842,7 @@ typedef struct UX_HOST_CLASS_DPUMP_STRUCT
28422842
#define ux_device_stack_interface_start _ux_device_stack_interface_start
28432843
#define ux_device_stack_transfer_request _ux_device_stack_transfer_request
28442844
#define ux_device_stack_transfer_abort _ux_device_stack_transfer_abort
2845+
#define ux_device_stack_microsoft_extension_register _ux_device_stack_microsoft_extension_register
28452846

28462847
#define ux_device_stack_tasks_run _ux_device_stack_tasks_run
28472848
#define ux_device_stack_transfer_run _ux_device_stack_transfer_run
@@ -2942,6 +2943,8 @@ UINT ux_device_stack_interface_set(UCHAR * device_framework, ULONG device_fra
29422943
UINT ux_device_stack_interface_start(UX_SLAVE_INTERFACE *ux_interface);
29432944
UINT ux_device_stack_transfer_request(UX_SLAVE_TRANSFER *transfer_request, ULONG slave_length, ULONG host_length);
29442945
UINT ux_device_stack_transfer_request_abort(UX_SLAVE_TRANSFER *transfer_request, ULONG completion_code);
2946+
UINT ux_device_stack_microsoft_extension_register(ULONG vendor_request,
2947+
UINT (*vendor_request_function)(ULONG, ULONG, ULONG, ULONG, UCHAR *, ULONG *));
29452948

29462949
UINT ux_device_stack_tasks_run(VOID);
29472950
UINT ux_device_stack_transfer_run(UX_SLAVE_TRANSFER *transfer_request, ULONG slave_length, ULONG host_length);

common/core/src/ux_device_stack_microsoft_extension_register.c

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
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
/** Device Stack */
1818
/** */
@@ -45,31 +45,31 @@
4545
/* */
4646
/* INPUT */
4747
/* */
48-
/* vendor_command Vendor Command. */
49-
/* application_callback Application Callback */
48+
/* vendor_command Vendor Command. */
49+
/* application_callback Application Callback */
5050
/* */
5151
/* OUTPUT */
5252
/* */
53-
/* Completion Status */
53+
/* Completion Status */
54+
/* */
55+
/* CALLS */
5456
/* */
55-
/* CALLS */
56-
/* */
5757
/* None */
58-
/* */
59-
/* CALLED BY */
60-
/* */
61-
/* Application */
62-
/* */
63-
/* RELEASE HISTORY */
64-
/* */
65-
/* DATE NAME DESCRIPTION */
66-
/* */
58+
/* */
59+
/* CALLED BY */
60+
/* */
61+
/* Application */
62+
/* */
63+
/* RELEASE HISTORY */
64+
/* */
65+
/* DATE NAME DESCRIPTION */
66+
/* */
6767
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
6868
/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
6969
/* resulting in version 6.1 */
7070
/* */
7171
/**************************************************************************/
72-
UINT _ux_device_stack_microsoft_extension_register(ULONG vendor_request,
72+
UINT _ux_device_stack_microsoft_extension_register(ULONG vendor_request,
7373
UINT (*vendor_request_function)(ULONG, ULONG, ULONG, ULONG, UCHAR *, ULONG *))
7474
{
7575

@@ -79,7 +79,7 @@ UINT _ux_device_stack_microsoft_extension_register(ULONG vendor_request,
7979

8080
/* Store the vendor command. */
8181
_ux_system_slave -> ux_system_slave_device_vendor_request = vendor_request;
82-
_ux_system_slave -> ux_system_slave_device_vendor_request_function = vendor_request_function;
82+
_ux_system_slave -> ux_system_slave_device_vendor_request_function = vendor_request_function;
8383

8484
/* Return successful completion. */
8585
return(UX_SUCCESS);

test/regression/usbx_msrc_66679_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ CHAR * memory_pointer;
743743
}
744744

745745
/* MS extensions. */
746-
status = _ux_device_stack_microsoft_extension_register(UX_DEMO_VENDOR_REQUEST, test_ms_vendor_request);
746+
status = ux_device_stack_microsoft_extension_register(UX_DEMO_VENDOR_REQUEST, test_ms_vendor_request);
747747

748748
if(status!=UX_SUCCESS)
749749
{

test/regression/usbx_msrc_72227_host_pima_read_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ ULONG test_n;
874874
}
875875

876876
/* MTP requires MTP extensions. */
877-
status = _ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
877+
status = ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
878878
if (status != UX_SUCCESS)
879879
{
880880
printf("ERROR #%d\n", __LINE__);

test/regression/usbx_msrc_72525_host_pima_obj_handles_get_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ ULONG test_n;
874874
}
875875

876876
/* MTP requires MTP extensions. */
877-
status = _ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
877+
status = ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
878878
if (status != UX_SUCCESS)
879879
{
880880
printf("ERROR #%d\n", __LINE__);

test/regression/usbx_msrc_72619_host_pima_stor_ids_get_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ ULONG test_n;
874874
}
875875

876876
/* MTP requires MTP extensions. */
877-
status = _ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
877+
status = ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
878878
if (status != UX_SUCCESS)
879879
{
880880
printf("ERROR #%d\n", __LINE__);

test/regression/usbx_msrc_81292_host_pima_deactivate_semaphore_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ ULONG test_n;
874874
}
875875

876876
/* MTP requires MTP extensions. */
877-
status = _ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
877+
status = ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
878878
if (status != UX_SUCCESS)
879879
{
880880
printf("ERROR #%d\n", __LINE__);

test/regression/usbx_msrc_81323_host_pima_deactivate_no_int_ep_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ ULONG test_n;
868868
}
869869

870870
/* MTP requires MTP extensions. */
871-
status = _ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
871+
status = ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
872872
if (status != UX_SUCCESS)
873873
{
874874
printf("ERROR #%d\n", __LINE__);

test/regression/usbx_msrc_84686_host_pima_storage_info_get_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ ULONG test_n;
875875
}
876876

877877
/* MTP requires MTP extensions. */
878-
status = _ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
878+
status = ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
879879
if (status != UX_SUCCESS)
880880
{
881881
printf("ERROR #%d\n", __LINE__);

test/regression/usbx_pima_basic_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ ULONG test_n;
874874
}
875875

876876
/* MTP requires MTP extensions. */
877-
status = _ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
877+
status = ux_device_stack_microsoft_extension_register(UX_TEST_VENDOR_REQUEST, pima_device_vendor_request);
878878
if (status != UX_SUCCESS)
879879
{
880880
printf("ERROR #%d\n", __LINE__);

0 commit comments

Comments
 (0)