summaryrefslogtreecommitdiff
path: root/tinyusb/host
diff options
context:
space:
mode:
Diffstat (limited to 'tinyusb/host')
-rw-r--r--tinyusb/host/ohci/ohci.c6
-rw-r--r--tinyusb/host/usbh.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/tinyusb/host/ohci/ohci.c b/tinyusb/host/ohci/ohci.c
index 75688cfca..f55563535 100644
--- a/tinyusb/host/ohci/ohci.c
+++ b/tinyusb/host/ohci/ohci.c
@@ -293,7 +293,7 @@ tusb_error_t hcd_pipe_control_xfer(uint8_t dev_addr, tusb_control_request_t con
ohci_gtd_t *p_status = p_setup + 2;
//------------- SETUP Phase -------------//
- gtd_init(p_setup, p_request, 8);
+ gtd_init(p_setup, (void*) p_request, 8);
p_setup->index = dev_addr;
p_setup->pid = OHCI_PID_SETUP;
p_setup->data_toggle = BIN8(10); // DATA0
@@ -664,9 +664,11 @@ void hcd_isr(uint8_t hostid)
// TODO dual port is not yet supported
if ( rhport_status & OHCI_RHPORT_CONNECT_STATUS_CHANGE_MASK )
{
+ // TODO check if remote wake-up
if ( OHCI_REG->rhport_status_bit[0].current_connect_status )
{
-// OHCI_REG->rhport_status[0] = OHCI_RHPORT_PORT_RESET_STATUS_MASK; // reset port immediately
+ // TODO reset port immediately, without this controller will got 2-3 (debouncing connection status change)
+ OHCI_REG->rhport_status[0] = OHCI_RHPORT_PORT_RESET_STATUS_MASK;
usbh_hcd_rhport_plugged_isr(0);
}else
{
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c
index de9e15164..229c9da65 100644
--- a/tinyusb/host/usbh.c
+++ b/tinyusb/host/usbh.c
@@ -375,7 +375,7 @@ tusb_error_t enumeration_body_subtask(void)
{
if( hcd_port_connect_status(usbh_devices[0].core_id) )
{ // connection event
- osal_task_delay(200); // wait until device is stable
+ osal_task_delay(200); // wait until device is stable. Increase this if the first 8 bytes is failed to get
if ( !hcd_port_connect_status(usbh_devices[0].core_id) ) SUBTASK_EXIT(TUSB_ERROR_NONE); // exit if device unplugged while delaying