diff options
| author | hathach <[email protected]> | 2014-04-28 11:51:10 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2014-04-28 14:20:00 +0700 |
| commit | 05c767313d0efd10d5b07b5b2f9b3d69a361075d (patch) | |
| tree | ced61eeb3c9ef7b170aaad9eca51c75e6ba84648 /tinyusb/host/hub.c | |
| parent | b5a5b4152e6fd58c1e7b5052ec5cd0c13eea1608 (diff) | |
make freertos source unmodified to ease the upgrade process later
use CGU_GetPCLKFrequency as configCPU_CLOCK_HZ for lpc43xx using with freeRTOS
move portmarco.h include to FreeRTOSConfig.h to have untouched version of freertos
add a readme.md to vendor/freertos
refractor usbh.c, increase POWER_STABLE_DELAY = 500, RESET_DELAY = 200
fix bug with hub, only handle 1 port at a time when reading hub status change endpoint --> other port will be handled in the next cycle
Diffstat (limited to 'tinyusb/host/hub.c')
| -rw-r--r-- | tinyusb/host/hub.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tinyusb/host/hub.c b/tinyusb/host/hub.c index 3259732e3..e9608f952 100644 --- a/tinyusb/host/hub.c +++ b/tinyusb/host/hub.c @@ -105,6 +105,7 @@ tusb_error_t hub_port_clear_feature_subtask(uint8_t hub_addr, uint8_t hub_port, tusb_error_t hub_port_reset_subtask(uint8_t hub_addr, uint8_t hub_port)
{
+ enum { RESET_DELAY = 200 }; // USB specs say only 50ms but many devices require much longer
tusb_error_t error;
OSAL_SUBTASK_BEGIN
@@ -118,7 +119,7 @@ tusb_error_t hub_port_reset_subtask(uint8_t hub_addr, uint8_t hub_port) );
SUBTASK_ASSERT_STATUS( error );
- osal_task_delay(50); // TODO Hub wait for Status Endpoint on Reset Change
+ osal_task_delay(RESET_DELAY); // TODO Hub wait for Status Endpoint on Reset Change
//------------- Get Port Status to check if port is enabled, powered and reset_change -------------//
OSAL_SUBTASK_INVOKED_AND_WAIT(
@@ -221,6 +222,7 @@ void hub_isr(pipe_handle_t pipe_hdl, tusb_event_t event, uint32_t xferred_bytes) if ( BIT_TEST_(p_hub->status_change, port) )
{
usbh_hub_port_plugged_isr(pipe_hdl.dev_addr, port);
+ break; // handle one port at a time, next port if any will be handled in the next cycle
}
}
// NOTE: next status transfer is queued by usbh.c after handling this request
|
