From 4a3a44834048006b05d82d32e1f69be856554d4d Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 4 May 2020 00:29:52 +0700 Subject: clean up things, add makefile for host example --- src/host/ehci/ehci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/host') diff --git a/src/host/ehci/ehci.c b/src/host/ehci/ehci.c index 9ddffaf2c..bbad072bf 100644 --- a/src/host/ehci/ehci.c +++ b/src/host/ehci/ehci.c @@ -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; } -- cgit v1.3.1