From dbaf6c0d30657ec1659ddb13269edc4ae28b7bc2 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 22 Mar 2013 17:08:51 +0700 Subject: [PATCH] - 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 --- demos/bsp/boards/board.c | 7 +- demos/host/.cproject | 1703 ++++++----------- demos/host/.project | 6 +- tests/test/host/ehci/test_ehci_pipe_open.c | 6 +- .../host/ehci/test_ehci_pipe_xfer_control.c | 6 +- .../ehci/test_ehci_usbh_hcd_integration.c | 15 + tests/test/host/test_usbh.c | 13 + tinyusb/common/assertion.h | 10 +- tinyusb/common/common.h | 6 - tinyusb/common/errors.h | 1 + tinyusb/hal/hal.h | 22 + tinyusb/host/ehci/ehci.c | 7 +- tinyusb/host/usbh.c | 29 +- 13 files changed, 663 insertions(+), 1168 deletions(-) diff --git a/demos/bsp/boards/board.c b/demos/bsp/boards/board.c index 22d4c0971..ae88c39f5 100644 --- a/demos/bsp/boards/board.c +++ b/demos/bsp/boards/board.c @@ -134,5 +134,10 @@ void HardFault_HandlerC(unsigned long *hardfault_args){ // Bus Fault Address Register _BFAR = (*((volatile unsigned long *)(0xE000ED38))) ; - __asm("BKPT #0\n") ; // Break into the debugger +// if ((CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk)==CoreDebug_DHCSR_C_DEBUGEN_Msk) /* if there is debugger connected */ +// { +// __asm("BKPT #0\n"); +// } + + hal_debugger_breakpoint(); } diff --git a/demos/host/.cproject b/demos/host/.cproject index 76da339f4..079ac0add 100644 --- a/demos/host/.cproject +++ b/demos/host/.cproject @@ -56,6 +56,7 @@