clean up things, add makefile for host example

This commit is contained in:
hathach
2020-05-04 00:29:52 +07:00
parent 9538ca7d74
commit 4a3a448340
10 changed files with 104 additions and 78 deletions

View File

@@ -358,7 +358,7 @@ bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const
if ( dev_addr == 0 ) return true;
// Insert to list
ehci_link_t * list_head;
ehci_link_t * list_head = NULL;
switch (ep_desc->bmAttributes.xfer)
{
@@ -378,8 +378,10 @@ bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const
default: break;
}
TU_ASSERT(list_head);
// TODO might need to disable async/period list
list_insert( list_head, (ehci_link_t*) p_qhd, EHCI_QTYPE_QHD);
list_insert(list_head, (ehci_link_t*) p_qhd, EHCI_QTYPE_QHD);
return true;
}