From da6b2fbef85118ec8a076f297492683dbbbe5684 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 28 Feb 2014 17:08:47 +0700 Subject: [PATCH] EHCI: immediately reset port when device connected. This proves to help prevent duplication connection event (also with OHCI) increase delay after reset to 100 ms (NXP's EHCI does not work with 50ms) --> fix all duplication connection with OHCI & EHCI --- .../host/host_cmsis_rtx/host_cmsis_rtx.uvopt | 74 ++++---- .../host/host_cmsis_rtx/host_cmsis_rtx.uvproj | 22 +-- demos/host/host_os_none/.cproject | 163 ++++++++---------- demos/host/src/tusb_config.h | 4 +- tinyusb/host/ehci/ehci.c | 8 +- tinyusb/host/usbh.c | 11 +- 6 files changed, 134 insertions(+), 148 deletions(-) diff --git a/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvopt b/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvopt index 4ee637487..c4d0b83d7 100644 --- a/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvopt +++ b/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvopt @@ -527,22 +527,6 @@ 1 0 0 - 0 - 0 - 41 - 56 - 0 - ..\..\bsp\boards\embedded_artists\board_ea4357.c - board_ea4357.c - 0 - 0 - - - 2 - 9 - 1 - 0 - 0 2 0 0 @@ -555,7 +539,7 @@ 2 - 10 + 9 1 0 0 @@ -571,7 +555,7 @@ 2 - 11 + 10 1 0 0 @@ -587,7 +571,7 @@ 2 - 12 + 11 1 0 0 @@ -603,7 +587,7 @@ 2 - 13 + 12 1 0 0 @@ -619,7 +603,7 @@ 2 - 14 + 13 1 0 0 @@ -635,7 +619,7 @@ 2 - 15 + 14 1 0 0 @@ -651,7 +635,7 @@ 2 - 16 + 15 1 0 0 @@ -665,11 +649,27 @@ 0 0 + + 2 + 16 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\bsp\boards\embedded_artists\ea4357\board_ea4357.c + board_ea4357.c + 0 + 0 + tinyusb - 1 + 0 0 0 0 @@ -681,7 +681,7 @@ 0 30 0 - 28 + 36 39 0 ..\..\..\tinyusb\tusb.c @@ -743,10 +743,10 @@ 1 0 0 - 38 + 37 0 - 358 - 364 + 362 + 365 0 ..\..\..\tinyusb\host\usbh.c usbh.c @@ -759,10 +759,10 @@ 1 0 0 - 18 + 0 0 - 589 - 606 + 1 + 1 0 ..\..\..\tinyusb\host\ehci\ehci.c ehci.c @@ -993,7 +993,7 @@ 0 0 0 - 391 + 403 406 0 ..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\lpc43xx_cgu.c @@ -1009,7 +1009,7 @@ 0 44 0 - 48 + 57 60 0 ..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\system_LPC43xx.c @@ -1049,7 +1049,7 @@ 0 0 0 - 138 + 148 151 0 ..\..\bsp\lpc43xx\startup_keil\startup_LPC43xx.s @@ -1071,10 +1071,10 @@ 1 0 0 - 13 + 0 0 - 203 - 215 + 213 + 217 0 ..\..\..\vendor\cmsis_rtos_rtx\RTX_Conf_CM.c RTX_Conf_CM.c diff --git a/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvproj b/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvproj index 8c3553a82..b332e4094 100644 --- a/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvproj +++ b/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvproj @@ -348,7 +348,7 @@ 0 --gnu --c99 --diag_suppress=66 --no_inline - CORE_M4 MCU=MCU_LPC43XX BOARD=BOARD_EA4357 TUSB_CFG_OS=TUSB_OS_CMSIS_RTX TUSB_CFG_OS_TASK_PRIO=osPriorityRealtime + CORE_M4 TUSB_CFG_MCU=MCU_LPC43XX BOARD=BOARD_EA4357 TUSB_CFG_OS=TUSB_OS_CMSIS_RTX TUSB_CFG_OS_TASK_PRIO=osPriorityRealtime ..\src;..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\inc;..\..\bsp;..\..\..\tinyusb;..\..\..\vendor\cmsis_rtos_rtx\INC;..\host_cmsis_rtx @@ -431,11 +431,6 @@ 1 ..\..\bsp\boards\board.c - - board_ea4357.c - 1 - ..\..\bsp\boards\embedded_artists\board_ea4357.c - printf_retarget.c 1 @@ -476,6 +471,11 @@ 1 ..\..\bsp\boards\keil\board_mcb4300.c + + board_ea4357.c + 1 + ..\..\bsp\boards\embedded_artists\ea4357\board_ea4357.c + @@ -1050,11 +1050,6 @@ 1 ..\..\bsp\boards\board.c - - board_ea4357.c - 1 - ..\..\bsp\boards\embedded_artists\board_ea4357.c - printf_retarget.c 1 @@ -1135,6 +1130,11 @@ 1 ..\..\bsp\boards\keil\board_mcb4300.c + + board_ea4357.c + 1 + ..\..\bsp\boards\embedded_artists\ea4357\board_ea4357.c + diff --git a/demos/host/host_os_none/.cproject b/demos/host/host_os_none/.cproject index a926209d8..569f09885 100644 --- a/demos/host/host_os_none/.cproject +++ b/demos/host/host_os_none/.cproject @@ -30,7 +30,7 @@ - - -