summaryrefslogtreecommitdiff
path: root/common/usbx_host_controllers
diff options
context:
space:
mode:
Diffstat (limited to 'common/usbx_host_controllers')
-rw-r--r--common/usbx_host_controllers/inc/ux_hcd_ehci.h13
-rw-r--r--common/usbx_host_controllers/inc/ux_hcd_ohci.h4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_asynch_td_process.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_asynchronous_endpoint_create.c8
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_asynchronous_endpoint_destroy.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_controller_disable.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_done_queue_process.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_door_bell_wait.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_ed_clean.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_ed_obtain.c8
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_endpoint_reset.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_entry.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_frame_number_get.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_frame_number_set.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_fsisochronous_td_obtain.c8
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_fsisochronous_tds_process.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_hsisochronous_td_obtain.c8
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_hsisochronous_tds_process.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_initialize.c15
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_create.c8
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_destroy.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_handler.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_create.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_destroy.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_least_traffic_list_get.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_next_td_clean.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_periodic_descriptor_link.c6
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_periodic_tree_create.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_poll_rate_entry_get.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_port_disable.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_port_reset.c11
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_port_resume.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_port_status_get.c11
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_port_suspend.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_power_down_port.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_power_on_port.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_power_root_hubs.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_register_read.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_register_write.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_regular_td_obtain.c8
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_request_bulk_transfer.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_request_control_transfer.c7
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_request_interrupt_transfer.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_request_isochronous_transfer.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_request_transfer.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_request_transfer_add.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_transfer_abort.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_transfer_request_process.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_create.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_destroy.c6
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_controller_disable.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_done_queue_process.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_ed_obtain.c8
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_endpoint_error_clear.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_endpoint_reset.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_entry.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_frame_number_get.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_frame_number_set.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_initialize.c17
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_interrupt_endpoint_create.c6
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_interrupt_handler.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_isochronous_endpoint_create.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_isochronous_td_obtain.c8
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_least_traffic_list_get.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_next_td_clean.c6
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_periodic_endpoint_destroy.c6
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_periodic_tree_create.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_port_disable.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_port_enable.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_port_reset.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_port_resume.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_port_status_get.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_port_suspend.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_power_down_port.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_power_on_port.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_power_root_hubs.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_register_read.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_register_write.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_regular_td_obtain.c8
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_request_bulk_transfer.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_request_control_transfer.c7
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_request_interupt_transfer.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_request_isochronous_transfer.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_request_transfer.c4
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_transfer_abort.c6
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_transfer_request_process.c4
86 files changed, 327 insertions, 118 deletions
diff --git a/common/usbx_host_controllers/inc/ux_hcd_ehci.h b/common/usbx_host_controllers/inc/ux_hcd_ehci.h
index d4a4c49..01939a5 100644
--- a/common/usbx_host_controllers/inc/ux_hcd_ehci.h
+++ b/common/usbx_host_controllers/inc/ux_hcd_ehci.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_hcd_ehci.h PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -347,9 +352,9 @@ typedef struct UX_HCD_EHCI_STRUCT
*ux_hcd_ehci_iso_done_transfer_tail;
struct UX_EHCI_ED_STRUCT
*ux_hcd_ehci_interrupt_ed_list;
- TX_MUTEX ux_hcd_ehci_periodic_mutex;
- TX_SEMAPHORE ux_hcd_ehci_protect_semaphore;
- TX_SEMAPHORE ux_hcd_ehci_doorbell_semaphore;
+ UX_MUTEX ux_hcd_ehci_periodic_mutex;
+ UX_SEMAPHORE ux_hcd_ehci_protect_semaphore;
+ UX_SEMAPHORE ux_hcd_ehci_doorbell_semaphore;
ULONG ux_hcd_ehci_frame_list_size;
ULONG ux_hcd_ehci_interrupt_count;
ULONG ux_hcd_ehci_embedded_tt;
diff --git a/common/usbx_host_controllers/inc/ux_hcd_ohci.h b/common/usbx_host_controllers/inc/ux_hcd_ohci.h
index 2463440..0277794 100644
--- a/common/usbx_host_controllers/inc/ux_hcd_ohci.h
+++ b/common/usbx_host_controllers/inc/ux_hcd_ohci.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_hcd_ohci.h PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,8 @@
/* 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 */
/* */
/**************************************************************************/
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_asynch_td_process.c b/common/usbx_host_controllers/src/ux_hcd_ehci_asynch_td_process.c
index b0f1a58..991a790 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_asynch_td_process.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_asynch_td_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_asynch_td_process PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* 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 */
/* */
/**************************************************************************/
UX_EHCI_TD *_ux_hcd_ehci_asynch_td_process(UX_EHCI_ED *ed, UX_EHCI_TD *td)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_asynchronous_endpoint_create.c b/common/usbx_host_controllers/src/ux_hcd_ehci_asynchronous_endpoint_create.c
index f7e22d5..13c8087 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_asynchronous_endpoint_create.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_asynchronous_endpoint_create.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_asynchronous_endpoint_create PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_asynchronous_endpoint_create(UX_HCD_EHCI *hcd_ehci, UX_ENDPOINT *endpoint)
@@ -134,6 +138,7 @@ UX_EHCI_LINK_POINTER queue_head;
case UX_FULL_SPEED_DEVICE:
+#if UX_MAX_DEVICES > 1
/* The device must be on a hub for this code to execute. We still do a sanity check. */
if (device -> ux_device_parent != UX_NULL)
{
@@ -144,6 +149,7 @@ UX_EHCI_LINK_POINTER queue_head;
/* And the port index onto which this device is attached. */
ed -> ux_ehci_ed_cap1 |= device -> ux_device_port_location << UX_EHCI_QH_PORT_NUMBER_LOC;
}
+#endif
break;
}
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_asynchronous_endpoint_destroy.c b/common/usbx_host_controllers/src/ux_hcd_ehci_asynchronous_endpoint_destroy.c
index 308c71e..f5c0511 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_asynchronous_endpoint_destroy.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_asynchronous_endpoint_destroy.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_asynchronous_endpoint_destroy PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* 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_hcd_ehci_asynchronous_endpoint_destroy(UX_HCD_EHCI *hcd_ehci, UX_ENDPOINT *endpoint)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_controller_disable.c b/common/usbx_host_controllers/src/ux_hcd_ehci_controller_disable.c
index 4d8e648..d8c6ea2 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_controller_disable.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_controller_disable.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_controller_disable PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* 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_hcd_ehci_controller_disable(UX_HCD_EHCI *hcd_ehci)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_done_queue_process.c b/common/usbx_host_controllers/src/ux_hcd_ehci_done_queue_process.c
index 722c3dc..f134626 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_done_queue_process.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_done_queue_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_done_queue_process PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,8 @@
/* 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 */
/* */
/**************************************************************************/
VOID _ux_hcd_ehci_done_queue_process(UX_HCD_EHCI *hcd_ehci)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_door_bell_wait.c b/common/usbx_host_controllers/src/ux_hcd_ehci_door_bell_wait.c
index 39f8b87..9529da6 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_door_bell_wait.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_door_bell_wait.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_door_bell_wait PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* 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 */
/* */
/**************************************************************************/
VOID _ux_hcd_ehci_door_bell_wait(UX_HCD_EHCI *hcd_ehci)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_ed_clean.c b/common/usbx_host_controllers/src/ux_hcd_ehci_ed_clean.c
index a60653a..3d862e7 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_ed_clean.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_ed_clean.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_ed_clean PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* 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_hcd_ehci_ed_clean(UX_EHCI_ED *ed)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_ed_obtain.c b/common/usbx_host_controllers/src/ux_hcd_ehci_ed_obtain.c
index 85d72fb..44267ba 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_ed_obtain.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_ed_obtain.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_ed_obtain PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -65,6 +65,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UX_EHCI_ED *_ux_hcd_ehci_ed_obtain(UX_HCD_EHCI *hcd_ehci)
@@ -84,7 +88,7 @@ ULONG ed_index;
{
/* The ED may have been used, so we reset all fields. */
- _ux_utility_memory_set(ed, 0, sizeof(UX_EHCI_ED));
+ _ux_utility_memory_set(ed, 0, sizeof(UX_EHCI_ED)); /* Use case of memset is verified. */
/* This ED is now marked as USED. */
ed -> ux_ehci_ed_status = UX_USED;
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_endpoint_reset.c b/common/usbx_host_controllers/src/ux_hcd_ehci_endpoint_reset.c
index b69aaf9..1429bd7 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_endpoint_reset.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_endpoint_reset.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_endpoint_reset PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* 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_hcd_ehci_endpoint_reset(UX_HCD_EHCI *hcd_ehci, UX_ENDPOINT *endpoint)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_entry.c b/common/usbx_host_controllers/src/ux_hcd_ehci_entry.c
index a9e2bf4..6177682 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_entry.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_entry.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -87,6 +87,8 @@
/* 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_hcd_ehci_entry(UX_HCD *hcd, UINT function, VOID *parameter)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_frame_number_get.c b/common/usbx_host_controllers/src/ux_hcd_ehci_frame_number_get.c
index a284f77..0fc524c 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_frame_number_get.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_frame_number_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_frame_number_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* 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_hcd_ehci_frame_number_get(UX_HCD_EHCI *hcd_ehci, ULONG *frame_number)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_frame_number_set.c b/common/usbx_host_controllers/src/ux_hcd_ehci_frame_number_set.c
index a80b5ad..5f5db0b 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_frame_number_set.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_frame_number_set.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_frame_number_set PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* 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 */
/* */
/**************************************************************************/
VOID _ux_hcd_ehci_frame_number_set(UX_HCD_EHCI *hcd_ehci, ULONG frame_number)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_fsisochronous_td_obtain.c b/common/usbx_host_controllers/src/ux_hcd_ehci_fsisochronous_td_obtain.c
index 0bc0ce3..c31bec4 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_fsisochronous_td_obtain.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_fsisochronous_td_obtain.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_fsisochronous_td_obtain PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UX_EHCI_FSISO_TD *_ux_hcd_ehci_fsisochronous_td_obtain(UX_HCD_EHCI *hcd_ehci)
@@ -91,7 +95,7 @@ ULONG td_index;
{
/* The TD may have been used, so we reset all fields. */
- _ux_utility_memory_set(td, 0, sizeof(UX_EHCI_FSISO_TD));
+ _ux_utility_memory_set(td, 0, sizeof(UX_EHCI_FSISO_TD)); /* Use case of memset is verified. */
/* This TD is now marked as USED. */
td -> ux_ehci_fsiso_td_status = UX_USED;
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_fsisochronous_tds_process.c b/common/usbx_host_controllers/src/ux_hcd_ehci_fsisochronous_tds_process.c
index 463a985..99bcd1c 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_fsisochronous_tds_process.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_fsisochronous_tds_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_fsisochronous_tds_process PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,8 @@
/* 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 */
/* */
/**************************************************************************/
UX_EHCI_FSISO_TD* _ux_hcd_ehci_fsisochronous_tds_process(
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_hsisochronous_td_obtain.c b/common/usbx_host_controllers/src/ux_hcd_ehci_hsisochronous_td_obtain.c
index be4d295..e374fe3 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_hsisochronous_td_obtain.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_hsisochronous_td_obtain.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_hsisochronous_td_obtain PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UX_EHCI_HSISO_TD *_ux_hcd_ehci_hsisochronous_td_obtain(UX_HCD_EHCI *hcd_ehci)
@@ -91,7 +95,7 @@ ULONG td_index;
{
/* The TD may have been used, so we reset all fields. */
- _ux_utility_memory_set(td, 0, sizeof(UX_EHCI_HSISO_TD));
+ _ux_utility_memory_set(td, 0, sizeof(UX_EHCI_HSISO_TD)); /* Use case of memset is verified. */
/* This TD is now marked as USED. */
td -> ux_ehci_hsiso_td_status = UX_USED;
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_hsisochronous_tds_process.c b/common/usbx_host_controllers/src/ux_hcd_ehci_hsisochronous_tds_process.c
index b20af0d..c38974b 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_hsisochronous_tds_process.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_hsisochronous_tds_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_hsisochronous_tds_process PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* 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 */
/* */
/**************************************************************************/
UX_EHCI_HSISO_TD* _ux_hcd_ehci_hsisochronous_tds_process(
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_initialize.c b/common/usbx_host_controllers/src/ux_hcd_ehci_initialize.c
index 49a1a6f..347bc09 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_initialize.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_initialize.c
@@ -60,7 +60,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_initialize PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -104,6 +104,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_initialize(UX_HCD *hcd)
@@ -120,9 +124,11 @@ UINT status = UX_SUCCESS;
/* The controller initialized here is of EHCI type. */
hcd -> ux_hcd_controller_type = UX_EHCI_CONTROLLER;
+#if UX_MAX_DEVICES > 1
/* Initialize the max bandwidth for periodic endpoints. On EHCI,
the spec says no more than 90% to be allocated for periodic. */
hcd -> ux_hcd_available_bandwidth = UX_EHCI_AVAILABLE_BANDWIDTH;
+#endif
/* Allocate memory for this EHCI HCD instance. */
hcd_ehci = _ux_utility_memory_allocate(UX_NO_ALIGN, UX_REGULAR_MEMORY, sizeof(UX_HCD_EHCI));
@@ -241,8 +247,11 @@ UINT status = UX_SUCCESS;
if (status == UX_SUCCESS)
{
+#if UX_MAX_DEVICES > 1
+
/* Since this is a USB 2.0 controller, we can safely hardwire the version. */
hcd -> ux_hcd_version = 0x200;
+#endif
/* The EHCI Controller should not be running. */
ehci_register = _ux_hcd_ehci_register_read(hcd_ehci, EHCI_HCOR_USB_COMMAND);
@@ -305,7 +314,9 @@ UINT status = UX_SUCCESS;
local ehci container. */
ehci_register = _ux_hcd_ehci_register_read(hcd_ehci, EHCI_HCCR_HCS_PARAMS);
hcd -> ux_hcd_nb_root_hubs = (UINT) (ehci_register & 0xf);
- hcd_ehci -> ux_hcd_ehci_nb_root_hubs = (UINT) (ehci_register & 0xf);
+ if (hcd -> ux_hcd_nb_root_hubs > UX_MAX_ROOTHUB_PORT)
+ hcd -> ux_hcd_nb_root_hubs = UX_MAX_ROOTHUB_PORT;
+ hcd_ehci -> ux_hcd_ehci_nb_root_hubs = hcd -> ux_hcd_nb_root_hubs;
/* The controller transceiver can now send the device connection/extraction
signals to the EHCI controller. */
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_create.c b/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_create.c
index 17166f1..f00ae02 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_create.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_create.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_interrupt_endpoint_create PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -89,6 +89,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_interrupt_endpoint_create(UX_HCD_EHCI *hcd_ehci, UX_ENDPOINT *endpoint)
@@ -167,6 +171,7 @@ UINT i;
/* Fall through. */
default:
+#if UX_MAX_DEVICES > 1
/* The device must be on a hub for this code to execute. We still do a sanity check. */
if (device -> ux_device_parent != UX_NULL)
{
@@ -177,6 +182,7 @@ UINT i;
/* And the port index onto which this device is attached. */
ed -> ux_ehci_ed_cap1 |= device -> ux_device_port_location << UX_EHCI_QH_PORT_NUMBER_LOC;
}
+#endif
break;
}
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_destroy.c b/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_destroy.c
index fbcc385..55dd017 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_destroy.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_destroy.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_interrupt_endpoint_destroy PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* 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_hcd_ehci_interrupt_endpoint_destroy(UX_HCD_EHCI *hcd_ehci, UX_ENDPOINT *endpoint)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_handler.c b/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_handler.c
index e304a7b..ee75d5b 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_handler.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_handler.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_interrupt_handler PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -77,6 +77,8 @@
/* 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 */
/* */
/**************************************************************************/
VOID _ux_hcd_ehci_interrupt_handler(VOID)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_create.c b/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_create.c
index 0b1ae42..f5af8a9 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_create.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_create.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_isochronous_endpoint_create PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,8 @@
/* 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_hcd_ehci_isochronous_endpoint_create(UX_HCD_EHCI *hcd_ehci, UX_ENDPOINT *endpoint)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_destroy.c b/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_destroy.c
index 819f522..6690c09 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_destroy.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_destroy.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_isochronous_endpoint_destroy PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* 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_hcd_ehci_isochronous_endpoint_destroy(UX_HCD_EHCI *hcd_ehci, UX_ENDPOINT *endpoint)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_least_traffic_list_get.c b/common/usbx_host_controllers/src/ux_hcd_ehci_least_traffic_list_get.c
index 5d4d06c..fb9acd6 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_least_traffic_list_get.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_least_traffic_list_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_least_traffic_list_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* 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 */
/* */
/**************************************************************************/
UX_EHCI_ED *_ux_hcd_ehci_least_traffic_list_get(UX_HCD_EHCI *hcd_ehci,
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_next_td_clean.c b/common/usbx_host_controllers/src/ux_hcd_ehci_next_td_clean.c
index a027df4..1be46b1 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_next_td_clean.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_next_td_clean.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_next_td_clean PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* 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 */
/* */
/**************************************************************************/
VOID _ux_hcd_ehci_next_td_clean(UX_EHCI_TD *td)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_periodic_descriptor_link.c b/common/usbx_host_controllers/src/ux_hcd_ehci_periodic_descriptor_link.c
index bbc7404..b1bc622 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_periodic_descriptor_link.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_periodic_descriptor_link.c
@@ -33,8 +33,8 @@
/* */
/* FUNCTION RELEASE */
/* */
-/* _ux_hcd_ehci_periodic_descriptor_link PORTABLE C */
-/* 6.0 */
+/* _ux_hcd_ehci_periodic_descriptor_link PORTABLE C */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -86,6 +86,8 @@
/* 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 */
/* */
/**************************************************************************/
void _ux_hcd_ehci_periodic_descriptor_link(
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_periodic_tree_create.c b/common/usbx_host_controllers/src/ux_hcd_ehci_periodic_tree_create.c
index c0d14b9..9300230 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_periodic_tree_create.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_periodic_tree_create.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_periodic_tree_create PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* 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_hcd_ehci_periodic_tree_create(UX_HCD_EHCI *hcd_ehci)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_poll_rate_entry_get.c b/common/usbx_host_controllers/src/ux_hcd_ehci_poll_rate_entry_get.c
index f47fba2..6eace03 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_poll_rate_entry_get.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_poll_rate_entry_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_poll_rate_entry_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -76,6 +76,8 @@
/* 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 */
/* */
/**************************************************************************/
UX_EHCI_ED *_ux_hcd_ehci_poll_rate_entry_get(UX_HCD_EHCI *hcd_ehci,
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_port_disable.c b/common/usbx_host_controllers/src/ux_hcd_ehci_port_disable.c
index e833f52..c9ac6d5 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_port_disable.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_port_disable.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_port_disable PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* 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_hcd_ehci_port_disable(UX_HCD_EHCI *hcd_ehci, ULONG port_index)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_port_reset.c b/common/usbx_host_controllers/src/ux_hcd_ehci_port_reset.c
index ae4ae87..10cdc2e 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_port_reset.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_port_reset.c
@@ -57,8 +57,8 @@
#elif defined(MIMXRT)
#define UX_EHCI_USBPHY1 (0x400D9000u)
#define UX_EHCI_USBPHY2 (0x400DA000u)
-#define UX_EHCI_BASE1 (0x402E0000u)
-#define UX_EHCI_BASE2 (0x402E0200u)
+#define UX_EHCI_BASE1 (0x402E0100u)
+#define UX_EHCI_BASE2 (0x402E0300u)
#endif
#define UX_EHCI_USBPHY_CTRL_SET_BIT1(base) ((*(volatile ULONG *) ( base + 0x34)) = 0x02)
@@ -70,7 +70,7 @@
if ((ULONG)hcd_ehci -> ux_hcd_ehci_base == UX_EHCI_BASE1) \
base = (UX_EHCI_USBPHY1); \
else \
- base = (UX_EHCI_USBPHY1); \
+ base = (UX_EHCI_USBPHY2); \
if (on_off) \
UX_EHCI_USBPHY_CTRL_SET_BIT1(base); \
else \
@@ -88,7 +88,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_port_reset PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -121,6 +121,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* fixed NXP register base, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_port_reset(UX_HCD_EHCI *hcd_ehci, ULONG port_index)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_port_resume.c b/common/usbx_host_controllers/src/ux_hcd_ehci_port_resume.c
index 25e33e7..b6cad23 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_port_resume.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_port_resume.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_port_resume PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* 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_hcd_ehci_port_resume(UX_HCD_EHCI *hcd_ehci, UINT port_index)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_port_status_get.c b/common/usbx_host_controllers/src/ux_hcd_ehci_port_status_get.c
index 1ecb182..21fb027 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_port_status_get.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_port_status_get.c
@@ -57,8 +57,8 @@
#elif defined(MIMXRT)
#define UX_EHCI_USBPHY1 (0x400D9000u)
#define UX_EHCI_USBPHY2 (0x400DA000u)
-#define UX_EHCI_BASE1 (0x402E0000u)
-#define UX_EHCI_BASE2 (0x402E0200u)
+#define UX_EHCI_BASE1 (0x402E0100u)
+#define UX_EHCI_BASE2 (0x402E0300u)
#endif
#define UX_EHCI_USBPHY_CTRL_SET_BIT1(base) ((*(volatile ULONG *) ( base + 0x34)) = 0x02)
@@ -70,7 +70,7 @@
if ((ULONG)hcd_ehci -> ux_hcd_ehci_base == UX_EHCI_BASE1) \
base = (UX_EHCI_USBPHY1); \
else \
- base = (UX_EHCI_USBPHY1); \
+ base = (UX_EHCI_USBPHY2); \
if (on_off) \
UX_EHCI_USBPHY_CTRL_SET_BIT1(base); \
else \
@@ -88,7 +88,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_port_status_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -144,6 +144,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* fixed NXP register base, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
ULONG _ux_hcd_ehci_port_status_get(UX_HCD_EHCI *hcd_ehci, ULONG port_index)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_port_suspend.c b/common/usbx_host_controllers/src/ux_hcd_ehci_port_suspend.c
index 224c8ea..df04ebe 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_port_suspend.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_port_suspend.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_port_suspend PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* 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_hcd_ehci_port_suspend(UX_HCD_EHCI *hcd_ehci, ULONG port_index)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_power_down_port.c b/common/usbx_host_controllers/src/ux_hcd_ehci_power_down_port.c
index 60e3b52..496da78 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_power_down_port.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_power_down_port.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_power_down_port PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* 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_hcd_ehci_power_down_port(UX_HCD_EHCI *hcd_ehci, ULONG port_index)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_power_on_port.c b/common/usbx_host_controllers/src/ux_hcd_ehci_power_on_port.c
index 2c3c70b..2ff3a89 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_power_on_port.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_power_on_port.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_power_on_port PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* 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_hcd_ehci_power_on_port(UX_HCD_EHCI *hcd_ehci, ULONG port_index)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_power_root_hubs.c b/common/usbx_host_controllers/src/ux_hcd_ehci_power_root_hubs.c
index 0499c7a..d86233d 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_power_root_hubs.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_power_root_hubs.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_power_root_hubs PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* 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 */
/* */
/**************************************************************************/
VOID _ux_hcd_ehci_power_root_hubs(UX_HCD_EHCI *hcd_ehci)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_register_read.c b/common/usbx_host_controllers/src/ux_hcd_ehci_register_read.c
index 1a78a98..01d8fc7 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_register_read.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_register_read.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_register_read PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* 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 */
/* */
/**************************************************************************/
ULONG _ux_hcd_ehci_register_read(UX_HCD_EHCI *hcd_ehci, ULONG ehci_register)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_register_write.c b/common/usbx_host_controllers/src/ux_hcd_ehci_register_write.c
index 9b6ccb4..971c413 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_register_write.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_register_write.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_register_write PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* 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 */
/* */
/**************************************************************************/
VOID _ux_hcd_ehci_register_write(UX_HCD_EHCI *hcd_ehci, ULONG ehci_register, ULONG value)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_regular_td_obtain.c b/common/usbx_host_controllers/src/ux_hcd_ehci_regular_td_obtain.c
index 705f66b..7a5a08b 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_regular_td_obtain.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_regular_td_obtain.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_regular_td_obtain PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UX_EHCI_TD *_ux_hcd_ehci_regular_td_obtain(UX_HCD_EHCI *hcd_ehci)
@@ -90,7 +94,7 @@ ULONG td_element;
{
/* The TD may have been used, so we reset all fields. */
- _ux_utility_memory_set(td, 0, sizeof(UX_EHCI_TD));
+ _ux_utility_memory_set(td, 0, sizeof(UX_EHCI_TD)); /* Use case of memset is verified. */
/* This TD is now marked as USED. */
td -> ux_ehci_td_status = UX_USED;
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_request_bulk_transfer.c b/common/usbx_host_controllers/src/ux_hcd_ehci_request_bulk_transfer.c
index 9e62567..6e9d3f1 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_request_bulk_transfer.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_request_bulk_transfer.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_request_bulk_transfer PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* 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_hcd_ehci_request_bulk_transfer(UX_HCD_EHCI *hcd_ehci, UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_request_control_transfer.c b/common/usbx_host_controllers/src/ux_hcd_ehci_request_control_transfer.c
index bdc53da..5e0857f 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_request_control_transfer.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_request_control_transfer.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_request_control_transfer PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -79,6 +79,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_request_control_transfer(UX_HCD_EHCI *hcd_ehci, UX_TRANSFER *transfer_request)
@@ -205,7 +208,7 @@ UINT pid;
ed -> ux_ehci_ed_queue_element = (UX_EHCI_TD *) td_component;
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_CONTROL_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_CONTROL_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_request_interrupt_transfer.c b/common/usbx_host_controllers/src/ux_hcd_ehci_request_interrupt_transfer.c
index 740104f..64506d5 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_request_interrupt_transfer.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_request_interrupt_transfer.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_request_interrupt_transfer PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* 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_hcd_ehci_request_interrupt_transfer(UX_HCD_EHCI *hcd_ehci, UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_request_isochronous_transfer.c b/common/usbx_host_controllers/src/ux_hcd_ehci_request_isochronous_transfer.c
index 938cc5c..43e8405 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_request_isochronous_transfer.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_request_isochronous_transfer.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_request_isochronous_transfer PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -78,6 +78,8 @@
/* 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_hcd_ehci_request_isochronous_transfer(UX_HCD_EHCI *hcd_ehci, UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_request_transfer.c b/common/usbx_host_controllers/src/ux_hcd_ehci_request_transfer.c
index 11aa77d..4a2de47 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_request_transfer.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_request_transfer.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_request_transfer PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,8 @@
/* 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_hcd_ehci_request_transfer(UX_HCD_EHCI *hcd_ehci, UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_request_transfer_add.c b/common/usbx_host_controllers/src/ux_hcd_ehci_request_transfer_add.c
index 599fdc5..7eb65d5 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_request_transfer_add.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_request_transfer_add.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_request_transfer_add PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,8 @@
/* 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_hcd_ehci_request_transfer_add(UX_HCD_EHCI *hcd_ehci, UX_EHCI_ED *ed, ULONG phase, ULONG pid,
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_transfer_abort.c b/common/usbx_host_controllers/src/ux_hcd_ehci_transfer_abort.c
index 92d3619..771b218 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_transfer_abort.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_transfer_abort.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_transfer_abort PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* 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_hcd_ehci_transfer_abort(UX_HCD_EHCI *hcd_ehci,UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_transfer_request_process.c b/common/usbx_host_controllers/src/ux_hcd_ehci_transfer_request_process.c
index 8c1e2df..7744bc0 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_transfer_request_process.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_transfer_request_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_transfer_request_process PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* 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 */
/* */
/**************************************************************************/
VOID _ux_hcd_ehci_transfer_request_process(UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_create.c b/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_create.c
index 36127c4..6012699 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_create.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_create.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_asynchronous_endpoint_create PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* 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_hcd_ohci_asynchronous_endpoint_create(UX_HCD_OHCI *hcd_ohci, UX_ENDPOINT *endpoint)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_destroy.c b/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_destroy.c
index 4c30840..d197298 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_destroy.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_destroy.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_asynchronous_endpoint_destroy PORTABLE C */
-/* 6.0.2 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,10 +70,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
-/* 08-14-2020 Chaoqiong Xiao Modified comment(s), */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
/* fixed physical and virtual */
/* address conversion, */
-/* resulting in version 6.0.2 */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_hcd_ohci_asynchronous_endpoint_destroy(UX_HCD_OHCI *hcd_ohci, UX_ENDPOINT *endpoint)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_controller_disable.c b/common/usbx_host_controllers/src/ux_hcd_ohci_controller_disable.c
index 0edbc33..b4067f8 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_controller_disable.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_controller_disable.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_controller_disable PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* 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_hcd_ohci_controller_disable(UX_HCD_OHCI *hcd_ohci)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_done_queue_process.c b/common/usbx_host_controllers/src/ux_hcd_ohci_done_queue_process.c
index a104172..2aa4e1c 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_done_queue_process.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_done_queue_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_done_queue_process PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -78,6 +78,8 @@
/* 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 */
/* */
/**************************************************************************/
VOID _ux_hcd_ohci_done_queue_process(UX_HCD_OHCI *hcd_ohci)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_ed_obtain.c b/common/usbx_host_controllers/src/ux_hcd_ohci_ed_obtain.c
index 1f8c660..05a3ba1 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_ed_obtain.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_ed_obtain.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_ed_obtain PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -65,6 +65,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UX_OHCI_ED *_ux_hcd_ohci_ed_obtain(UX_HCD_OHCI *hcd_ohci)
@@ -84,7 +88,7 @@ ULONG ed_index;
{
/* The ED may have been used, so we reset all fields. */
- _ux_utility_memory_set(ed, 0, sizeof(UX_OHCI_ED));
+ _ux_utility_memory_set(ed, 0, sizeof(UX_OHCI_ED)); /* Use case of memset is verified. */
/* This ED is now marked as USED. */
ed -> ux_ohci_ed_status = UX_USED;
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_endpoint_error_clear.c b/common/usbx_host_controllers/src/ux_hcd_ohci_endpoint_error_clear.c
index 81ab6cd..6cdfd28 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_endpoint_error_clear.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_endpoint_error_clear.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_endpoint_error_clear PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* 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_hcd_ohci_endpoint_error_clear(UX_HCD_OHCI *hcd_ohci, UX_ENDPOINT *endpoint)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_endpoint_reset.c b/common/usbx_host_controllers/src/ux_hcd_ohci_endpoint_reset.c
index 110242e..57a02a1 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_endpoint_reset.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_endpoint_reset.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_endpoint_reset PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* 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_hcd_ohci_endpoint_reset(UX_HCD_OHCI *hcd_ohci, UX_ENDPOINT *endpoint)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_entry.c b/common/usbx_host_controllers/src/ux_hcd_ohci_entry.c
index 31ef6c0..5ce37ff 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_entry.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_entry.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -87,6 +87,8 @@
/* 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_hcd_ohci_entry(UX_HCD *hcd, UINT function, VOID *parameter)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_frame_number_get.c b/common/usbx_host_controllers/src/ux_hcd_ohci_frame_number_get.c
index 8eb44ca..92c6087 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_frame_number_get.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_frame_number_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_frame_number_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* 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_hcd_ohci_frame_number_get(UX_HCD_OHCI *hcd_ohci, ULONG *frame_number)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_frame_number_set.c b/common/usbx_host_controllers/src/ux_hcd_ohci_frame_number_set.c
index 96d90c2..7beeacd 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_frame_number_set.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_frame_number_set.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_frame_number_set PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* 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 */
/* */
/**************************************************************************/
VOID _ux_hcd_ohci_frame_number_set(UX_HCD_OHCI *hcd_ohci, ULONG frame_number)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_initialize.c b/common/usbx_host_controllers/src/ux_hcd_ohci_initialize.c
index 509e424..5930ebf 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_initialize.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_initialize.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_initialize PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_hcd_ohci_initialize(UX_HCD *hcd)
@@ -88,10 +92,12 @@ UINT status;
/* The controller initialized here is of OHCI type. */
hcd -> ux_hcd_controller_type = UX_OHCI_CONTROLLER;
-
+
+#if UX_MAX_DEVICES > 1
/* Initialize the max bandwidth for periodic endpoints. On OHCI, the spec says no
more than 90% to be allocated for periodic. */
hcd -> ux_hcd_available_bandwidth = UX_OHCI_AVAILABLE_BANDWIDTH;
+#endif
/* Allocate memory for this OHCI HCD instance. */
hcd_ohci = _ux_utility_memory_allocate(UX_NO_ALIGN, UX_REGULAR_MEMORY, sizeof(UX_HCD_OHCI));
@@ -139,9 +145,12 @@ UINT status;
if (status != UX_SUCCESS)
return(status);
+#if UX_MAX_DEVICES > 1
+
/* Read the OHCI controller version, it is either USB 1.0 or 1.1. This is important for
filtering INT out endpoints on a 1.0 OHCI. */
hcd -> ux_hcd_version = _ux_hcd_ohci_register_read(hcd_ohci, OHCI_HC_REVISION);
+#endif
/* Set the state of the OHCI controller to reset in the control register.
This is not compulsory but some controllers demand to start in this state. */
@@ -213,7 +222,9 @@ UINT status;
for the generic HCD container and the local OHCI container. */
ohci_register = _ux_hcd_ohci_register_read(hcd_ohci, OHCI_HC_RH_DESCRIPTOR_A);
hcd -> ux_hcd_nb_root_hubs = (UINT) (ohci_register & 0xff);
- hcd_ohci -> ux_hcd_ohci_nb_root_hubs = (UINT) (ohci_register & 0xff);
+ if (hcd -> ux_hcd_nb_root_hubs > UX_MAX_ROOTHUB_PORT)
+ hcd -> ux_hcd_nb_root_hubs = UX_MAX_ROOTHUB_PORT;
+ hcd_ohci -> ux_hcd_ohci_nb_root_hubs = hcd -> ux_hcd_nb_root_hubs;
/* All ports must now be powered to pick up device insertion. */
_ux_hcd_ohci_power_root_hubs(hcd_ohci);
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_interrupt_endpoint_create.c b/common/usbx_host_controllers/src/ux_hcd_ohci_interrupt_endpoint_create.c
index 932925e..0deb9f5 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_interrupt_endpoint_create.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_interrupt_endpoint_create.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_interrupt_endpoint_create PORTABLE C */
-/* 6.0.2 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -87,10 +87,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
-/* 08-14-2020 Chaoqiong Xiao Modified comment(s), */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
/* fixed physical and virtual */
/* address conversion, */
-/* resulting in version 6.0.2 */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_hcd_ohci_interrupt_endpoint_create(UX_HCD_OHCI *hcd_ohci, UX_ENDPOINT *endpoint)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_interrupt_handler.c b/common/usbx_host_controllers/src/ux_hcd_ohci_interrupt_handler.c
index c1877ed..c20e6ed 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_interrupt_handler.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_interrupt_handler.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_interrupt_handler PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,8 @@
/* 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 */
/* */
/**************************************************************************/
VOID _ux_hcd_ohci_interrupt_handler(VOID)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_isochronous_endpoint_create.c b/common/usbx_host_controllers/src/ux_hcd_ohci_isochronous_endpoint_create.c
index 988be0e..2c342d2 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_isochronous_endpoint_create.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_isochronous_endpoint_create.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_isochronous_endpoint_create PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* 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_hcd_ohci_isochronous_endpoint_create(UX_HCD_OHCI *hcd_ohci, UX_ENDPOINT *endpoint)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_isochronous_td_obtain.c b/common/usbx_host_controllers/src/ux_hcd_ohci_isochronous_td_obtain.c
index dfb0690..0b8767d 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_isochronous_td_obtain.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_isochronous_td_obtain.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_isochronous_td_obtain PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -65,6 +65,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UX_OHCI_ISO_TD *_ux_hcd_ohci_isochronous_td_obtain(UX_HCD_OHCI *hcd_ohci)
@@ -84,7 +88,7 @@ ULONG td_index;
{
/* The TD may have been used, so we reset all fields. */
- _ux_utility_memory_set(td, 0, sizeof(UX_OHCI_ISO_TD));
+ _ux_utility_memory_set(td, 0, sizeof(UX_OHCI_ISO_TD)); /* Use case of memset is verified. */
/* This TD is now marked as USED. */
td -> ux_ohci_iso_td_status = UX_USED;
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_least_traffic_list_get.c b/common/usbx_host_controllers/src/ux_hcd_ohci_least_traffic_list_get.c
index 1ee868a..630d5b3 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_least_traffic_list_get.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_least_traffic_list_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_least_traffic_list_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* 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 */
/* */
/**************************************************************************/
UX_OHCI_ED *_ux_hcd_ohci_least_traffic_list_get(UX_HCD_OHCI *hcd_ohci)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_next_td_clean.c b/common/usbx_host_controllers/src/ux_hcd_ohci_next_td_clean.c
index b6b57e2..20bf887 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_next_td_clean.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_next_td_clean.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_next_td_clean PORTABLE C */
-/* 6.0.2 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,10 +67,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
-/* 08-14-2020 Chaoqiong Xiao Modified comment(s), */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
/* fixed physical and virtual */
/* address conversion, */
-/* resulting in version 6.0.2 */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_hcd_ohci_next_td_clean(UX_OHCI_TD *td)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_periodic_endpoint_destroy.c b/common/usbx_host_controllers/src/ux_hcd_ohci_periodic_endpoint_destroy.c
index 9e70d63..103e13b 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_periodic_endpoint_destroy.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_periodic_endpoint_destroy.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_periodic_endpoint_destroy PORTABLE C */
-/* 6.0.2 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,10 +66,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
-/* 08-14-2020 Chaoqiong Xiao Modified comment(s), */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
/* fixed physical and virtual */
/* address conversion, */
-/* resulting in version 6.0.2 */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_hcd_ohci_periodic_endpoint_destroy(UX_HCD_OHCI *hcd_ohci, UX_ENDPOINT *endpoint)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_periodic_tree_create.c b/common/usbx_host_controllers/src/ux_hcd_ohci_periodic_tree_create.c
index b193ac0..6d7e520 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_periodic_tree_create.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_periodic_tree_create.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_periodic_tree_create PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* 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_hcd_ohci_periodic_tree_create(UX_HCD_OHCI *hcd_ohci)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_port_disable.c b/common/usbx_host_controllers/src/ux_hcd_ohci_port_disable.c
index 35f4bdb..de37fb3 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_port_disable.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_port_disable.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_port_disable PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* 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_hcd_ohci_port_disable(UX_HCD_OHCI *hcd_ohci, ULONG port_index)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_port_enable.c b/common/usbx_host_controllers/src/ux_hcd_ohci_port_enable.c
index 377d572..9c4b4aa 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_port_enable.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_port_enable.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_port_enable PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* 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_hcd_ohci_port_enable(UX_HCD_OHCI *hcd_ohci, ULONG port_index)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_port_reset.c b/common/usbx_host_controllers/src/ux_hcd_ohci_port_reset.c
index ab1cab9..654347a 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_port_reset.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_port_reset.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_port_reset PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* 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_hcd_ohci_port_reset(UX_HCD_OHCI *hcd_ohci, ULONG port_index)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_port_resume.c b/common/usbx_host_controllers/src/ux_hcd_ohci_port_resume.c
index 36a6d98..b52596f 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_port_resume.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_port_resume.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_port_resume PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* 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_hcd_ohci_port_resume(UX_HCD_OHCI *hcd_ohci, UINT port_index)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_port_status_get.c b/common/usbx_host_controllers/src/ux_hcd_ohci_port_status_get.c
index 5a935d5..983ab0a 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_port_status_get.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_port_status_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_port_status_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -92,6 +92,8 @@
/* 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 */
/* */
/**************************************************************************/
ULONG _ux_hcd_ohci_port_status_get(UX_HCD_OHCI *hcd_ohci, ULONG port_index)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_port_suspend.c b/common/usbx_host_controllers/src/ux_hcd_ohci_port_suspend.c
index b51c494..74bf105 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_port_suspend.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_port_suspend.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_port_suspend PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* 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_hcd_ohci_port_suspend(UX_HCD_OHCI *hcd_ohci, ULONG port_index)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_power_down_port.c b/common/usbx_host_controllers/src/ux_hcd_ohci_power_down_port.c
index b52158c..f10c215 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_power_down_port.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_power_down_port.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_power_down_port PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* 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_hcd_ohci_power_down_port(UX_HCD_OHCI *hcd_ohci, ULONG port_index)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_power_on_port.c b/common/usbx_host_controllers/src/ux_hcd_ohci_power_on_port.c
index 40c4f81..0b6ca5d 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_power_on_port.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_power_on_port.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_power_on_port PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* 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_hcd_ohci_power_on_port(UX_HCD_OHCI *hcd_ohci, ULONG port_index)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_power_root_hubs.c b/common/usbx_host_controllers/src/ux_hcd_ohci_power_root_hubs.c
index a85cbf8..62fba5d 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_power_root_hubs.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_power_root_hubs.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_power_root_hubs PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* 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 */
/* */
/**************************************************************************/
VOID _ux_hcd_ohci_power_root_hubs(UX_HCD_OHCI *hcd_ohci)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_register_read.c b/common/usbx_host_controllers/src/ux_hcd_ohci_register_read.c
index 23ae571..e1bb2af 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_register_read.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_register_read.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_register_read PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* 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 */
/* */
/**************************************************************************/
ULONG _ux_hcd_ohci_register_read(UX_HCD_OHCI *hcd_ohci, ULONG ohci_register)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_register_write.c b/common/usbx_host_controllers/src/ux_hcd_ohci_register_write.c
index be3f026..611419a 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_register_write.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_register_write.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_register_write PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* 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 */
/* */
/**************************************************************************/
VOID _ux_hcd_ohci_register_write(UX_HCD_OHCI *hcd_ohci, ULONG ohci_register, ULONG value)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_regular_td_obtain.c b/common/usbx_host_controllers/src/ux_hcd_ohci_regular_td_obtain.c
index 8f9b275..71bf441 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_regular_td_obtain.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_regular_td_obtain.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_regular_td_obtain PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UX_OHCI_TD *_ux_hcd_ohci_regular_td_obtain(UX_HCD_OHCI *hcd_ohci)
@@ -90,7 +94,7 @@ ULONG td_index;
{
/* The TD may have been used, so we reset all fields. */
- _ux_utility_memory_set(td, 0, sizeof(UX_OHCI_TD));
+ _ux_utility_memory_set(td, 0, sizeof(UX_OHCI_TD)); /* Use case of memset is verified. */
/* This TD is now marked as USED. */
td -> ux_ohci_td_status = UX_USED;
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_request_bulk_transfer.c b/common/usbx_host_controllers/src/ux_hcd_ohci_request_bulk_transfer.c
index d65c88f..3b0af7b 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_request_bulk_transfer.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_request_bulk_transfer.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_request_bulk_transfer PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,8 @@
/* 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_hcd_ohci_request_bulk_transfer(UX_HCD_OHCI *hcd_ohci, UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_request_control_transfer.c b/common/usbx_host_controllers/src/ux_hcd_ohci_request_control_transfer.c
index a7900b9..23685c7 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_request_control_transfer.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_request_control_transfer.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_request_control_transfer PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -82,6 +82,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_hcd_ohci_request_control_transfer(UX_HCD_OHCI *hcd_ohci, UX_TRANSFER *transfer_request)
@@ -244,7 +247,7 @@ UINT status;
_ux_hcd_ohci_register_write(hcd_ohci, OHCI_HC_COMMAND_STATUS, ohci_register);
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_CONTROL_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_CONTROL_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_request_interupt_transfer.c b/common/usbx_host_controllers/src/ux_hcd_ohci_request_interupt_transfer.c
index a981267..93fc96d 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_request_interupt_transfer.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_request_interupt_transfer.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_request_interrupt_transfer PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* 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_hcd_ohci_request_interrupt_transfer(UX_HCD_OHCI *hcd_ohci, UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_request_isochronous_transfer.c b/common/usbx_host_controllers/src/ux_hcd_ohci_request_isochronous_transfer.c
index 9000e0c..e83fb09 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_request_isochronous_transfer.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_request_isochronous_transfer.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_request_isochronous_transfer PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* 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_hcd_ohci_request_isochronous_transfer(UX_HCD_OHCI *hcd_ohci, UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_request_transfer.c b/common/usbx_host_controllers/src/ux_hcd_ohci_request_transfer.c
index a962860..9c59a86 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_request_transfer.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_request_transfer.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_request_transfer PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,8 @@
/* 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_hcd_ohci_request_transfer(UX_HCD_OHCI *hcd_ohci, UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_transfer_abort.c b/common/usbx_host_controllers/src/ux_hcd_ohci_transfer_abort.c
index e76fb2f..ab59731 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_transfer_abort.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_transfer_abort.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_transfer_abort PORTABLE C */
-/* 6.0.2 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,10 +69,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
-/* 08-14-2020 Chaoqiong Xiao Modified comment(s), */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
/* fixed physical and virtual */
/* address conversion, */
-/* resulting in version 6.0.2 */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_hcd_ohci_transfer_abort(UX_HCD_OHCI *hcd_ohci, UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_transfer_request_process.c b/common/usbx_host_controllers/src/ux_hcd_ohci_transfer_request_process.c
index ae7bb7a..faeede6 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_transfer_request_process.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_transfer_request_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_transfer_request_process PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* 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 */
/* */
/**************************************************************************/
VOID _ux_hcd_ohci_transfer_request_process(UX_TRANSFER *transfer_request)