summaryrefslogtreecommitdiff
path: root/tinyusb
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-03-09 23:04:53 +0700
committerhathach <[email protected]>2018-03-09 23:04:53 +0700
commit0af637cd4f3463f175dc4fbd47ded3abd5f53cd5 (patch)
tree046bd253b5c3f5c25fe8781dc9484ba951f7d47f /tinyusb
parent5f69029dcdaa8cf3120b2d58df56b230dca952d2 (diff)
clean up hal debugger
Diffstat (limited to 'tinyusb')
-rw-r--r--tinyusb/tusb_hal.h29
1 files changed, 2 insertions, 27 deletions
diff --git a/tinyusb/tusb_hal.h b/tinyusb/tusb_hal.h
index 1dc905dc9..7560d6ff6 100644
--- a/tinyusb/tusb_hal.h
+++ b/tinyusb/tusb_hal.h
@@ -53,9 +53,6 @@ extern "C" {
#include "common/tusb_errors.h"
#include "common/compiler/compiler.h"
-// from mcu port
-#include "hal_tusb.h"
-
//--------------------------------------------------------------------+
// HAL API
//--------------------------------------------------------------------+
@@ -87,30 +84,8 @@ void hal_usb_int_enable(uint8_t port);
*/
void hal_usb_int_disable(uint8_t port);
-
-
-
-static inline bool hal_debugger_is_attached(void)
-{
-// TODO check core M3/M4 defined instead
-#if !defined(_TEST_) && !(TUSB_CFG_MCU==MCU_LPC11UXX)
- return ( (CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) == CoreDebug_DHCSR_C_DEBUGEN_Msk );
-#elif TUSB_CFG_DEBUG == 3
- return true; // force to break into breakpoint with debug = 3
-#else
- return false;
-#endif
-}
-
-static inline void hal_debugger_breakpoint(void)
-{
-#ifndef _TEST_
- if (hal_debugger_is_attached()) /* if there is debugger connected */
- {
- __asm("BKPT #0\n");
- }
-#endif
-}
+// for debug only, halt mcu if assert/verify is failed if debugger is attached
+void hal_debugger_breakpoint(void);
#ifdef __cplusplus
}