diff --git a/common/core/inc/ux_api.h b/common/core/inc/ux_api.h index 6689eb02..1c95a0de 100644 --- a/common/core/inc/ux_api.h +++ b/common/core/inc/ux_api.h @@ -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 **************************************************************************/ @@ -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 @@ -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); diff --git a/common/core/src/ux_device_stack_microsoft_extension_register.c b/common/core/src/ux_device_stack_microsoft_extension_register.c index c078e199..4a3ad240 100644 --- a/common/core/src/ux_device_stack_microsoft_extension_register.c +++ b/common/core/src/ux_device_stack_microsoft_extension_register.c @@ -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 */ /** */ @@ -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 *)) { @@ -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); diff --git a/test/regression/usbx_msrc_66679_test.c b/test/regression/usbx_msrc_66679_test.c index c31a6aa8..4664b26b 100644 --- a/test/regression/usbx_msrc_66679_test.c +++ b/test/regression/usbx_msrc_66679_test.c @@ -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) { diff --git a/test/regression/usbx_msrc_72227_host_pima_read_test.c b/test/regression/usbx_msrc_72227_host_pima_read_test.c index e4e46161..8b783f5a 100644 --- a/test/regression/usbx_msrc_72227_host_pima_read_test.c +++ b/test/regression/usbx_msrc_72227_host_pima_read_test.c @@ -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__); diff --git a/test/regression/usbx_msrc_72525_host_pima_obj_handles_get_test.c b/test/regression/usbx_msrc_72525_host_pima_obj_handles_get_test.c index 36279dd6..8625d242 100644 --- a/test/regression/usbx_msrc_72525_host_pima_obj_handles_get_test.c +++ b/test/regression/usbx_msrc_72525_host_pima_obj_handles_get_test.c @@ -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__); diff --git a/test/regression/usbx_msrc_72619_host_pima_stor_ids_get_test.c b/test/regression/usbx_msrc_72619_host_pima_stor_ids_get_test.c index 21cb2295..0e339ce1 100644 --- a/test/regression/usbx_msrc_72619_host_pima_stor_ids_get_test.c +++ b/test/regression/usbx_msrc_72619_host_pima_stor_ids_get_test.c @@ -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__); diff --git a/test/regression/usbx_msrc_81292_host_pima_deactivate_semaphore_test.c b/test/regression/usbx_msrc_81292_host_pima_deactivate_semaphore_test.c index cbe72426..e31607e9 100644 --- a/test/regression/usbx_msrc_81292_host_pima_deactivate_semaphore_test.c +++ b/test/regression/usbx_msrc_81292_host_pima_deactivate_semaphore_test.c @@ -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__); diff --git a/test/regression/usbx_msrc_81323_host_pima_deactivate_no_int_ep_test.c b/test/regression/usbx_msrc_81323_host_pima_deactivate_no_int_ep_test.c index 882f9616..fbec683a 100644 --- a/test/regression/usbx_msrc_81323_host_pima_deactivate_no_int_ep_test.c +++ b/test/regression/usbx_msrc_81323_host_pima_deactivate_no_int_ep_test.c @@ -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__); diff --git a/test/regression/usbx_msrc_84686_host_pima_storage_info_get_test.c b/test/regression/usbx_msrc_84686_host_pima_storage_info_get_test.c index 1a2909da..2b90a9de 100644 --- a/test/regression/usbx_msrc_84686_host_pima_storage_info_get_test.c +++ b/test/regression/usbx_msrc_84686_host_pima_storage_info_get_test.c @@ -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__); diff --git a/test/regression/usbx_pima_basic_test.c b/test/regression/usbx_pima_basic_test.c index 8932004e..0ea99120 100644 --- a/test/regression/usbx_pima_basic_test.c +++ b/test/regression/usbx_pima_basic_test.c @@ -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__);