summaryrefslogtreecommitdiff
path: root/tinyusb
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-03-23 02:51:41 +0700
committerhathach <[email protected]>2013-03-23 02:51:41 +0700
commiteddaa8394bbacd0d2d4ec3a45488c3ae8b28cbbf (patch)
tree76394a12c97daa9f1e58398271b57ac50f24d34e /tinyusb
parent53a4164b39d2bbfda620103311e70b1bffd3a547 (diff)
fix issue with Interrupt Async Advance
- only acknowledge interrupt that we check
Diffstat (limited to 'tinyusb')
-rw-r--r--tinyusb/host/ehci/ehci.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/tinyusb/host/ehci/ehci.c b/tinyusb/host/ehci/ehci.c
index 734251d7f..d2b96d869 100644
--- a/tinyusb/host/ehci/ehci.c
+++ b/tinyusb/host/ehci/ehci.c
@@ -273,7 +273,8 @@ void hcd_isr(uint8_t hostid)
ehci_registers_t* const regs = get_operational_register(hostid);
uint32_t int_status = regs->usb_sts & regs->usb_int_enable;
-
+ regs->usb_sts |= int_status; // Acknowledge handled interrupt
+
if (int_status == 0)
return;
@@ -309,8 +310,6 @@ void hcd_isr(uint8_t hostid)
{
async_advance_isr( get_async_head(hostid) );
}
-
- regs->usb_sts |= regs->usb_sts; // Acknowledge interrupt & clear it
}
//--------------------------------------------------------------------+
@@ -455,6 +454,18 @@ static inline void list_insert(ehci_link_t *current, ehci_link_t *new, uint8_t n
current->type = new_type;
}
+//static inline void qtd_remove_1st_from_qhd(ehci_qhd_t *p_qhd) ATTR_ALWAYS_INLINE;
+//static inline void qtd_remove_1st_from_qhd(ehci_qhd_t *p_qhd)
+//{
+// if (p_qhd->p_qtd_list_head == p_qhd->p_qtd_list_tail) // last TD --> make it NULL
+// {
+// p_qhd->p_qtd_list_head = p_qhd->p_qtd_list_tail = NULL;
+// }else
+// {
+// p_qhd->p_qtd_list_head = (ehci_qtd_t*) align32(p_qhd->p_qtd_list_head->next.address);
+// }
+//}
+
static inline void insert_qtd_to_qhd(ehci_qhd_t *p_qhd, ehci_qtd_t *p_qtd_new) ATTR_ALWAYS_INLINE;
static inline void insert_qtd_to_qhd(ehci_qhd_t *p_qhd, ehci_qtd_t *p_qtd_new)
{