summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-02-22 22:28:22 +0700
committerhathach <[email protected]>2023-02-22 22:28:22 +0700
commiteca96c635da52ab516e3dda47348ef8977ffd8ad (patch)
treefcbe5dceabea0f2c5de4cde2b95a39fc24007e1a
parent4caa6063b092de2a9efadb6a4ac247543662731f (diff)
comment out osal_task_delay if using os none
-rw-r--r--src/portable/ohci/ohci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/portable/ohci/ohci.c b/src/portable/ohci/ohci.c
index 339f8e896..b615743b8 100644
--- a/src/portable/ohci/ohci.c
+++ b/src/portable/ohci/ohci.c
@@ -169,6 +169,7 @@ TU_ATTR_ALWAYS_INLINE static inline void *_phys_addr(void *virtual_address)
if (tusb_app_virt_to_phys) return tusb_app_virt_to_phys(virtual_address);
return virtual_address;
}
+
TU_ATTR_ALWAYS_INLINE static inline void *_virt_addr(void *physical_address)
{
if (tusb_app_phys_to_virt) return tusb_app_phys_to_virt(physical_address);
@@ -238,7 +239,10 @@ bool hcd_init(uint8_t rhport)
OHCI_REG->control_bit.hc_functional_state = OHCI_CONTROL_FUNCSTATE_OPERATIONAL; // make HC's state to operational state TODO use this to suspend (save power)
OHCI_REG->rh_status_bit.local_power_status_change = 1; // set global power for ports
+#if CFG_TUSB_OS != OPT_OS_NONE
+ // TODO as above delay
osal_task_delay(OHCI_REG->rh_descriptorA_bit.power_on_to_good_time * 2); // Wait POTG after power up
+#endif
return true;
}