diff options
| author | hathach <[email protected]> | 2013-11-06 12:15:11 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-11-06 12:15:11 +0700 |
| commit | b2b53e61fbf7a449f1c3db78df0bb2beddb80984 (patch) | |
| tree | 292c5f9804cec9d6da0dd843c6bff7a9c080d62f /tinyusb/host | |
| parent | 024858a605c78927f637cadd5e5c5b7764a496bd (diff) | |
refractor dcd_controller_reset & hcd_controller_reset to hal_controller_reset
Diffstat (limited to 'tinyusb/host')
| -rw-r--r-- | tinyusb/host/ehci/ehci.c | 26 | ||||
| -rw-r--r-- | tinyusb/host/ehci/ehci.h | 3 |
2 files changed, 13 insertions, 16 deletions
diff --git a/tinyusb/host/ehci/ehci.c b/tinyusb/host/ehci/ehci.c index 643bf3443..322f17879 100644 --- a/tinyusb/host/ehci/ehci.c +++ b/tinyusb/host/ehci/ehci.c @@ -277,19 +277,19 @@ static tusb_error_t hcd_controller_stop(uint8_t hostid) return timeout_expired(&timeout) ? TUSB_ERROR_OSAL_TIMEOUT : TUSB_ERROR_NONE;
}
-tusb_error_t hcd_controller_reset(uint8_t hostid)
-{
- ehci_registers_t* const regs = get_operational_register(hostid);
- timeout_timer_t timeout;
-
-// NXP chip powered with non-host mode --> sts bit is not correctly reflected
- regs->usb_cmd_bit.reset = 1;
-
- timeout_set(&timeout, 2); // should not take longer the time to stop controller
- while( regs->usb_cmd_bit.reset && !timeout_expired(&timeout)) {}
-
- return timeout_expired(&timeout) ? TUSB_ERROR_OSAL_TIMEOUT : TUSB_ERROR_NONE;
-}
+//tusb_error_t hcd_controller_reset(uint8_t hostid)
+//{
+// ehci_registers_t* const regs = get_operational_register(hostid);
+// timeout_timer_t timeout;
+//
+//// NXP chip powered with non-host mode --> sts bit is not correctly reflected
+// regs->usb_cmd_bit.reset = 1;
+//
+// timeout_set(&timeout, 2); // should not take longer the time to stop controller
+// while( regs->usb_cmd_bit.reset && !timeout_expired(&timeout)) {}
+//
+// return timeout_expired(&timeout) ? TUSB_ERROR_OSAL_TIMEOUT : TUSB_ERROR_NONE;
+//}
//--------------------------------------------------------------------+
// CONTROL PIPE API
diff --git a/tinyusb/host/ehci/ehci.h b/tinyusb/host/ehci/ehci.h index 015de9186..3a7bb98b7 100644 --- a/tinyusb/host/ehci/ehci.h +++ b/tinyusb/host/ehci/ehci.h @@ -469,9 +469,6 @@ typedef struct { }device[TUSB_CFG_HOST_DEVICE_MAX]; }ehci_data_t; -//For NXP's MCU, host/device mode must be set immediately after a reset -tusb_error_t hcd_controller_reset(uint8_t hostid) ATTR_WARN_UNUSED_RESULT; - #ifdef __cplusplus } #endif |
