summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohamed AYED <[email protected]>2025-01-30 10:59:44 +0100
committerMohamed AYED <[email protected]>2025-01-30 12:43:34 +0100
commit5e271077bf06d86a55a6e81e5e56e48d1a2767f4 (patch)
tree282b8da328af26164aeb91e0c46498478e415836
parent2d4a4aea0c17e365fed92443b22b28e2f81bb114 (diff)
add user api for _ux_device_stack_microsoft_extension_register
-rw-r--r--common/core/inc/ux_api.h9
-rw-r--r--common/core/src/ux_device_stack_microsoft_extension_register.c42
-rw-r--r--test/regression/usbx_msrc_66679_test.c2
-rw-r--r--test/regression/usbx_msrc_72227_host_pima_read_test.c2
-rw-r--r--test/regression/usbx_msrc_72525_host_pima_obj_handles_get_test.c2
-rw-r--r--test/regression/usbx_msrc_72619_host_pima_stor_ids_get_test.c2
-rw-r--r--test/regression/usbx_msrc_81292_host_pima_deactivate_semaphore_test.c2
-rw-r--r--test/regression/usbx_msrc_81323_host_pima_deactivate_no_int_ep_test.c2
-rw-r--r--test/regression/usbx_msrc_84686_host_pima_storage_info_get_test.c2
-rw-r--r--test/regression/usbx_pima_basic_test.c2
10 files changed, 35 insertions, 32 deletions
diff --git a/common/core/inc/ux_api.h b/common/core/inc/ux_api.h
index 6689eb0..1c95a0d 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 c078e19..4a3ad24 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 c31a6aa..4664b26 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 e4e4616..8b783f5 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 36279dd..8625d24 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 21cb229..0e339ce 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 cbe7242..e31607e 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 882f961..fbec683 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 1a2909d..2b90a9d 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 8932004..0ea9912 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__);