summaryrefslogtreecommitdiff
path: root/tinyusb/host/ehci
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-03-22 17:08:51 +0700
committerhathach <[email protected]>2013-03-22 17:08:51 +0700
commitdbaf6c0d30657ec1659ddb13269edc4ae28b7bc2 (patch)
tree59685ec0d0e0eea4b29cbff5d308e1befe4a8dd6 /tinyusb/host/ehci
parentcd2915e78cdd261713f1b0aa4ebe0441f99f9456 (diff)
- fix bug when unplugged unmounted-already device (mostly plugged when power on)
- add hal_debugger_is_attached & hal_debugger_breakpoint - assert will suspend (place breakpoint) if the condition is failed and debugger is attached. Otherwise, a message to uart is printed - fix get control qhd function when dev_addr is not zero (shifted 1) - fix wrong logic for unsupported class
Diffstat (limited to 'tinyusb/host/ehci')
-rw-r--r--tinyusb/host/ehci/ehci.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/tinyusb/host/ehci/ehci.c b/tinyusb/host/ehci/ehci.c
index 0aaa4e9c5..92c439ff8 100644
--- a/tinyusb/host/ehci/ehci.c
+++ b/tinyusb/host/ehci/ehci.c
@@ -221,10 +221,7 @@ void port_connect_status_change_isr(uint8_t hostid)
usbh_device_plugged_isr(hostid, regs->portsc_bit.nxp_port_speed); // NXP specific port speed
}else // device unplugged
{
- printf("%s %d\n", __FUNCTION__, __LINE__);
-
usbh_device_unplugged_isr(hostid);
-
regs->usb_cmd_bit.advacne_async = 1; // Async doorbell check EHCI 4.8.2 for operational details
}
@@ -280,7 +277,7 @@ void hcd_isr(uint8_t hostid)
{
// TODO handle Queue Head halted
// TODO invoke some error callback if not async head
- ASM_BREAKPOINT;
+ hal_debugger_breakpoint();
}
//------------- some QTD/SITD/ITD with IOC set is completed -------------//
@@ -666,7 +663,7 @@ static inline ehci_qhd_t* get_control_qhd(uint8_t dev_addr)
{
return (dev_addr == 0) ?
get_async_head( usbh_device_info_pool[dev_addr].core_id ) :
- &ehci_data.device[dev_addr].control.qhd;
+ &ehci_data.device[dev_addr-1].control.qhd;
}
static inline ehci_qtd_t* get_control_qtds(uint8_t dev_addr)
{